Translate this page

💡 The Sixteen Faces of Logic: All Possible Boolean Functions with Two Inputs 🔗

Boolean algebra, named after mathematician George Boole, is the bedrock of all digital circuitry. It deals with variables that can only have two states: True (1) or False (0). When we consider two input variables, A and B, there are only four possible combinations of inputs: (0, 0), (0, 1), (1, 0), and (1, 1).

Since each of these four input combinations can result in either a 0 or a 1 as an output, the total number of unique Boolean functions possible is `2^4 = 16`.

This article explores these 16 fundamental logical operations, categorized by their complexity and importance in digital design.

Table of Contents

🔢 The Four Input Combinations 🔗

To understand the functions, we must first define the input possibilities.

AB
00
01
10
11

🚀 Categories of the 16 Functions 🔗

The 16 functions can be grouped into several categories based on their output patterns, from the simplest constants to the most complex exclusive gates. Let `F` represent the function’s output.

1. Constant Functions (2 Functions) 🔗

These functions ignore the inputs entirely and always produce the same output.

Function NameExpressionA=0, B=0A=0, B=1A=1, B=0A=1, B=1Description
Zero (FALSE)`F\_0 \= 0`0000Always outputs 0.
One (TRUE)`F\_{15} \= 1`1111Always outputs 1.

2. Simple Transfer/Inversion Functions (4 Functions) 🔗

These functions depend on only one of the inputs, either directly or inverted.

Function NameExpressionA=0, B=0A=0, B=1A=1, B=0A=1, B=1Description
Transfer A`F\_{3} \= A`0011Output is simply A.
Transfer B`F\_{5} \= B`0101Output is simply B.
NOT A`F\_{12} \= \bar{A}`1100Output is the inverse of A.
NOT B`F\_{10} \= \bar{B}`1010Output is the inverse of B.

3. Basic Binary Operations (4 Functions) 🔗

These are the primary logic gates used universally in digital systems.

Function NameExpressionA=0, B=0A=0, B=1A=1, B=0A=1, B=1Common Gate
AND`F\_{8} \= A \cdot B`0001A 1 only if A AND B are 1.
OR`F\_{14} \= A \+ B`0111A 1 if A OR B (or both) is 1.
NAND`F\_{7} \= \overline{A \cdot B}`1110The NOT-AND of A and B. (Universal Gate)
NOR`F\_{1} \= \overline{A \+ B}`1000The NOT-OR of A and B. (Universal Gate)

4. Exclusive Operations (2 Functions) 🔗

These functions are critical for arithmetic circuits (like adders) and comparing inputs.

Function NameExpressionA=0, B=0A=0, B=1A=1, B=0A=1, B=1Description
XOR (Exclusive-OR)`F\_{6} \= A \oplus B`0110A 1 if A and B are different.
XNOR (Equivalence)`F\_{9} \= \overline{A \oplus B}`1001A 1 if A and B are the same.

5. Conditional and Inverse Conditional Functions (4 Functions) 🔗

These functions are less common in general digital logic but play a role in advanced logic design and certain formal systems.

Function NameExpressionA=0, B=0A=0, B=1A=1, B=0A=1, B=1Description
A Implies B (Material Implication)`F\_{13} \= \bar{A} \+ B`1101False only if A is 1 and B is 0.
B Implies A`F\_{11} \= A \+ \bar{B}`1011False only if B is 1 and A is 0.
A NOT-Implies B`F\_{4} \= A \cdot \bar{B}`0010True only if A is 1 and B is 0.
B NOT-Implies A`F\_{2} \= \bar{A} \cdot B`0100True only if A is 0 and B is 1.

🔑 The Power of Universality 🔗

The most fascinating aspect of these 16 functions is that two are individually capable to construct all the others: the NAND gate and the NOR gate.

Because of this property, NAND and NOR gates are known as Universal Gates. A computer can be built entirely using only one type of gate, significantly simplifying the manufacturing process of integrated circuits.

📝 Summary Table of All 16 Functions 🔗

This table consolidates all 16 functions based on the output for the four input combinations.

F#(0,0)(0,1)(1,0)(1,1)Function NameExpressionCommon Gate
`F\_0`0000Zero`0`(Constant)
`F\_1`1000NOR`\overline{A+B}`NOR
`F\_2`0100B NOT-Implies A`\bar{A} \cdot B`
`F\_3`0011Transfer A`A`
`F\_4`0010A NOT-Implies B`A \cdot \bar{B}`
`F\_5`0101Transfer B`B`
`F\_6`0110XOR`A \oplus B`XOR
`F\_7`1110NAND`\overline{A \cdot B}`NAND
`F\_8`0001AND`A \cdot B`AND
`F\_9`1001XNOR`\overline{A \oplus B}`XNOR
`F\_{10}`1010NOT B`\bar{B}`NOT
`F\_{11}`1011B Implies A`A \+ \bar{B}`
`F\_{12}`1100NOT A`\bar{A}`NOT
`F\_{13}`1101A Implies B`\bar{A} \+ B`
`F\_{14}`0111OR`A \+ B`OR
`F\_{15}`1111One`1`(Constant)

These 16 logical functions, derived from two simple binary inputs, form the complete vocabulary for all computational processes, demonstrating the incredible complexity that can be built from the simplest of foundations.


Download my free ebook


Subscribe to my mailing list and get a free email course

* indicates required
Interests



Translate this page

Updated on 2025 Nov 27.

DISCLAIMER: This is not professional advice. The ideas and opinions presented here are my own, not necessarily those of my employer.