# Lecture 3 - Digital Logic

## Practical Details

1. Office hours
2. Textbook chapter on CD: Appendix B
• sections B.1, B.2, B.3, B.7, B.8, B.9, B.10

## Digital Logic

### The Magic of Digital

The operational amplifier

### The Magic of Logic

Many subsequent alternate formulations

• Emil Post: production systems (condition => action)
• Alonzo Church: lambda calculus
• Kleene closures come in here
• Alan Turing

### Combinational Logic

#### Boolean Logic

Laws of thought, discovered/created/formalized by George Boole

• AND (\dot, usually omitted)
• NOT (\turnstyle, overbar more common)
• OR (+)

AND is the easiest to understand: OR, NOT harder

NOT and either AND or OR is enough to produce any Boolean expression

#### Rules of Boolean Algebra

TRUE = 1; FALSE = 0.

1. Excluded middle: NOT NOT X = X
2. Identity: X + 0 = X; X1 = X
3. Zero/one: X + 1 = 1; X0 = 0
4. Idempotence: X+X = X; XX = X
5. Inverse: X + NOT X = 1; (NOT X)X = 0
6. Commutativity: X + Y = Y + X; XY = YX
7. Associativity: (X + Y) + Z = X + (Y + Z); (XY)Z = X(YZ)
8. Distribution: X(Y + Z) = XY + XZ; X + YZ = (X + Y)(X + Z)
9. DeMorgan: NOT ( X + Y) = (NOT X)(NOT Y); NOT (XY) = (NOT X) + (NOT Y)

#### Connection to Abstract Algebra

XOR can stand in for NOT

• x XOR y = (x AND NOT y) OR (NOT x AND y)

Rules of logic are the same as the algebra of Z_2

• {0, 1} with the usual laws of multiplication and addition, modulo 2.
• The only unusual things are
1. Use XOR instead of OR: 1+1=0.
2. NOT is minus: 0-1=1; 1-1=0.

Disjunctive

Conjunctive