Every question from the five uploaded exam papers — fully worked with flashbacks, K-Map grids, QMC tables, and examiner tips. Authored by Dr. Sohel Rana.
A digital circuit processes binary inputs (0s and 1s) to produce binary outputs. There are two big families: Combinational (no memory) and Sequential (has memory/flip-flops).
A Combinational Logic Circuit is a digital circuit where the output at any instant depends ONLY on the current inputs — NOT on any past inputs or stored state. There is no memory element (no flip-flops, no latches).
| Circuit | What it Does | Real-Life Use |
|---|---|---|
| Adder (Half/Full) | Adds binary numbers | ALU inside every CPU |
| Subtractor | Subtracts binary numbers | Calculator arithmetic |
| Multiplexer (MUX) | Selects one of many inputs | Cable TV channel selector |
| Demultiplexer (DEMUX) | Routes one input to many outputs | Data routing in networks |
| Encoder / Decoder | Converts between codes | Keyboard, 7-segment display |
| Comparator | Compares two binary numbers | Password match checking |
A Canonical SOP is a Sum of Products where every product term contains ALL variables — either normal (A) or complemented (A'). These complete product terms are called minterms.
Given: Y = A'B + B'C + A' + AC (3 variables: A, B, C)
A' + A'BY = A' + B'C + ACTerm 1: A' — missing B and C
Term 2: B'C — missing A
Term 3: AC — missing B
All minterms: m₀, m₁, m₁, m₂, m₃, m₅, m₅, m₇ → Remove duplicates:
Rows and columns use Gray Code: 00 → 01 → 11 → 10. Adjacent cells differ by exactly 1 bit. The K-Map wraps around (left↔right, top↔bottom).
Place 1 in each minterm cell: 0,1,2,3,5,7,8,9,11,14
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 1 | 1 |
| 01 | 0 | 1 | 1 | 0 |
| 11 | 0 | 0 | 0 | 1 |
| 10 | 1 | 1 | 1 | 0 |
| Group | Cells (minterms) | Size | A | B | C | D | Term |
|---|---|---|---|---|---|---|---|
| G1 | m0,m1,m2,m3,m8,m9 + wrap | 8 | changes | 0 | changes | changes | B' |
| G2 | m5, m7 | 2 | 0 | 1 | changes | 1 | A'BD |
| G3 | m14 | 1 | 1 | 1 | 1 | 0 | ABCD' |
| G4 | m3, m11 (wrap) | 2 | changes | 0 | 1 | 1 | B'CD |
For more than 4 variables, a K-Map becomes a 3D structure represented as multiple 2D grids stacked side by side.
Size: 2⁵ = 32 cells
Structure: Two 4×4 grids (E=0 and E=1). Variables: A, B, C, D, E.
Axes: Rows = AB (Gray Code: 00,01,11,10), Columns = CD (Gray Code: 00,01,11,10), Layers = E (0 or 1)
Mirror Rule: Cells that are mirror images across the center line of the two grids are adjacent!
Size: 2⁶ = 64 cells
Structure: Four 4×4 grids (EF = 00, 01, 11, 10).
Axes: Same AB/CD axes, but now 4 layers for EF combinations.
Mirror Rule: Adjacency exists across grids if the EF variable pair is in Gray Code order.
| Grid | Variable E | Cells | Row/Col labels |
|---|---|---|---|
| Left grid | E = 0 | m₀ – m₁₅ | AB (rows) × CD (cols), Gray Code |
| Right grid | E = 1 | m₁₆ – m₃₁ | Same AB × CD layout |
| Mirror cells (e.g. m₀ and m₁₆) are adjacent even though they are in different grids! | |||
QMC is a tabular/algorithmic method for Boolean minimization. It works for any number of variables (unlike K-Maps, which are impractical beyond 5–6 variables). It produces the same result as K-Map but systematically.
Minterms: Y = Σm(0,1,3,7,8,9,11,15) — 4 variables: A,B,C,D
| Minterm | A | B | C | D | Group (# of 1s) |
|---|---|---|---|---|---|
| m₀ | 0 | 0 | 0 | 0 | Group 0 |
| m₁ | 0 | 0 | 0 | 1 | Group 1 |
| m₈ | 1 | 0 | 0 | 0 | Group 1 |
| m₃ | 0 | 0 | 1 | 1 | Group 2 |
| m₉ | 1 | 0 | 0 | 1 | Group 2 |
| m₇ | 0 | 1 | 1 | 1 | Group 3 |
| m₁₁ | 1 | 0 | 1 | 1 | Group 3 |
| m₁₅ | 1 | 1 | 1 | 1 | Group 4 |
| Pair | A | B | C | D | Implicant | Covered? |
|---|---|---|---|---|---|---|
| (0,1) | 0 | 0 | 0 | — | A'B'C' | ✓ |
| (0,8) | — | 0 | 0 | 0 | B'C'D' | ✓ |
| (1,3) | 0 | 0 | — | 1 | A'B'D | ✓ |
| (1,9) | — | 0 | 0 | 1 | B'C'D | ✓ |
| (3,7) | 0 | — | 1 | 1 | A'CD | ✓ |
| (3,11) | — | 0 | 1 | 1 | B'CD | ✓ |
| (8,9) | 1 | 0 | 0 | — | AB'C' | ✓ |
| (7,15) | — | 1 | 1 | 1 | BCD | ✓ |
| (9,11) | 1 | 0 | — | 1 | AB'D | ✓ |
| (11,15) | 1 | — | 1 | 1 | ACD | ✓ |
| Quad | A | B | C | D | Prime Implicant |
|---|---|---|---|---|---|
| (0,1,8,9) | — | 0 | 0 | — | B'C' |
| (1,3,9,11) | — | 0 | — | 1 | B'D |
| (3,7,11,15) | — | — | 1 | 1 | CD |
| PI | Expression | m₀ | m₁ | m₃ | m₇ | m₈ | m₉ | m₁₁ | m₁₅ | Essential? |
|---|---|---|---|---|---|---|---|---|---|---|
| PI₁ | B'C' | ✓ | ✓ | — | — | ✓ | ✓ | — | — | YES (covers m₀,m₈) |
| PI₂ | B'D | — | ✓ | ✓ | — | — | ✓ | ✓ | — | YES (covers m₃,m₁₁) |
| PI₃ | CD | — | — | ✓ | ✓ | — | — | ✓ | ✓ | YES (covers m₇,m₁₅) |
When a function is given as ΠM (Product of Maxterms), the listed numbers are the positions where the output = 0. To minimize using K-Map, group the 0s instead of 1s, and complement each term.
Maxterms (output=0): 4,5,6,7,8,12 | Don't-cares: 1,2,3,9,11,14 | Minterms (output=1): 0,10,13,15
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | X | X | X |
| 01 | 0 | 0 | 0 | 0 |
| 11 | 0 | 1 | 1 | X |
| 10 | 0 | X | X | 1 |
| Group | Cells (0s) | A | B | C | D | Sum Term (POS) |
|---|---|---|---|---|---|---|
| G1 | m4,5,6,7,12 (+ X helps) | changes | 1 | changes | changes | (B') → in POS: (B') |
| G2 | m8 (wrap with X) | 1 | 0 | 0 | 0 | AB'C'D' → (A'+B+C+D) |
| Representation | Form | Example (2 vars) | Usage |
|---|---|---|---|
| Truth Table | Exhaustive input/output listing | All 4 rows for A,B | Verification, initial specification |
| Boolean Expression | Algebraic form | Y = AB + A'B' | Manipulation, simplification |
| Canonical SOP | Sum of all minterms where Y=1 | Σm(0,3) | Standard form, K-Map input |
| Canonical POS | Product of all maxterms where Y=0 | ΠM(1,2) | Standard form, alternate minimization |
| Logic Diagram | Schematic with gate symbols | AND/OR gate drawing | Circuit implementation |
| Timing Diagram | Waveform over time | Signal waveforms | Simulation, analysis |
Maxterms (0s): 4,5,6,7,12,13 | Don't-cares: 2,3 | Minterms (1s): 0,1,8,9,10,11,14,15
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | X | X |
| 01 | 0 | 0 | 0 | 0 |
| 11 | 0 | 0 | 1 | 1 |
| 10 | 1 | 1 | 1 | 1 |
| Group | Cells | Size | Variable Analysis | Term |
|---|---|---|---|---|
| G1 | m0,1,8,9,10,11,14,15 (+ X at m2,3) | 8 + X | A=changes, B=0 for m0,1,8,9; B=1 for m10,11,14,15; C=changes; D=changes → B changes, but using X: Rows AB=00 + AB=10: B=0 always across these rows | B' |
| G2 | m14,15 (+m12,13 = 0 but we skip) | Consider: m8,9,10,11,14,15 | A=1, B changes(0→1), C changes, D changes → A constant, others change. But AB=10 and AB=11: B changes → need smaller group | A (if 8-cell group with AB=10+11 rows → but m12,13 are 0) |
Function: Y = Σm(0,1,3,5,7,11,15) — 4 variables: A,B,C,D
| Minterm | A B C D | Group |
|---|---|---|
| m₀ | 0 0 0 0 | 0 |
| m₁ | 0 0 0 1 | 1 |
| m₃ | 0 0 1 1 | 2 |
| m₅ | 0 1 0 1 | 2 |
| m₇ | 0 1 1 1 | 3 |
| m₁₁ | 1 0 1 1 | 3 |
| m₁₅ | 1 1 1 1 | 4 |
| Pair | A B C D | PI | Used? |
|---|---|---|---|
| (0,1) | 0 0 0 — | A'B'C' | ✓ |
| (1,3) | 0 0 — 1 | A'B'D | ✓ |
| (1,5) | 0 — 0 1 | A'C'D | ✓ |
| (3,7) | 0 — 1 1 | A'CD | ✓ |
| (3,11) | — 0 1 1 | B'CD | ✓ |
| (5,7) | 0 1 — 1 | A'BD | ✓ |
| (7,15) | — 1 1 1 | BCD | ✓ |
| (11,15) | 1 — 1 1 | ACD | ✓ |
| Quad | A B C D | Prime Implicant |
|---|---|---|
| (1,3,5,7) | 0 — — 1 | A'D |
| (3,7,11,15) | — — 1 1 | CD |
| PI | m₀ | m₁ | m₃ | m₅ | m₇ | m₁₁ | m₁₅ | Essential? |
|---|---|---|---|---|---|---|---|---|
A'B'C' | ✓ | ✓ | — | — | — | — | — | YES (m₀ only here) |
A'D | — | ✓ | ✓ | ✓ | ✓ | — | — | YES (covers m₅) |
CD | — | — | ✓ | — | ✓ | ✓ | ✓ | YES (m₁₁ only here) |
| Feature | Combinational Circuit | Sequential Circuit |
|---|---|---|
| Memory | ❌ No memory | ✅ Has memory (flip-flops) |
| Output depends on | Current inputs ONLY | Current inputs + Past state |
| Clock | Not needed | Usually required |
| Feedback | No feedback paths | Feedback from output to input |
| Design complexity | Simpler | More complex |
| Examples | Adder, MUX, Encoder | Counter, Register, RAM |
| Basic equation | Y = f(inputs) | Y = f(inputs, state); Next state = g(inputs, state) |
| Real life analogy | Calculator (shows result immediately) | ATM (remembers your balance) |
A 5-variable K-Map consists of two 4×4 grids placed side by side. The left grid has E=0 (minterms 0–15), the right grid has E=1 (minterms 16–31). Cells that are mirror images across the center are adjacent!
Maxterms (0s): 0,1,2,3,5,7,18,20,30,31 | Don't-cares: 8,9,11,14,21 | All others = 1
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 m0 |
0 m1 |
0 m3 |
0 m2 |
| 01 | 1 m4 |
0 m5 |
0 m7 |
1 m6 |
| 11 | X m8 |
X m9 |
X m11 |
X m14→wait |
| 10 | 1 m12 |
1 m13 |
X m15 |
X m14 |
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 m16 |
1 m17 |
1 m19 |
0 m18 |
| 01 | 0 m20 |
X m21 |
1 m23 |
1 m22 |
| 11 | 1 m24 |
1 m25 |
1 m27 |
1 m26 |
| 10 | 1 m28 |
1 m29 |
0 m31 |
0 m30 |
| Group | Cells | E | A | B | C | D | Term |
|---|---|---|---|---|---|---|---|
| G1 (Left AB=00 rows) | m0,1,2,3 (0s — not group) | These are 0s — skip for SOP | |||||
| G2 | m4,m6 (left) + m20,m22? No — m20=0 | Use don't-cares: m4,m6,m12,m14(X) → AB=01,10 with CD=00,10 | |||||
| G3 (cross-grid) | m24,25,26,27,28,29 + others | 1 | 1 | 1 | changes | changes | ABE |
| G4 | m16,17,19 + m0,1,3 (0s, skip) | m16,17,19: A=0,B=0,E=1 with CD changing except 10 → terms | |||||
| Minterm | A B C D | 1s Count |
|---|---|---|
| m₀ | 0000 | 0 |
| m₁ | 0001 | 1 |
| m₈ | 1000 | 1 |
| m₃ | 0011 | 2 |
| m₅ | 0101 | 2 |
| m₆ | 0110 | 2 |
| m₉ | 1001 | 2 |
| m₇ | 0111 | 3 |
| m₁₁ | 1011 | 3 |
| m₁₄ | 1110 | 3 |
| m₁₅ | 1111 | 4 |
| Pair | Binary | Implicant |
|---|---|---|
| (0,1) | 000— | A'B'C' |
| (0,8) | —000 | B'C'D' |
| (1,3) | 00—1 | A'B'D |
| (1,5) | 0—01 | A'C'D |
| (1,9) | —001 | B'C'D |
| (3,7) | 0—11 | A'CD |
| (3,11) | —011 | B'CD |
| (5,7) | 01—1 | A'BD |
| (6,7) | 011— | A'BC |
| (6,14) | —110 | BCD' |
| (7,15) | —111 | BCD |
| (8,9) | 100— | AB'C' |
| (9,11) | 10—1 | AB'D |
| (11,15) | 1—11 | ACD |
| (14,15) | 111— | ABC |
| Quad | Binary | Prime Implicant | Essential? |
|---|---|---|---|
| (0,1,8,9) | —00— | B'C' | YES (covers m₀) |
| (1,3,5,7) | 0——1 | A'D | YES (covers m₅) |
| (3,7,11,15) | ——11 | CD | YES (covers m₁₁) |
| (6,7,14,15) | —11— | BC | YES (covers m₆,m₁₄) |
Commutative: A ⊕ B = B ⊕ A (order doesn't matter)
Associative: (A ⊕ B) ⊕ C = A ⊕ (B ⊕ C) (grouping doesn't matter)
NAND expression: A NAND B = (AB)'
Check: B NAND A = (BA)' = (AB)' = A NAND B ✓ (because multiplication is commutative: AB = BA)
NOR expression: A NOR B = (A+B)'
Check: B NOR A = (B+A)' = (A+B)' = A NOR B ✓ (because addition is commutative: A+B = B+A)
We need to show: (A NAND B) NAND C ≠ A NAND (B NAND C)
Let A=1, B=1, C=0:
(A NAND B) NAND CA NAND (B NAND C)Since 1 ≠ 0, we have proved NAND is NOT Associative.
Let A=1, B=0, C=0:
(A NOR B) NOR CA NOR (B NOR C)Since 1 ≠ 0, NOR is NOT Associative.
Canonical POS = every sum term must contain ALL variables (either normal or complemented). These are Maxterms. Method: add missing variables using X = X + YY' = X + (Y·Y') ... actually use: X = X + Y·Y' is FALSE. Correct: X = X + 0 = X + Y·Y' is the identity since Y·Y'=0. So: to expand a sum term, multiply by (X+X') which equals 1, then distribute.
Given: Y = (A+B)(A+C)(B+C̄) — 3 variables: A, B, C
Term 1: (A+B) — missing C
Term 2: (A+C) — missing B
Term 3: (B+C̄) = (B+C') — missing A
All: M₀, M₁ (from Term 1) + M₀, M₂ (from Term 2) + M₁, M₅ (from Term 3)
Unique maxterms: {M₀, M₁, M₂, M₅}
Maxterms (0s): 4,6,10,12,13,15 | Minterms (1s): 0,1,2,3,5,7,8,9,11,14
| AB\CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 1 | 1 |
| 01 | 0 | 1 | 1 | 0 |
| 11 | 0 | 0 | 0 | 0 |
| 10 | 1 | 1 | 1 | 0 |
| Group | Cells | A | B | C | D | Term |
|---|---|---|---|---|---|---|
| G1 | m0,1,2,3,8,9,10,11 (wrap top+bottom rows AB=00 & AB=10) | changes | 0 | changes | changes | B' |
| G2 | m5, m7 | 0 | 1 | changes | 1 | A'BD |
| G3 | m14 (isolated, need to verify) | 1 | 0 | 1 | 0 | AB'CD' |
| Paper | Part | Topic | Final Answer |
|---|---|---|---|
| P1 | b | Canonical SOP | Y = Σm(0,1,2,3,5,7) |
| P1 | c | 4-var K-Map SOP | f = B' + A'BD + B'CD + ABCD' |
| P2 | b | QMC (4-var) | Y = B'C' + B'D + CD |
| P2 | c | K-Map POS (Maxterms) | f = B' · (A'+B+C+D) |
| P3 | b | K-Map with DC (Maxterms) | f = B' + ACD + ABD |
| P3 | c | QMC (4-var) | Y = A'B'C' + A'D + CD |
| P4 | c | QMC (4-var) | Y = B'C' + A'D + CD + BC |
| P5 | a | NAND/NOR properties | Both Commutative ✓, Neither Associative ✗ |
| P5 | b | Canonical POS | Y = ΠM(0,1,2,5) |
| P5 | c | 4-var K-Map (Maxterms) | f = B' + A'BD + AB'CD' |