Electronics

Boolean Algebra Truth Tables for Logic Gate Functions

Boolean expressions are the mathematical expressions of the operation principle behind each logic gate. This mathematical expression defines the relationship between input variables and output. The Boolean expressions also help to generate truth tables for logic gates.

Boolean Variables & Operators

Boolean variables are represented by alphabetic symbols. There can be two or more variables for input while a single variable for output. The Boolean operators are symbols that perform the Boolean operations.

Truth Tables

The truth table provides all the combinations of inputs and output in tabular form. For two inputs, there can be four possible combinations of switching inputs. The Boolean mathematical expression is used to evaluate the output of the truth table in each case.

Either 1 or 0 is used in truth tables to indicate high or low input states.

Boolean Algebra Truth Tables for Logic Gate Functions

We will generate truth tables for the below-listed logic gates while using the Boolean algebraic expressions. All four possible combinations for the two inputs will be added to the table and the resultant output will be obtained for every combination using the Boolean equation.

OR Gate

The OR logic gate provides a high or true output when any of the inputs is high. It provides false or low output in case all inputs become low.

Boolean expression:

The above expression means that output shall be the sum of the two input variables.

The same logic is displayed in the truth table below:

X Y Z
0 0 0
0 1 1
1 0 1
1 1 1

AND Gate

The AND logic gate provides a high or true output only if all its inputs are true. It will provide a false output if one of the inputs is false but the other is true.

Boolean expression:

The above expression means that output shall be obtained by multiplication of the two input variables.

The truth table is illustrated below:

X Y Z
0 0 0
0 1 0
1 0 0
1 1 1

NOT Gate

The NOT logic gate provides the inverse or complement of its input at the output. If the input is true, it will provide false output. Similarly, if the input is false, it will provide true output.

Boolean expression:

The above expression means that the output will always be inverse of the input.

The same logic is displayed in truth table below:

X Z
0 1
1 0

NAND Gate

The NAND logic gate provides a high output only if any one of its inputs is true. It will provide a false output if none of the inputs are false.

Boolean expression:

The above expression means that output shall be the inverse of the product of two inputs.

The same logic is displayed in truth table below:

X Y Z
0 0 1
0 1 1
1 0 1
1 1 0

NOR Gate

The NOR logic gate provides high output only if none of its inputs are true. It will provide a false output if any of the inputs is true.

Boolean expression:

The above expression means that output shall be a complement of the sum of the two input variables.

The same logic is displayed in the truth table below:

X Y Z
0 0 1
0 1 0
1 0 0
1 1 0

EX-OR Gate

The EX-OR logic gate provides high output only if inputs are different (either high and low or low and high). It will provide a false output if inputs are the same.

Boolean expression:


In other words, the XOR gate provides high output when the number of high inputs is odd.

The same is displayed in truth table below:

X Y Z
0 0 0
0 1 1
1 0 1
1 1 0

EX-NOR Gate

The EX-NOR logic gate provides high output only if inputs are the same (either both are high or low). It will provide a false output if the inputs are different.

Boolean expression:

The same is displayed in the truth table below:

X Y Z
0 0 1
0 1 0
1 0 0
1 1 1

Truth Table of All Logic Gates

We can now summarize the above truth tables in a single representation. All four combinations of inputs and the output in the case of each logic gate are displayed below:

Inputs Truth Table Outputs for Each Logic Gate
X Y OR NOR EX-OR AND NAND EX-NOR
0 0 0 1 0 0 1 1
0 1 1 0 1 0 1 0
1 0 1 0 1 0 1 0
1 1 1 0 0 1 0 1

Conclusion

The Boolean algebraic expressions provide the fundamental mathematical principles for the truth tables of logic gates. The truth tables consisting of all possible combinations of inputs can be easily generated along with output based on the Boolean mathematical expressions.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.