# CS251 - Computer Organization and Design - Spring 2008

# Lecture 3 - Digital Logic

## Practical Details

- Office hours
- 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

Whitehead and Russell

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.

- Excluded middle: NOT NOT X = X
- Identity: X + 0 = X; X1 = X
- Zero/one: X + 1 = 1; X0 = 0
- Idempotence: X+X = X; XX = X
- Inverse: X + NOT X = 1; (NOT X)X = 0
- Commutativity: X + Y = Y + X; XY = YX
- Associativity: (X + Y) + Z = X + (Y + Z); (XY)Z = X(YZ)
- Distribution: X(Y + Z) = XY + XZ; X + YZ = (X + Y)(X + Z)
- 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
- Use XOR instead of OR: 1+1=0.
- NOT is minus: 0-1=1; 1-1=0.

#### Truth Tables

#### Normal Forms

Disjunctive

Conjunctive

#### Pictures of Gates

## Transistors

Return to: