ALevel

6.4 - Logic Gates

Truth Tables

OR

\[Q = X + Y\]
X Y Q
0 0 0
0 1 1
1 0 1
1 1 1

AND

\[Q=XY\]
X Y Q
0 0 0
0 1 0
1 0 0
1 1 1

NOT

\[Q = \overline{X}\]
X Q
0 1
1 0

NAND

\[Q=\overline{XY}\]
X Y Q
0 0 1
0 1 1
1 0 1
1 1 0

NOR

\[Q=\overline{X+Y}\]
X Y Q
0 0 1
0 1 0
1 0 0
1 1 0

XOR

\[Q=X\overline{Y}+\overline{X}Y\] \[Q=X\otimes{Y}\]
X Y Q
0 0 0
0 1 1
1 0 1
1 1 0

Half-Adder

A B A+B C (carry)
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

NB:

\[A + B = A \otimes{B}\] \[C=AB\]