Truth Tables

NOT gate

  • A NOT gate has one input and will invert it to produce an opposite output. This is shown in the truth table below
  • A is the input
  • Z is the output
not

Input

Output
AZ
01
10

AND gate

  • An AND gate has two inputs
and

Input

Output
ABZ
000
010
100
111
  • The AND gate truth table shows the only combination of inputs which will result in a positive output is 1 and 1

OR gate

  • An OR gate has two inputs  
or

Input

Output
ABZ
000
011
101
111
  • The truth table shows an OR gate produces an output of 1 if any of the inputs are a 1

NOR gate

  • A NOR gate has two inputs
nor

Input

Output
ABZ
001
010
100
110
  • The truth table shows a NOR gate works oppositely to an OR gate – the only input combination which results in a 1 is two 0s

NAND gate

  • A NAND gate has two inputs  
nand

Input

Output
ABZ
001
011
101
110
  • The truth table shows a NAND gate works in the opposite way to an AND gate – the only input combination which does not result in a 1 is two positive inputs (1 +1)

XOR gate

  • An XOR gate has two inputs 
xor

Input

Output
ABZ
000
011
101
110
  • The truth table shows how an XOR gate works. It will only output a 1 if the two inputs are different to one another

Truth tables can also be used to help work out the possible outputs of a logic circuit containing more than one gate

  • When creating a truth table for multiple inputs, begin by entering the possible input combinations into the leftmost columns

A truth table for a three input (A, B and C) logic gate

ABC Z
000  
001  
010  
011  
100  
101  
110  
111  

  • The column on the right contains the final output of the logic circuit (Z)
  • Column(s) in between the inputs and the final output can be used to help work out the final output by containing intermediary outputs
  • Intermediary outputs are the output of gates found within the logic circuit
  • In the logic circuit diagram below, D and E are intermediary outputs
screenshot-2023-05-30-at-08-49-04
  • The fourth column labelled D represents the output of NOT A
ABCD (NOT A)EZ
0001  
0011  
0101  
0111  
1000  
1010  
1100  
1110  
  • The next intermediary output is E which is the equivalent of ((NOT A) AND B) this notation is called a logic expression
  • The E intermediary output can be worked out by performing the AND logical operation on columns B and D

A

B

C

D (NOT A)

E ((NOT A) AND B)

Z
00010 
00110 
01011 
01111 
10000 
10100 
11000 
11100 
  • The final output (Z) can be worked out by performing the OR logical operation on columns E and C

A

B

C

D (NOT A)

E ((NOT A) AND B)

Z (((NOT A) AND B) OR C)
000100
001101
010111
011111
100000
101001
110000
111001

Loading

error: Content is protected !!