Neural Sync Active
Boolean Algebra and K-Maps
Registry Synced
Boolean Algebra and K-Maps
862 words
4 min read
Reading compass
Now · 🎯 Learning Objectives
Boolean Algebra and K-Maps
🎯 Learning Objectives
- Apply Boolean algebra laws to simplify expressions
- Use K-maps for 2, 3, and 4 variable minimization
- Handle don't-care conditions in K-maps
- Implement minimized expressions with logic gates
1. Boolean Algebra Laws
| Law | Expression |
|---|---|
| Identity | A + 0 = A, A · 1 = A |
| Complement | A + Ā = 1, A · Ā = 0 |
| Idempotent | A + A = A, A · A = A |
| Dominance | A + 1 = 1, A · 0 = 0 |
| Absorption | A + AB = A, A(A + B) = A |
| De Morgan | (A + B)̄ = Ā · B̄, (AB)̄ = Ā + B̄ |
| Distributive | A(B + C) = AB + AC |
| Consensus | AB + ĀC + BC = AB + ĀC |
2. K-Map Simplification
2.1 2-Variable K-Map
F(A, B) = ĀB̄ + ĀB + AB
| A\B | 0 | 1 |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 0 | 1 |
Groups: Ā (both cells in row 0), B (cells B=1) Result: F = Ā + B
2.2 3-Variable K-Map
F(A, B, C) = Σm(0, 1, 2, 5, 7)
| AB\C | 0 | 1 |
|---|---|---|
| 00 | 1 | 1 |
| 01 | 1 | 0 |
| 11 | 0 | 1 |
| 10 | 0 | 1 |
Groups:
- m0+m1 (C=0, AB=00+01): pulls in ĀB̄C̄+ĀB̄... Wait, let me redo. Better: 3-variable K-map Gray code order:
| BC\A | 0 | 1 |
|---|---|---|
| 00 | 1 | 0 (m0, m4) |
| 01 | 1 | 1 (m1, m5) |
| 11 | 0 | 1 (m3, m7) |
| 10 | 1 | 0 (m2, m6) |
Groups:
- Ā: m0, m1, m2 = Σ(0,1,2) (all in A=0 column except... wait, A=0 includes rows 00,01,11,10 for BC). Actually m0(000)=1, m1(001)=1, m2(010)=0, m3(011)=0. So Ā doesn't cover all — m2 is 0.
- Let me redo the function: F = Σ(0,1,5,7) = m0 + m1 + m5 + m7
| BC\A | 0 | 1 |
|---|---|---|
| 00 | 1 | 0 |
| 01 | 1 | 0 |
| 11 | 0 | 1 |
| 10 | 0 | 1 |
Groups:
- ĀB̄: m0 + m1 = ĀB̄
- AC: m5 + m7 = AC Result: F = ĀB̄ + AC
2.3 4-Variable K-Map
F(A, B, C, D) = Σm(0, 2, 3, 5, 7, 8, 10, 11, 13, 15)
| CD\AB | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 1 |
| 01 | 0 | 1 | 1 | 0 |
| 11 | 1 | 1 | 1 | 1 |
| 10 | 1 | 0 | 0 | 1 |
Groups:
- Corners: m0, m2, m8, m10 = B̄D̄
- Center 2×2: m5, m7, m13, m15 = BD
- m3, m11 = ĀCD Wait, m3=0011=3, yes. m11=1011=11, yes. ĀCD? A=0,C=1,D=1 → m3. A=1,C=1,D=1 → m11. So A variable differs → can't combine as ĀCD. Actually CD=11 with B varying: m3(A=0,B=1,C=1,D=1), m11(A=1,B=1,C=1,D=1). That gives BD? No — B=1,D=1 and C=1 both times. So it's BCD for both. But we can also combine m3 with m2 (0010) for ĀC̄D... wait. Let me simplify: F = B̄D̄ + BD + CD Check: B̄D̄ covers m0, m2, m8, m10. BD covers m5, m7, m13, m15. CD covers m3, m7, m11, m15. Total unique minterms: 0,2,3,5,7,8,10,11,13,15 = matches! ✓
3. Don't-Care Conditions
Don't-cares (X) can be assigned 0 or 1 to form larger groups.
Example: F(A,B,C,D) = Σm(1,3,7,11,15) + d(0,2,5)
| CD\AB | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | 0 | 0 | X |
| 01 | 1 | X | 0 | 0 |
| 11 | 1 | 1 | 1 | 0 |
| 10 | 0 | 0 | 0 | 0 |
Using X at m0,m2 (ĀB̄C̄) gives group: ĀB̄. Using X at m5 gives group: BD. Result: F = ĀB̄ + BD
4. Common Pitfalls
Pitfall: Wrong Group Sizes in K-Map
The mistake: Creating groups of 3, 5, or 6 cells.
Correct approach: Groups must be powers of 2 (1, 2, 4, 8, 16) and rectangular. Groups of 3 are invalid — they don't correspond to any single product term.
5. Key Concepts Reference
| Concept | Description |
|---|---|
| Literal | Variable or its complement |
| Minterm | Product of all variables (AND) |
| Implicant | Product term covering minterms |
| Prime implicant | Implicant not contained in larger one |
| Essential prime implicant | Covers a minterm no other PI covers |
| Don't care | Output doesn't matter for this input |
6. 📝 Practice Questions
Q1: Simplify F = ĀB̄C + ĀBC + ABC + AB̄C using Boolean algebra.Answer: F = ĀC(B̄+B) + AC(B+B̄) F = ĀC(1) + AC(1) F = C(Ā + A) = CSo F = C — only depends on C, not A or B! Q2: Use K-map: F = Σm(0, 1, 4, 5, 6, 7) for F(A, B, C).Answer:
| BC\A | 0 | 1 |
|---|---|---|
| 00 | 1 | 1 |
| 01 | 1 | 1 |
| 11 | 0 | 1 |
| 10 | 0 | 1 |
Groups: B̄ (m0+m1+m4+m5=all where B=0), A (m4+m5+m6+m7=all where A=1) Result: F = B̄ + A = A + B̄ Q3: Apply De Morgan's: F = (A + BC)̄Answer: (A + BC)̄ = Ā · (BC)̄ = Ā · (B̄ + C̄) = ĀB̄ + ĀC̄ Q4: Simplify using K-map with don't-cares: F = Σm(2,3,7,9) + d(0,1,10,11,15) for F(A,B,C,D).Answer: Don't-cares allow large groups. All ones and don't-cares can be grouped: Corners m0,m2,m8,m10 (using d0,d10) = B̄D̄. m3,m7,m11,m15 (using d11,d15) = CD. m9 = 1001 = ĀC̄D? Wait, m9=1001: A=1,B=0,C=0,D=1. Using d10(1010),d11(1011), we get group with m9,m11 for AD. F = B̄D̄ + CD + AD.Actually let me be more careful. F = B̄D̄ + CD (using d0,d2,d10 for B̄D̄, d11,d15 for CD, and maybe more). The expression F = B̄D̄ + CD covers m2,m3,m7,m9? m9=1001 is not covered by B̄D̄ (B=0,D=1 → B≠0) or CD (C=0,D=1 → C≠1). So m9 needs separate term: m9 = AB̄C̄D = ĀB̄C̄D? No, m9 has A=1, B=0, C=0, D=1. Using d10(1010) = AB̄CD̄ and d11(1011) = AB̄CD, we get group A B̄ D covers m9,m11. So F = B̄D̄ + CD + AB̄D.
7. 🔗 Cross-References
- Week 1 - Digital Logic Basics: Logic gates
- Week 2 - Combinational Circuits: Logic minimization
- Week 3 - Sequential Circuits: State minimization Join Discord PreviousDigital Logic BasicsNextCombinational Circuits