Truth Tables: What Are They? (Truth Tables For Different Logic Gates)

What Is A Truth Table
💡
Key learnings:
  • Truth Table Definition: A truth table is a mathematical table that shows the output of a digital logic circuit for all possible input combinations.
  • Structure and Use: Truth tables have columns for each input and the output, and they help deduce logical expressions for circuits.
  • NOT Gate: A NOT gate outputs the opposite of the input, turning 0 into 1 and 1 into 0.
  • AND Gate: An AND gate outputs 1 only if all inputs are 1; otherwise, it outputs 0.
  • XOR Gate: An XOR gate outputs 1 when inputs are different and 0 when they are the same, often used as a parity checker.

What is a Truth Table?

A truth table is a mathematical table that lists the output of a particular digital logic circuit for all the possible combinations of its inputs. From that complete list you can write the logical expression for the circuit. Truth tables are a standard tool in Boolean algebra.

A truth table has one column for each input variable. Common labels are the pair P and Q, the pair x and y or the pair a and b. A final column shows every result of the operation that the table represents, for example P AND Q.

Each row of the truth table contains one possible configuration of the input variables (for example, P=false [0] Q=true [1]), and the result of the operation for those values (continuing the example, P AND Q=false [0]).

Worked Logic gate questions are one way to practise reading these tables.

NOT Gate or an Inverter Truth Table

not gate or an inverter

A NOT gate is a single-input, single-output logic device where the output is always the opposite of the input.

Input 1 gives output 0. Input 0 gives output 1. The algebraic form is Y = X̅.

AND Gate Truth Table

and gate truth table
An AND gate is a basic gate with multiple inputs and a single output. The output is high (1) only if all inputs are high. Any other combination is low (0), as shown by the truth table. The logical expression for this gate is Y = I1.I2.

OR Gate Truth Table

OR is a basic multi-input, single-output gate. The output is zero only when every input bit is zero, as the 2-input OR gate table shows. The logical expression for the OR gate is


or gate truth table

NAND Gate Truth Table

nand gate truth table
A NAND gate is logically equivalent to an AND gate followed by a NOT gate. The truth table shows that the NAND output is low only when every input is high. In every other row the output is 1.

This implies that the output of the NAND gate is the negated output of the AND gate, represented by the intermediate result M in the above truth table. The logical expression of a NAND gate is given by


NOR Gate Truth Table

nor gate truth table
A NOR gate is an OR gate followed by a NOT gate. Its output is the negation of the OR output, so it is high only when every input is low.

However, for any other combination of inputs, the output will be low as shown by the truth table. A logical expression for the same can be given as


XOR Gate Truth Table

xor gate truth table
An XOR gate has a high output only when its inputs differ, as shown by the truth table. Different inputs give 1. Matching inputs give 0.

Logically this is given by Further in its expanded form, one gets
Cascaded multi-input XOR is used as an odd-parity checker.

XNOR Gate Truth Table

xnor gate truth table
An XNOR gate is an XOR gate followed by a NOT gate, so the output is the inverted XOR result.

Identical inputs therefore give a high output and differing inputs give a low output, as shown by the truth table. The logical expression for the XNOR gate is

Cascaded multi-input XNOR is used as an even-parity checker.

Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Leave a Comment