Logic Gates Activity
Logic Gates Activity
a b output
0 0 1
0 1 0
1 0 0
1 1 1
Notice that the output is only 1 when the inputs are the same.
The XNOR gate can work like an == comparison
a b output
0 0 0
0 1 1
1 0 1
1 1 0
Notice that the output is only 1 when the inputs are different.
The XOR gate can work like an != comparison
Circuit 1: a != b NAND c != d
Circuit 2: a == b OR c == d
6. For Circuit 1, complete the following table (assuming the inputs
are named a, b, c and d):
a b c d output
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
a b c d output
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0