Combinational Logic

Combinational Logic vs. Sequential Logic

Representation

Can represent logic with text, circuits, truth tables, or equations.

For example:

Door is ajar if driver door is open OR passenger door is open.

plaintext DoorAjar = DriverDoorOpen OR PassengerDoorOpen

Seat belt light is on if driver seat belt is not fastened OR passenger seat belt is not fastened AND the passenger is present.

```plaintext```
SeatBeltLight = (NOT DriverSeatBeltFastened) OR (NOT PassengerSeatBeltFastened AND PassengerPresent)

Translating Truth Table to Boolean Expressions

Boolean Identities

Identity Description
A + 0 = A Identity
A + A = A Idempotent
A + 1 = 1 Identity
A + A' = 1 Complement
A + B = B + A Commutative
A + (B + C) = (A + B) + C Associative
A(B + C) = AB + AC Distributive
A + AB = A Absorption

Logic Minimalization

It is nice to reduce complexity at the gate level. This allows us to build smaller and faster hardware. We care about...

Generally, simpler boolean expressions lead to smaller transistor networks, and smaller circuit delays/faster hardware.

Type CMOS required
NOT 2
AND 6
OR 6
NAND 4
NOR 4
XOR 8
XNOR 8

You can recreate EVERY gate type using just NAND and NOR (universal gates). e.g. AND = NAND(NAND(A, B))

DeMorgan's Law

NOT(A AND B) = NOT(A) OR NOT(B)
NOT(A OR B) = NOT(A) AND NOT(B)

$$ \overline{A \cdot B} = \overline{A} + \overline{B} $$

$$ \overline{A + B} = \overline{A} \cdot \overline{B} $$

In a circuit, the more general rule is that if you have an AND or OR gate with some inverted terminals, to apply demorgans law, you just change the type of gate (ie AND to OR or OR to AND) and invert the inputs (ie change all the points that are inverted to not inverted and vice versa).