Basics

Basic Gates

AND & NAND Gates

      

AND Gate

The output is set to "1" when both inputs are set to "1". Otherwise, the output is set to "0".
 

NAND Gate

The output is the AND gate inverted.
 
The output is set to "0" when both inputs are set to "1". Otherwise, the output is set to "1".
 
A B Out
0
0
1
1
0
1
0
1
0
0
0
1
A B Out
0
0
1
1
0
1
0
1
1
1
1
0
 
 

OR & NOR Gates

 

OR Gate

The output is set to "1" if either or both of the inputs are set to "1". If both inputs are set to "0", then the output is "0".
 

NOR Gate

The output is the OR gate inverted.
 
The output is set to "1" if both inputs are "0". Otherwise, the output is "1".
 
A B Out
0
0
1
1
0
1
0
1
0
1
1
1
A B Out
0
0
1
1
0
1
0
1
1
0
0
0
 
 

XOR & XNOR Gates

 

XOR Gate

The output is set to "1" if either, but not both, of the inputs are "1".
The output is set to "0" if both inputs are "0" or if both inputs are "0".
Another way of describe this gate is to say that the output is "1" if the inputs are different, that the output is "0" if the inputs are the same.
 

XNOR Gate

The output is the XOR gate inverted.
 
The output is set to "1" if the inputs are the same, and "0" if the inputs are different.
 
A B Out
0
0
1
1
0
1
0
1
0
1
1
0
A B Out
0
0
1
1
0
1
0
1
1
0
0
1

 

Alternative content

Get Adobe Flash player

 

Alternative content

Get Adobe Flash player