As well as a standard Boolean Expression, the input and output information of any **Logic Gate** or circuit can be plotted into a standard table to give a visual representation of the switching function of the system.

The table used to represent the boolean expression of a logic gate function is commonly called a **Truth Table**. A logic gate truth table shows each possible input combination to the gate or circuit with the resultant output depending upon the combination of these input(s).

For example, consider a single **2-input** logic circuit with input variables labelled as A and B. There are “four” possible input combinations or 2^{2} of “OFF” and “ON” for the two inputs. However, when dealing with Boolean expressions and especially logic gate truth tables, we do not general use “ON” or “OFF” but instead give them bit values which represent a logic level “1” or a logic level “0” respectively.

Then the four possible combinations of A and B for a 2-input logic gate is given as:

- Input Combination 1. – “OFF” – “OFF” or ( 0, 0 )
- Input Combination 2. – “OFF” – “ON” or ( 0, 1 )
- Input Combination 3. – “ON” – “OFF” or ( 1, 0 )
- Input Combination 4. – “ON” – “ON” or ( 1, 1 )

Therefore, a 3-input logic circuit would have 8 possible input combinations or 2^{3} and a 4-input logic circuit would have 16 or 2^{4}, and so on as the number of inputs increases. Then a logic circuit with “n” number of inputs would have 2^{n} possible input combinations of both “OFF” and “ON”.

So in order to keep things simple to understand, in this tutorial we will only deal with standard **2-input** type logic gates, but the principals are still the same for gates with more than two inputs.

Then the Truth tables for a 2-input AND Gate, a 2-input OR Gate and a single input NOT Gate are given as:

For a 2-input AND gate, the output Q is true if BOTH input A “AND” input B are both true, giving the Boolean Expression of: ( Q = A and B ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 0 | |

0 | 1 | 0 | |

1 | 0 | 0 | |

1 | 1 | 1 | |

Boolean Expression Q = A.B | Read as A AND B gives Q |

Note that the Boolean Expression for a two input AND gate can be written as: A.B or just simply AB without the decimal point.

For a 2-input OR gate, the output Q is true if EITHER input A “OR” input B is true, giving the Boolean Expression of: ( Q = A or B ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 0 | |

0 | 1 | 1 | |

1 | 0 | 1 | |

1 | 1 | 1 | |

Boolean Expression Q = A+B | Read as A OR B gives Q |

For a single input NOT gate, the output Q is ONLY true when the input is “NOT” true, the output is the inverse or complement of the input giving the Boolean Expression of: ( Q = NOT A ).

Symbol | Truth Table | |

A | Q | |

0 | 1 | |

1 | 0 | |

Boolean Expression Q = NOT A or A | Read as inversion of A gives Q |

The NAND and the NOR Gates are a combination of the AND and OR Gates with that of a NOT Gate or inverter.

For a 2-input NAND gate, the output Q is true if BOTH input A and input B are NOT true, giving the Boolean Expression of: ( Q = not(A and B) ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 1 | |

0 | 1 | 1 | |

1 | 0 | 1 | |

1 | 1 | 0 | |

Boolean Expression Q = A .B | Read as A AND B gives NOT-Q |

For a 2-input NOR gate, the output Q is true if BOTH input A and input B are NOT true, giving the Boolean Expression of: ( Q = not(A or B) ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 1 | |

0 | 1 | 0 | |

1 | 0 | 0 | |

1 | 1 | 0 | |

Boolean Expression Q = A+B | Read as A OR B gives NOT-Q |

As well as the standard logic gates there are also two special types of logic gate function called an Exclusive-OR Gate and an Exclusive-NOR Gate. The actions of both of these types of gates can be made using the above standard gates however, as they are widely used functions, they are now available in standard IC form and have been included here as reference.

For a 2-input Ex-OR gate, the output Q is true if EITHER input A or if input B is true, but NOT both giving the Boolean Expression of: ( Q = (A and NOT B) or (NOT A and B) ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 0 | |

0 | 1 | 1 | |

1 | 0 | 1 | |

1 | 1 | 0 | |

Boolean Expression Q = A B |

For a 2-input Ex-NOR gate, the output Q is true if BOTH input A and input B are the same, either true or false, giving the Boolean Expression of: ( Q = (A and B) or (NOT A and NOT B) ).

Symbol | Truth Table | ||

A | B | Q | |

0 | 0 | 1 | |

0 | 1 | 0 | |

1 | 0 | 0 | |

1 | 1 | 1 | |

Boolean Expression Q = A B |

The following Truth Table compares the logical functions of the 2-input logic gates above.

Inputs | Truth Table Outputs For Each Gate | ||||||

A | B | AND | NAND | OR | NOR | EX-OR | EX-NOR |

0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 |

0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |

1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |

1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |

The following table gives a list of the common logic functions and their equivalent Boolean notation.

Logic Function | Boolean Notation |

AND | A.B |

OR | A+B |

NOT | A |

NAND | A .B |

NOR | A+B |

EX-OR | (A.B) + (A.B) or A B |

EX-NOR | (A.B) + or A B |

2-input logic gate truth tables are given here as examples of the operation of each logic function, but there are many more logic gates with 3, 4 even 8 individual inputs. The multiple input gates are no different to the simple 2-input gates above, So a 4-input AND gate would still require ALL 4-inputs to be present to produce the required output at Q and its larger truth table would reflect that.

Error! Please fill all fields.

Interesting notes

Educational , informative and helpful .Thanks a lot.

Nice and helpful

notes is very niccce

How you prove the ___

A.B of Nand expression with help of truth table and explain or expression uing truth table ? Plz send me in one day

How to minimise boolean algebra

I’ll be grateful for ever…

Please help me to derive the truth table for E = negation of X + negation of Y + Z

!(Y + Z) is a NOR gate function

!X is an OR gate function

A NOR gate OR’ed with an OR gate.

Then E = “1” when X = “1” OR (Y = “0” and Z = “0”)

am really thankful

please how do we apply a truth table to a certain circuit