Sub topic 2
Boolean Algebra, Logic Gates and Duality
Prerequisites and the Boolean model
Assume you can represent binary values and understand basic AND, OR, and NOT operations. This chapter uses Boolean algebra to describe and simplify digital circuits.
A Boolean variable has only two values:
0means false or low voltage.1means true or high voltage.
The main Boolean operators are:
| Operator | Notation | Meaning | Gate behavior |
|---|---|---|---|
| AND | `A · B` or `AB` | 1 only when both inputs are 1 | Both switches must be on |
| OR | `A + B` | 1 when at least one input is 1 | Either switch can be on |
| NOT | `A'` or `¬A` | Inverts the input | 0 becomes 1 and 1 becomes 0 |
The precedence is NOT first, then AND, then OR. Thus, A + BC' means A + (B · (C')).
Important Boolean laws
These laws let you transform an expression without changing its output.
| Law | Expression |
|---|---|
| Identity | `A + 0 = A`, `A · 1 = A` |
| Null or domination | `A + 1 = 1`, `A · 0 = 0` |
| Idempotent | `A + A = A`, `A · A = A` |
| Complement | `A + A' = 1`, `A · A' = 0` |
| Involution | `(A')' = A` |
| Absorption | `A + AB = A`, `A(A + B) = A` |
| Distributive | `A(B + C) = AB + AC` |
Boolean OR and AND are commutative and associative:
A + B = B + AAB = BA(A + B) + C = A + (B + C)(AB)C = A(BC)
The absorption law is especially useful. For example:
A + AB = A(1 + B) = A · 1 = A
The term AB adds no new case because whenever AB is 1, A is already 1.
De Morgan's laws
De Morgan's laws move a complement across an expression:
(A + B)' = A'B'(AB)' = A' + B'
The first law changes OR into AND and complements every input. The second changes AND into OR and also complements every input.
For example, a circuit that produces (A + B)' can be replaced by an AND gate receiving A' and B'.
Duality
The dual of a valid Boolean expression is formed by swapping:
- OR,
+, with AND,· 0with1
Variables and complements remain unchanged.
For example, the identity law A + 0 = A has the dual A · 1 = A. The complement law A + A' = 1 has the dual A · A' = 0.
Duality gives a second valid result whenever one Boolean identity is known. It does not mean that the original expression and its dual have the same value. It means that the dual is also a valid Boolean identity.
module basic_logic(
input wire a,
input wire b,
output wire y_and,
output wire y_or,
output wire y_not
);
assign y_and = a & b;
assign y_or = a | b;
assign y_not = ~a;
endmoduleExercise
Simplify the Boolean expression F = A + A'B.
Show answer
Apply the identity X + YZ = (X + Y)(X + Z), or use A + A'B = (A + A')(A + B) = 1(A + B) = A + B.