Class 12 Computer Science Notes: Boolean Algebra (Chapter 1)
Master Chapter 1 of Class 12 Computer Science. Understand Boolean laws, De Morgan's theorems, K-map minimisation, logic gates, and the most common exam errors with this complete guide.
Students who learn Boolean algebra after arithmetic keep importing rules that do not apply. The most important difference:
- Arithmetic: A + A = 2A
- Boolean: A + A = A
- Arithmetic: A × A = A²
- Boolean: A · A = A
Variables in Boolean algebra can only be 0 or 1. Every identity must be understood in this binary context.
2. Fundamental Boolean Laws
| Law | AND form | OR form |
|---|---|---|
| Identity | A · 1 = A | A + 0 = A |
| Null | A · 0 = 0 | A + 1 = 1 |
| Idempotent | A · A = A | A + A = A |
| Complement | A · A' = 0 | A + A' = 1 |
| Involution | (A')' = A | — |
De Morgan's Theorems — The Two Rules Students Reverse
First Theorem: (A + B)' = A' · B'
Second Theorem: (A · B)' = A' + B'
Memory Aid: When you move the bar inside, the operation flips (AND ↔ OR), and each variable gets its own bar.
Students most often make errors on the second theorem — writing (A · B)' = A' · B' instead of A' + B'.
3. Order of Operations
AND has higher precedence than OR, just as multiplication has priority over addition.
So: A + B·C = A + (B·C), not (A + B)·C. These two expressions have completely different truth tables. Failing to apply this rule is a guaranteed source of errors in simplification questions.
4. Karnaugh Map (K-Map) Rules
- Groups must be powers of 2: 1, 2, 4, or 8 cells only. Never groups of 3, 5, or 6.
- Groups must be rectangular (including wrapping around edges).
- Groups should be as large as possible.
- Every 1 in the map must be covered by at least one group.
- Choose the fewest groups that cover all 1s.
⚠️ Watch Out! — Invalid K-Map Groups
The most common K-map error is forming a group of 3 cells or 6 cells, which are not powers of 2 and therefore invalid.
Also, students miss corner groupings — the four corners of a 4×4 K-map form a valid group of 4 that many students overlook.
5. Logic Gate Quick Reference
| Gate | Symbol Expression | Output is 1 when... |
|---|---|---|
| AND | A · B | Both A and B are 1 |
| OR | A + B | At least one of A, B is 1 |
| NOT | A' | A is 0 |
| NAND | (A · B)' | Not both A and B are 1 |
| NOR | (A + B)' | Both A and B are 0 |
| XOR | A ⊕ B | A and B are different |
Universal gates: NAND and NOR are called universal gates because any Boolean function can be implemented using only NAND gates (or only NOR gates).
Practice Questions (PYQs)
- State De Morgan's theorems. Verify the second theorem using a truth table for A = 1, B = 0.
- Simplify: F = AB + AB' + A'B using Boolean algebra. Show all steps.
- Draw the K-map for F(A,B,C,D) = Σ(0,1,3,5,6,7,10,14,15) and find the minimal SOP expression.
- Why are NAND and NOR called universal gates? Implement an OR gate using only NAND gates.
- Convert the expression F = (A + B')(A' + C) into its canonical Sum of Products (SOP) form.