10 Truth Table Examples of Logic Gates

Truth tables are essential tools in logic, computer science, and mathematics, clearly visualizing how different logical expressions and operations are evaluated based on various inputs. Below, you will find a range of truth table examples, each illustrating different logical operations and their results.

Truth Table Examples of Basic Logical Gates

1. AND Gate Truth Table

Expression: A AND B or A.B

Description: The AND gate outputs true only if both inputs are true.

A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1

2. OR Gate Truth Table

Expression: A OR B or A+B

Description: The OR gate outputs true if at least one input is true.

A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

3. NOT Gate Truth Table

Expression: NOT A or Ā

Description: The NOT gate outputs the inverse of the input.

A NOT A
0 1
1 0

Truth Table Examples of Advanced Logical Gates

1. NAND Gate Truth Table

Expression: A NAND B or ~(A.B)

Description: The NAND gate outputs false only if both inputs are true.

A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0

2. NOR Gate Truth Table

Expression: A NORD B or ~(A+B)

Description: The NOR gate outputs true only if both inputs are false.

A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0

3. XOR Gate Truth Table

Expression: A XOR B or A⊕B

Description: The XOR gate outputs true if exactly one input is true.

A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0

4. XNOR Gate Truth Table

Expression: A XNOR B or AB + A'B'

Description: The XNOR gate outputs true if both inputs are either true or both false.

A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1

Truth Table Examples of Combined Gates and Laws

1. NAND with OR Gate Truth Table

Expression: (A OR B) NAND (A AND B)

Description: This table shows how combining NAND and OR operations affects the output.

A B A OR B A AND B (A OR B) NAND (A AND B)
0 0 0 0 1
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0

2. De Morgan's First Law Truth Table

Expression: NOT (A AND B) = (NOT A) OR (NOT B) or (AUB)' = A'∩B'

Description: This demonstrates the first of De Morgan's laws, showing equivalence between a negated AND operation and the OR of the negated inputs.

A B A AND B NOT (A AND B) NOT A NOT B (NOT A) OR (NOT B)
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0

3. De Morgan's Second Law Truth Table

Expression: (not(AB)) = (not A) + (not B)

Description: This demonstrates the first of De Morgan's laws, showing equivalence between a negated AND operation and the OR of the negated inputs.

A B A AND B NOT (A AND B) NOT A NOT B (NOT A) OR (NOT B)
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0

Frequently Asked Questions (FAQs)