Digital Logic is the foundation of all digital electronic circuits. It uses binary values — 0 (LOW) and 1 (HIGH) — to represent the two voltage states in electronic components. Computers, calculators, and all digital devices are built using digital logic circuits.
Digital logic is based on Boolean Algebra, developed by George Boole, which uses logical operators (AND, OR, NOT) to manipulate binary values.
A Logic Gate is a basic electronic circuit that performs a logical operation on one or more binary inputs and produces a single binary output. Logic gates are the building blocks of all digital systems.
Each gate can be described by:
| A | B | F = A · B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| A | B | F = A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
| A | F = Ā |
|---|---|
| 0 | 1 |
| 1 | 0 |
| A | B | F = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Key fact: NAND outputs LOW (0) only when ALL inputs are HIGH.
| A | B | F = (A+B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Key fact: NOR outputs HIGH (1) only when ALL inputs are LOW.
| A | B | F = A ⊕ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
A Universal Gate is a gate that can be used to implement any Boolean function without needing any other type of gate.
Both NAND and NOR gates are universal gates:
This makes them extremely important in digital circuit design, as manufacturers only need to produce one type of gate.
| Gate | Symbol | Boolean Expression | Output is HIGH when... |
|---|---|---|---|
| AND | · | All inputs are 1 | |
| OR | + | Any input is 1 | |
| NOT | ‾ | Input is 0 | |
| NAND | (·)' | Not all inputs are 1 | |
| NOR | (+)' | All inputs are 0 | |
| XOR | ⊕ | Inputs are different |