Boolean Algebra and Karnaugh Maps
- Boolean Relations
- Duality Relations
- Sum of Products
- Algebraic Simplifications
- Karnaugh Maps:
- Pairs, Quads, Octets
- Simplifications:
- Overlapping
- Redundant
- Rolling
- Don't care outputs
Boolean Relations
- Commutative, Associative, and Distributive
- OR:
- A + 0 = ?
- A + A = ?
- A + 1 = ?
- AND:
- A . 0 = ?
- A . A = ?
- A . 1 = ?
- double negation
- De Morgan's theorems
Duality Relations
- change ORs to ANDs
- change ANDs to ORs
- complement constants (0's and 1's)
- example: apply to A(B + C) = AB + AC
- similar to negative logic
Sum of Products
- given a truth table, we want to design a circuit
- four fundamental products of two inputs:
- Y = (bar(A)) (bar(B))
- Y = (bar(A)) B
- Y = A (bar(B))
- Y = A B
- truth table ("1-output" rows) gives us the fundamental
products that produce a high output -- OR these
- example: XOR = A (bar(B)) | (bar(A)) B
- works for any truth table
Algebraic Simplification
- minimize the number of gate inputs
- example: Y = A (bar(B)) + A B
- example: Y = A B + A C + B D + C D
- in-class exercise: simplify
Y = (bar(A)) (bar(B)) C D + bar {A} B C D + A (bar(B)) bar {C} D
Karnaugh Maps
- Complement and direct on rows, column
Two variables:
Four variables:
| | (bar(C)) (bar(D)) | (bar(C)) D | C D | C (bar(D)) |
|
(bar(A)) (bar(B)) | | | | |
|
(bar(A)) B | | | | |
|
A B | | | | |
|
A (bar(B)) | | | | |
|
|
- Write 1 for the high outputs, 0 for the rest
Pairs, Quads, Octets
- try and group pairs of ones -- the corresponding (direct and complement)
variable can be eliminated
- try and group quads of ones -- the corresponding (direct and complement)
variables can be eliminated
- try and group octets of ones
| | (bar(C)) (bar(D)) | (bar(C)) D | C D | C (bar(D)) |
|
(bar(A)) (bar(B)) | 0 | 1 | 1 | 1 |
|
(bar(A)) B | 0 | 0 | 0 | 1 |
|
A B | 1 | 1 | 0 | 1 |
|
A (bar(B)) | 1 | 1 | 0 | 1 |
|
|
Y = (bar(A)) (bar(B)) D + A (bar(C)) + C (bar(D))
Simplifications
- overlapping (two pairs, quads, octets using the same "1") is fine
- can always non-overlap, but may lead to more complicated equations
- can go "over the edge" of the map ("rolling" the map)
- eliminate redundant groups
Don't care Outputs
- X marks a "don't care" output
- truth table
- what groupings would you do for this map? (bigger groups are
always better).
- how would you implement it using gates?
| | (bar(C)) (bar(D)) | (bar(C)) D | C D | C (bar(D)) |
|
(bar(A)) (bar(B)) | 1 | 0 | 1 | 0 |
|
(bar(A)) B | 1 | 1 | 1 | 0 |
|
A B | X | X | X | X |
|
A (bar(B)) | X | X | X | X |
|
|