Computer Architechure Lesson 3 Basic
Computer Architechure Lesson 3 Basic
Yahi system hai Boolean Algebra — jo 1854 mein George Boole ne banaya tha.
Exam Fact: Boolean Algebra was invented by George Boole in 1854. Yeh almost
har exam mein pucha jaata hai!
Real-life analogy: Soch, tere ghar mein ek room ka darwaza kholne ke liye dono
locks ka key chahiye. Agar dono keys hain (1 AND 1) — darwaza khulega (1).
Agar ek bhi key missing hai — darwaza band (0).
Definition: AND Gate ka output 1 hota hai SIRF jab ALL inputs 1 hon.
A ───┐
│ AND
B ───┤────── Y = A · B (ya A AND B)
│
Symbol:
A ──────┐
|D──── Y = A · B
B ──────┘
┌─────┬─────┬───────────┐
│ A │ B │ Y = A · B │
├─────┼─────┼───────────┤
│ 0 │ 0 │ 0 │
│ 0 │ 1 │ 0 │
│ 1 │ 0 │ 0 │
│ 1 │ 1 │ 1 │ ← Sirf yahi 1 hai
└─────┴─────┴───────────┘
Exam Point: AND gate mein output 1 hota hai ONLY when ALL inputs are 1.
Trick: AND = "sab 1 ho toh 1, warna 0" — bahut strict hai, ek bhi 0 aaya toh
output 0. ⭐⭐ Identity: A · 1 = A and A · 0 = 0
3.2 — OR GATE
Real-life analogy: Soch ek room mein 2 doors hain. Agar koi bhi ek door khula
ho, toh tu room mein ja sakta hai. Sirf jab dono band hon, toh nahi ja sakta.
Definition: OR Gate ka output 1 hota hai jab koi bhi ek ya zyada inputs 1 hon.
A ──────\
)──── Y = A + B
B ──────/
┌─────┬─────┬───────────┐
│ A │ B │ Y = A + B │
├─────┼─────┼───────────┤
│ 0 │ 0 │ 0 │ ← Sirf yahi 0 hai
│ 0 │ 1 │ 1 │
│ 1 │ 0 │ 1 │
│ 1 │ 1 │ 1 │
└─────┴─────┴───────────┘
Exam Point: OR gate mein output 0 hota hai ONLY when ALL inputs are 0.
Trick: OR = "koi bhi 1 ho toh 1" — bahut lenient hai. ⭐⭐ Identity: A + 0 = A
and A + 1 = 1
Real-life analogy: Yeh ek ulta mirror hai. Jo bhi input de — output uska
opposite aata hai. 0 diya → 1 aaya. 1 diya → 0 aaya.
Definition: NOT Gate input ko invert (ulta) karta hai. Single input gate hai.
Truth Table:
┌─────┬──────────┐
│ A │ Y = A' │
├─────┼──────────┤
│ 0 │ 1 │
│ 1 │ 0 │
└─────┴──────────┘
Exam Point: NOT gate is the only single-input gate. Baaki sab minimum 2-
input hain. NOT ko represent karte hain: A' ya Ā (A-bar) ya ¬A ⭐⭐ Double
NOT: (A')' = A (double inversion = original)
┌──────────┬─────────────┬───────────────┬──────────────────────────┐
│ Gate │ Notation │ Output = 1 │ Output = 0 │
│ │ │ When? │ When? │
├──────────┼─────────────┼───────────────┼──────────────────────────┤
│ AND │ A · B │ ALL inputs=1 │ ANY input=0 │
│ OR │ A + B │ ANY input=1 │ ALL inputs=0 │
│ NOT │ A' / Ā │ Input = 0 │ Input = 1 │
├──────────┼─────────────┼───────────────┼──────────────────────────┤
│ Inputs │ AND=2+ │ OR=2+ │ NOT=1 (only single-input)│
└──────────┴─────────────┴───────────────┴──────────────────────────┘
Real-life analogy: NAND = AND ka ulta bhai. Jahan AND 1 bolta, NAND 0 bolta.
Jahan AND 0 bolta, NAND 1 bolta.
Definition: NAND = NOT of AND. Output 0 hota hai ONLY when ALL inputs 1 hon.
Baaki sab cases mein 1.
Symbol:
A ──────┐
|D──○── Y = (A · B)' = NOT(A AND B)
B ──────┘
Truth Table:
┌─────┬─────┬──────────────┐
│ A │ B │ Y = (A·B)' │
├─────┼─────┼──────────────┤
│ 0 │ 0 │ 1 │
│ 0 │ 1 │ 1 │
│ 1 │ 0 │ 1 │
│ 1 │ 1 │ 0 │ ← Sirf yahi 0 hai
└─────┴─────┴──────────────┘
NAND = AND ki EXACTLY opposite truth table Trick: NAND mein sirf "1,1 →
0", baaki sab 1.
Definition: NOR = NOT of OR. Output 1 hota hai ONLY when ALL inputs 0 hon.
Symbol:
A ──────\
)──○── Y = (A + B)' = NOT(A OR B)
B ──────/
Truth Table:
┌─────┬─────┬──────────────┐
│ A │ B │ Y = (A+B)' │
├─────┼─────┼──────────────┤
│ 0 │ 0 │ 1 │ ← Sirf yahi 1 hai
│ 0 │ 1 │ 0 │
│ 1 │ 0 │ 0 │
│ 1 │ 1 │ 0 │
└─────┴─────┴──────────────┘
NOR = OR ki EXACTLY opposite truth table Trick: NOR mein sirf "0,0 → 1",
baaki sab 0.
Real-life analogy: Jaise LEGO blocks se tu koi bhi shape bana sakta hai — car,
house, robot — waise hi NAND ya NOR gate se tu koi bhi doosra gate (AND, OR,
NOT, XOR, XNOR) bana sakta hai!
SUPER IMPORTANT EXAM FACT: NAND and NOR are called Universal Gates
because ANY Boolean function can be implemented using ONLY NAND gates or ONLY
NOR gates.
3) OR from NAND:
A ──┬──┐
|D──○── A' ──┐
A ──┘ |D──○── A+B ✅
B ──┬──┐ │
|D──○── B' ──┘
B ──┘
2) OR from NOR:
NOR(A,B) → then NOT using NOR = (A+B)'' = A+B ✅
Two NOR gates.
3) AND from NOR:
NOR(A,A)=A', NOR(B,B)=B', then NOR(A',B') = (A'+B')' = A·B ✅
Three NOR gates (uses De Morgan's)
Exam mein seedha puchte hain: "Minimum NAND gates to implement AND?" → 2
"Minimum NAND gates to implement OR?" → 3 "Minimum NOR gates to implement OR?"
→ 2 "Minimum NOR gates to implement AND?" → 3
┌─────────────────┬──────────────────┬──────────────────┐
│ Gate to Make │ Using NAND only │ Using NOR only │
├─────────────────┼──────────────────┼──────────────────┤
│ NOT │ 1 │ 1 │
│ AND │ 2 │ 3 │
│ OR │ 3 │ 2 │
│ XOR │ 4 │ 5 │
│ XNOR │ 5 │ 4 │
└─────────────────┴──────────────────┴──────────────────┘
Pattern dekh: NAND se AND banana easy (2), OR mushkil (3). NOR se OR easy
(2), AND mushkil (3). Yeh logic hai kyunki NAND = NOT-AND, NOR = NOT-OR.
Real-life analogy: Soch do dost hain — ek hi party mein sirf ek ja sakta hai.
Dono jaye ya dono na jaye — toh output 0. Sirf ek jaye — output 1. "Exclusive"
matlab "sirf ek ko choose karo."
Definition: XOR gate ka output 1 hota hai jab inputs DIFFERENT (alag) hon. Jab
SAME hon toh output 0.
A ──────\
⊕)──── Y = A ⊕ B (XOR symbol = ⊕)
B ──────/
Truth Table:
┌─────┬─────┬─────────────┐
│ A │ B │ Y = A ⊕ B │
├─────┼─────┼─────────────┤
│ 0 │ 0 │ 0 │ ← Same → 0
│ 0 │ 1 │ 1 │ ← Different → 1
│ 1 │ 0 │ 1 │ ← Different → 1
│ 1 │ 1 │ 0 │ ← Same → 0
└─────┴─────┴─────────────┘
XOR = "Odd number of 1s" detector Trick: XOR — "Different = 1, Same = 0"
⭐⭐ XOR is used in: Half Adder, Parity Checker, Parity Generator, Error
Detection
Real-life analogy: XNOR = XOR ka ulta. Yeh "equality checker" hai. Dono same
hain → 1. Dono different hain → 0.
Definition: XNOR gate ka output 1 hota hai jab inputs SAME hon. Jab DIFFERENT
hon toh 0.
A ──────\
⊕)──○── Y = (A ⊕ B)' = A⊙B
B ──────/
Truth Table:
┌─────┬─────┬──────────────┐
│ A │ B │ Y = A ⊙ B │
├─────┼─────┼──────────────┤
│ 0 │ 0 │ 1 │ ← Same → 1
│ 0 │ 1 │ 0 │ ← Different → 0
│ 1 │ 0 │ 0 │ ← Different → 0
│ 1 │ 1 │ 1 │ ← Same → 1
└─────┴─────┴──────────────┘
┌────────┬────────────────┬─────────────────┬───────────────────┐
│ Gate │ Output = 1 │ Output = 0 │ Use Case │
├────────┼────────────────┼─────────────────┼───────────────────┤
│ XOR │ Inputs DIFFER │ Inputs SAME │ Adder, Parity │
│ XNOR │ Inputs SAME │ Inputs DIFFER │ Equality checker │
├────────┼────────────────┼─────────────────┼───────────────────┤
│ │ XOR & XNOR are COMPLEMENTS of each other │
└────────┴────────────────┴─────────────────┴───────────────────┘
┌─────┬────────────────────┬───────────────────────┬────────────────────────┐
│ No. │ LAW NAME │ AND Form │ OR Form │
├─────┼────────────────────┼───────────────────────┼────────────────────────┤
│ 1 │ Identity Law │ A · 1 = A │ A + 0 = A │
│ 2 │ Null/Dominance Law │ A · 0 = 0 │ A + 1 = 1 │
│ 3 │ Idempotent Law │ A · A = A │ A + A = A │
│ 4 │ Complement Law │ A · A' = 0 │ A + A' = 1 │
│ 5 │ Commutative Law │ A · B = B · A │ A + B = B + A │
│ 6 │ Associative Law │ (A·B)·C = A·(B·C) │ (A+B)+C = A+(B+C) │
│ 7 │ Distributive Law │ A·(B+C) = A·B + A·C │ A+(B·C) = (A+B)·(A+C) │
│ 8 │ Absorption Law │ A·(A+B) = A │ A + A·B = A │
│ 9 │ Involution Law │ (A')' = A │ (double NOT = original)│
│ 10 │ De Morgan's Law 1 │ (A·B)' = A' + B' │ (Break AND, flip to OR)│
│ 11 │ De Morgan's Law 2 │ (A+B)' = A' · B' │ (Break OR, flip to AND)│
└─────┴────────────────────┴───────────────────────┴────────────────────────┘
┌──────────────────────────────────────────┐
│ A + A'B = A + B (Redundancy Law) │
│ A'+ AB = A'+ B (Redundancy Law) │
│ A(A'+B) = AB (Simplification) │
│ A ⊕ 0 = A │
│ A ⊕ 1 = A' │
│ A ⊕ A = 0 │
│ A ⊕ A' = 1 │
│ A ⊕ B = A'B + AB' │
│ A ⊙ B = AB + A'B' (XNOR) │
└──────────────────────────────────────────┘
Soch aise: "Dono nahi aaye" (NOR) = "Pehla nahi aaya AND doosra nahi aaya"
⭐⭐⭐ Two Theorems:
┌─────────────────────────────────────────────────────────┐
│ │
│ THEOREM 1: (A · B)' = A' + B' │
│ │
│ "NOT of AND = OR of NOTs" │
│ "Break the AND, change to OR, invert each variable" │
│ │
│──────────────────────────────────────────────────────── │
│ │
│ THEOREM 2: (A + B)' = A' · B' │
│ │
│ "NOT of OR = AND of NOTs" │
│ "Break the OR, change to AND, invert each variable" │
│ │
└─────────────────────────────────────────────────────────┘
Memory Trick: "Break the line, change the sign" Jab bar (NOT) todke neeche
laao → AND ↔ OR badal jaata hai, aur har variable pe individually NOT lag
jaata hai.
Q: Simplify (A·B·C)' = ? A: A' + B' + C' ✅ (Break AND, change to OR, invert
each)
F = AB + AB'
= A(B + B') ← Factor out A (Distributive)
= A(1) ← Complement Law: B + B' = 1
= A ← Identity Law: A·1 = A ✅
Example 2: Simplify F = A + AB
F = A + AB
= A(1 + B) ← Factor out A
= A(1) ← Null Law: 1 + B = 1
= A ← This is Absorption Law ✅
F = (A + B)(A + B')
= A·A + A·B' + B·A + B·B' ← Distribute
= A + AB' + AB + 0 ← A·A=A, B·B'=0
= A + A(B' + B) ← Factor
= A + A(1)
= A + A
= A ✅
Jaise address likhne ka ek standard format hota hai (Name, Street, City, PIN),
waise Boolean expression likhne ke bhi 2 standard formats hain — SOP aur POS.
┌──────────────────────────────────────────────────────┐
│ If F = Σm(1,3,5,7) for 3 variables (0 to 7) │
│ Then F = ΠM(0,2,4,6) │
│ │
│ RULE: Minterms NOT in SOP → become Maxterms of POS │
│ (Just take the REMAINING numbers) │
└──────────────────────────────────────────────────────┘
Structure:
B
0 1
┌─────┬─────┐
A 0 │ m₀ │ m₁ │ m₀ = A'B' m₁ = A'B
├─────┼─────┤
1 │ m₂ │ m₃ │ m₂ = AB' m₃ = AB
└─────┴─────┘
B
0 1
┌─────┬─────┐
A 0 │ 0 │ 1 │ (m₁)
├─────┼─────┤
1 │ 1 │ 1 │ (m₂, m₃)
└─────┴─────┘
B
0 1
┌─────┬─────┐
A 0 │ 0 │ [1] │ ← Group1 (vertical pair)
├─────┼─────┤
1 │ [1] │ [1] │ ← Group2 (horizontal pair)
└─────┴─────┘
Step 3: F = A + B ✅
BC
00 01 11 10 ← GRAY CODE! (not 00,01,10,11)
┌─────┬─────┬─────┬─────┐
A 0 │ m₀ │ m₁ │ m₃ │ m₂ │
├─────┼─────┼─────┼─────┤
1 │ m₄ │ m₅ │ m₇ │ m₆ │
└─────┴─────┴─────┴─────┘
CRITICAL: Column order is 00, 01, 11, 10 (Gray Code — sirf ek bit change
hoti hai). Students yahan GALTI karte hain exam mein! 10 aur 11 ka position
swap hai compared to normal binary!
Minterm positions:
BC
00 01 11 10
┌─────┬─────┬─────┬─────┐
A 0 │ 1 │ 0 │ 0 │ 1 │ m₀, m₂
├─────┼─────┼─────┼─────┤
1 │ 1 │ 1 │ 0 │ 1 │ m₄, m₅, m₆
└─────┴─────┴─────┴─────┘
Structure:
CD
00 01 11 10 ← Gray Code
┌──────┬──────┬──────┬──────┐
AB 00 │ m₀ │ m₁ │ m₃ │ m₂ │
├──────┼──────┼──────┼──────┤
01 │ m₄ │ m₅ │ m₇ │ m₆ │
├──────┼──────┼──────┼──────┤
11 │ m₁₂ │ m₁₃ │ m₁₅ │ m₁₄ │
├──────┼──────┼──────┼──────┤
10 │ m₈ │ m₉ │ m₁₁ │ m₁₀ │
└──────┴──────┴──────┴──────┘
Both rows AND columns follow Gray Code! Row order: 00, 01, 11, 10 (NOT 00,
01, 10, 11)
┌──────────────────────────────────────────────────────────┐
│ RULE 1: Groups must have 1, 2, 4, 8, 16 cells │
│ (ONLY powers of 2) │
│ │
│ RULE 2: Groups must be RECTANGULAR (no L-shape, no │
│ diagonal, no irregular shapes) │
│ │
│ RULE 3: Larger groups = simpler expression │
│ (always make the BIGGEST possible group) │
│ │
│ RULE 4: Every 1 must be covered by at least one group │
│ │
│ RULE 5: Groups CAN OVERLAP (same 1 in multiple groups) │
│ │
│ RULE 6: K-Map WRAPS AROUND: │
│ - Left edge connects to Right edge │
│ - Top edge connects to Bottom edge │
│ - All 4 corners are adjacent! │
│ │
│ RULE 7: 0s are NEVER included in groups │
│ │
│ RULE 8: Fewer groups = better (minimize total groups) │
└──────────────────────────────────────────────────────────┘
┌────────────┬──────────────────────────────────────┐
│ Group Size │ Variables that DROP OUT │
├────────────┼──────────────────────────────────────┤
│ 1 cell │ No variable drops → 4 variables │
│ 2 cells │ 1 variable drops → 3 variables │
│ 4 cells │ 2 variables drop → 2 variables │
│ 8 cells │ 3 variables drop → 1 variable │
│ 16 cells │ All drop → F = 1 (always true) │
└────────────┴──────────────────────────────────────┘
CD
00 01 11 10
┌──────┬──────┬──────┬──────┐
AB 00 │ 1 │ 1 │ 0 │ 1 │ m₀,m₁,m₂
├──────┼──────┼──────┼──────┤
01 │ 1 │ 1 │ 0 │ 1 │ m₄,m₅,m₆
├──────┼──────┼──────┼──────┤
11 │ 1 │ 1 │ 0 │ 1 │ m₁₂,m₁₃,m₁₄
├──────┼──────┼──────┼──────┤
10 │ 1 │ 1 │ 0 │ 0 │ m₈,m₉
└──────┴──────┴──────┴──────┘
Step 2: Grouping
Group 1 (8-cell): Column CD=00 (all 4 rows) + Column CD=01 (all 4 rows)
→ m₀,m₁,m₄,m₅,m₈,m₉,m₁₂,m₁₃
These 8 cells: A changes, B changes, C=0 constant, D changes
Wait — let me check: CD columns 00 and 01 → C=0 in both, D changes.
Actually: CD=00 → C=0,D=0 and CD=01 → C=0,D=1. So C=0 always, D changes.
A changes (all rows), B changes (all rows).
→ Group 1 = C' (only C stays constant at 0)
Group 2 (4-cell): m₂,m₆,m₁₄,m₁₀... wait m₁₀ is 0.
Let me recheck: m₂(0010)=1, m₆(0110)=1, m₁₄(1110)=1, m₁₀(1010)=0
So column CD=10 has: 1,1,1,0 (row 10 is 0)
Group 2 (4-cell, wrapping): m₂, m₆, m₁₄, m₁₀ → but m₁₀=0. Can't use.
Better approach:
Group 2 (quad, wrap-around): m₀,m₂,m₄,m₆ → CD=00 and CD=10 in rows 00,01
Wait these are already covered by Group 1 (m₀,m₄ are in Group1).
OK let me simplify. The remaining uncovered cells after Group 1 (C') are:
m₂, m₆, m₁₄ (in column CD=10, except m₁₀ which is 0)
Group 2: m₂+m₆ pair in col CD=10, rows 00,01 → A'CD' (but wait, let me keep it simpler)
F(A,B,C,D) = Σm(0,1,2,5,8,9,10)
CD
00 01 11 10
┌──────┬──────┬──────┬──────┐
AB 00 │ 1 │ 1 │ 0 │ 1 │ m₀,m₁,m₂
├──────┼──────┼──────┼──────┤
01 │ 0 │ 1 │ 0 │ 0 │ m₅
├──────┼──────┼──────┼──────┤
11 │ 0 │ 0 │ 0 │ 0 │
├──────┼──────┼──────┼──────┤
10 │ 1 │ 1 │ 0 │ 1 │ m₈,m₉,m₁₀
└──────┴──────┴──────┴──────┘
Groups:
Group 1 (Quad, wrap-around rows 00+10, cols 00+01):
m₀, m₁, m₈, m₉
A:0,0,1,1→changes; B:0,0,0,0→B'=constant; C:0,0,0,0→C'...
wait: m₀=0000, m₁=0001, m₈=1000, m₉=1001
A changes, B=0 always, C=0 always, D changes → B'C'
OK this is also getting complicated for a teaching example. Let me use a simpler classic one.
CD
00 01 11 10
┌──────┬──────┬──────┬──────┐
AB 00 │ 1 │ 1 │ 1 │ 0 │ m₀, m₁, m₃
├──────┼──────┼──────┼──────┤
01 │ 0 │ 1 │ 1 │ 0 │ m₅, m₇
├──────┼──────┼──────┼──────┤
11 │ 0 │ 1 │ 1 │ 0 │ m₁₃, m₁₅
├──────┼──────┼──────┼──────┤
10 │ 1 │ 1 │ 1 │ 0 │ m₈, m₉, m₁₁
└──────┴──────┴──────┴──────┘
F = D + B'C'D' ✅
Real-life analogy: Kabhi kabhi kuch input combinations possible hi nahi hoti
(jaise BCD mein 1010 to 1111). In impossible cases mein output se koi farak
nahi padta — "don't care" hai. K-Map mein inhe X se mark karte hain aur
grouping mein convenience ke liye 1 ya 0 maan lete hain.
┌───────────────────────────────────────────────────┐
│ Don't Care (X): │
│ • Mark as X in K-Map │
│ • Can be treated as 1 OR 0 for grouping │
│ • Use as 1 if it helps make a BIGGER group │
│ • Use as 0 if it doesn't help │
│ • Notation: d(2,5,7) means don't care at 2,5,7 │
└───────────────────────────────────────────────────┘
⭐ Half Adder & Full Adder (Preview — Digital Circuits chapter se link)
┌─────────────────────────────────────────────────────┐
│ HALF ADDER: │
│ Sum = A ⊕ B (XOR gate) │
│ Carry = A · B (AND gate) │
│ Uses: 1 XOR + 1 AND gate │
│ │
│ FULL ADDER: │
│ Sum = A ⊕ B ⊕ Cin │
│ Carry = AB + BCin + ACin │
│ Uses: 2 XOR + 2 AND + 1 OR gate │
└─────────────────────────────────────────────────────┘
Half Adder aur Full Adder mein XOR gate kaafi important role play karta hai
— yeh cross-link yaad rakh Digital Circuits topic ke liye.
┌─────────────────────────────────────────────────────┐
│ DUAL: Replace AND↔OR, replace 0↔1. │
│ Variables remain SAME. │
│ │
│ COMPLEMENT: Replace AND↔OR, replace 0↔1, │
│ AND complement EACH variable (A→A', B→B') │
│ │
│ Example: │
│ F = AB + C │
│ Dual(F) = (A+B) · C │
│ Complement(F) = (A'+B') · C' │
└─────────────────────────────────────────────────────┘
PHASE 13 — COMPLETE FORMULA SHEET
╔══════════════════════════════════════════════════════════════╗
║ BOOLEAN ALGEBRA — FORMULA SHEET ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ BASIC OPERATIONS: ║
║ AND: A · B OR: A + B NOT: A' / Ā ║
║ ║
║ IDENTITY: A·1 = A A+0 = A ║
║ NULL/DOMINANCE: A·0 = 0 A+1 = 1 ║
║ IDEMPOTENT: A·A = A A+A = A ║
║ COMPLEMENT: A·A'= 0 A+A'= 1 ║
║ INVOLUTION: (A')' = A ║
║ COMMUTATIVE: A·B = B·A A+B = B+A ║
║ ASSOCIATIVE: (AB)C=A(BC) (A+B)+C=A+(B+C) ║
║ DISTRIBUTIVE: A(B+C)=AB+AC A+BC=(A+B)(A+C) ║
║ ABSORPTION: A(A+B)=A A+AB=A ║
║ REDUNDANCY: A+A'B=A+B A'(A+B)=A'B ║
║ ║
║ DE MORGAN'S: ║
║ (A·B)' = A'+B' (A+B)' = A'·B' ║
║ ║
║ XOR: A⊕B = A'B+AB' XNOR: A⊙B = AB+A'B' ║
║ A⊕0=A A⊕1=A' A⊕A=0 A⊕A'=1 ║
║ ║
║ K-MAP GROUP SIZES: ║
║ 2-var: max 4 cells 3-var: max 8 4-var: max 16 ║
║ Groups must be powers of 2: 1,2,4,8,16 ║
║ ║
║ MINTERMS & MAXTERMS: ║
║ n variables → 2ⁿ minterms/maxterms ║
║ F(SOP) = Σm(...) ↔ F(POS) = ΠM(remaining) ║
║ ║
║ GATE COUNTS: ║
║ Total gates: 7 (AND,OR,NOT,NAND,NOR,XOR,XNOR) ║
║ Basic: 3 Universal: 2 Special: 2 ║
║ NAND gates for AND=2, OR=3, NOT=1 ║
║ NOR gates for OR=2, AND=3, NOT=1 ║
║ ║
║ HALF ADDER: Sum=A⊕B, Carry=A·B ║
║ FULL ADDER: Sum=A⊕B⊕Cin, Carry=AB+BCin+ACin ║
║ ║
╚══════════════════════════════════════════════════════════════╝
Q1. Boolean Algebra was developed by: (a) Claude Shannon (b) George Boole (c)
Maurice Karnaugh (d) Augustus De Morgan ✅ (b) George Boole
Q2. Which of the following is a Universal Gate? (a) AND (b) OR (c) XOR (d)
NAND ✅ (d) NAND — NAND and NOR are universal gates.
Q3. The output of AND gate is 1 only when: (a) Any input is 1 (b) All inputs
are 0 (c) All inputs are 1 (d) Any input is 0 ✅ (c) All inputs are 1
Q4. NOT gate is also called: (a) Buffer (b) Inverter (c) Amplifier (d)
Converter ✅ (b) Inverter
Q5. The complement of (A + B) according to De Morgan's theorem is: (a) A' + B'
(b) A · B (c) A' · B' (d) (AB)' ✅ (c) A' · B'
Q8. How many minimum NAND gates are needed to implement an OR gate? (a) 1 (b)
2 (c) 3 (d) 4 ✅ (c) 3
Q9. XNOR gate output is 1 when: (a) Inputs are different (b) Inputs are same
(c) All inputs are 1 (d) All inputs are 0 ✅ (b) Inputs are same
Q10. Karnaugh Map was introduced by: (a) George Boole (b) Claude Shannon (c)
Maurice Karnaugh (d) De Morgan ✅ (c) Maurice Karnaugh
Q11. In K-Map, the column ordering follows: (a) Binary sequence (b) Octal
sequence (c) Gray Code (d) ASCII Code ✅ (c) Gray Code
Q12. Simplify: A + A'B = ? (a) A (b) B (c) A + B (d) AB ✅ (c) A + B
(Redundancy Law)
Q13. Which gate acts as an equality detector? (a) XOR (b) XNOR (c) NAND (d)
NOR ✅ (b) XNOR
Q14. The maximum number of groups in a 4-variable K-Map is: (a) 4 (b) 8 (c) 16
(d) 32 ✅ (c) 16 (2⁴ = 16 cells)
Q17. How many minterms exist for 3 variables? (a) 3 (b) 6 (c) 8 (d) 16 ✅ (c)
8 (2³ = 8)
Q18. Which law states A + AB = A? (a) Identity (b) Commutative (c) Absorption
(d) Distributive ✅ (c) Absorption Law
Q19. NOR gate is equivalent to: (a) OR + NOT (b) AND + NOT (c) OR followed by
NOT (d) NOT followed by OR ✅ (c) OR followed by NOT — NOR = NOT(A OR B)
Q20. In a K-Map, don't care conditions are represented by: (a) 0 (b) 1 (c) X
(d) D ✅ (c) X (also sometimes 'd')
Q21. The dual of expression AB + C is: (a) A'B' + C' (b) (A+B)·C (c) (A+B)+C
(d) A'B'C' ✅ (b) (A+B)·C — Swap AND↔OR, variables stay same.
Q22. Total number of logic gates is: (a) 3 (b) 5 (c) 7 (d) 9 ✅ (c) 7 — AND,
OR, NOT, NAND, NOR, XOR, XNOR
Q23. XOR gate is used in which circuit? (a) Multiplexer (b) Decoder (c) Half
Adder (d) Flip-Flop ✅ (c) Half Adder (Sum = A ⊕ B)
Q24. (A')' = ? (a) 0 (b) 1 (c) A (d) A' ✅ (c) A — Involution Law (double NOT
cancels)
Q25. If F = Σm(1,3,5,7) for 3 variables, the POS form is: (a) ΠM(1,3,5,7) (b)
ΠM(0,2,4,6) (c) Σm(0,2,4,6) (d) ΠM(0,1,2,3) ✅ (b) ΠM(0,2,4,6) — Remaining
numbers from 0-7 not in SOP.