Skip to content
BetterDL

Boolean function

Also called: Boolean functions, logic function, switching function

A rule that gives an output of 0 or 1 for every combination of 0/1 inputs. A truth table defines it completely.

A Boolean function assigns an output, 0 or 1, to every combination of its inputs. A function of A, B and C is often written F(A, B, C).

The function is the behavior, not the formula. Its truth table pins it down completely. Many different expressions can describe the same function: , and A are three expressions for one function of A and B.

That distinction drives the whole course:

  • A combinational circuit computes a Boolean function.
  • Designing a circuit means choosing one expression for the function.
  • Simplifying means finding a cheaper expression for the same function.

With n inputs there are 2ⁿ rows, and each row's output can be 0 or 1 independently, so there are 2 to the power 2ⁿ different functions: 16 functions of 2 variables, and 256 of 3 variables.

Every function can be written in a standard way, as a sum of minterms or a product of maxterms.

A
00000
01000
10111
11111

Worked example

Example

Size of a function's table

F(A, B, C, D, E) has 5 inputs. How many rows does its truth table have, and how many different functions of 5 inputs exist?

  1. 1.

    Rows: 2⁵ = 32.

  2. 2.

    Each of the 32 outputs can be 0 or 1 independently.

  3. 3.

    So there are 2³² different functions, about 4.3 billion.

  4. 4.

    That is why simplifying by trial and error does not scale.

Common mistakes

  • Treating an expression and a function as the same thing. Different expressions can describe one function.

  • Assuming the number of rows grows by 2 per input. It doubles.

Practice Boolean function

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Boolean function is taught in Boolean Algebra and Combinational Logic.