Binary Logic and Circuits
Algebraic representation:
Truth table representation:
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
Binary Logic Variables
(same as in programming)
0: false
1: true
Good way to remember, 0 is nothing, so it's false, 1 is something, so it's true
Binary Logic Functions
These are functions of expressions of binary logic variables on these functions product only 1 and 9 depending on the input.
Logic Operators
| Operator | Symbol | Example |
|---|---|---|
| AND | " |
|
| OR | "+" | |
| NOT | "'" or overline |
Operator precedence: (), NOT, AND, OR (same as in programming)
Notation differs from Logical Operators in mathematics
Binary Circuits
NOT
See negation
| x | x' |
|---|---|
| 0 | 1 |
| 1 | 0 |
AND
See logical and
| x | y | xy |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR
See logical or
| x | y | x + y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NAND
| x | y | (xy)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Thanks to De Morgan's law, the NAND operation is functionally complete. That is, any boolean expression can be re-expressed equivalently with ONLY NAND gates. See Making Other Gates using NAND Gates.
Also see Canonical Expressions#NAND NAND Realization
NOR
| x | y | (x + y)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Also see Canonical Expressions#NOR NOR Realization
XOR
| x | y | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR
| x | y | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Buffer
| x | f |
|---|---|
| 0 | 0 |
| 1 | 1 |
Tri-State Buffer
- Has one input
, one output , and a control input - If
, then , else if , then the output is high-impedance state (aka logic Z, third state)
| e | x | f |
|---|---|---|
| 0 | 0 | Z |
| 0 | 1 | Z |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Multiple Input Gates
You may see gates with multiple inputs
This is just taking in multiple inputs and combining them with AND
NAND and NOR Equivalency
Recall De Morgan's law.