Truth tables construction
3.1.5· Hardware › Boolean Algebra & Logic Gates
Truth table kya hota hai? (KYA)
KYUN? Har input independently 2 values le sakta hai (0 ya 1). independent inputs ke saath, multiplication principle se combinations ki sankhya hai
HOW banayein — recipe
Step-by-step method:
- Inputs gino → rows ki sankhya decide karo .
- Input columns banao. Ek reliable pattern (standard convention): sabse right wala column alternate karta hai; uske baad wala column pairs mein alternate karta hai; uske baad fours mein ; wagera. Left se column = MSB.
- Expression ko intermediate columns mein tod do (har gate/sub-expression ke liye ek). Yeh divide-and-conquer trick hai.
- Row by row evaluate karo, pehle intermediates bharo, phir final output.
- Sanity-check karo row count aur kuch extreme rows (all-0s, all-1s).

Worked example 1 — (AND), 2 inputs
KYUN yahan se shuru karein: 2 inputs → rows. AND sirf tab 1 output deta hai jab dono 1 hon.
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
- Yeh step (rows) kyun: , toh exactly 4 rows — na zyada, na kam.
- Pattern kyun: right column ; left column → saare 4 combos ek baar aate hain.
- Outputs kyun: AND = "sab true", toh sirf last row (dono 1) se 1 milta hai.
Worked example 2 — , 2 inputs
Hum ek intermediate column (NOT A) introduce karte hain, phir use ke saath OR karte hain.
| 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
- column kyun: hum expression ka andar wala hissa pehle compute karte hain taaki final OR trivial ho jaaye (Feynman: chhota piece solve karo, phir combine karo).
- Row 3 = 0 kyun: , aur , toh . Baaki har row mein kam se kam ek 1 hai, toh OR 1 deta hai.
- Insight: yeh table material implication se identical hai. Same table ⇒ logically same function.
Worked example 3 — 3 inputs:
KYUN: 3 inputs → rows. Hum do intermediate columns use karte hain: aur .
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
- Column ordering kyun: (rightmost) har row toggle karta hai; har 2 pe; har 4 pe. Saare 8 combos guarantee hote hain.
- Last row = 1 kyun: , toh OR 1 hai chahe ho.
- Row 2 = 0 kyun: aur (kyunki ) → .
- 80/20 takeaway: jab ek baar intermediate columns banana aa jaaye, toh koi bhi expression mechanical ho jaata hai.
Common mistakes (Steel-man + fix)
Active recall
Recall Answers cover karo aur khud test karo
- inputs ke liye kitni rows? → .
- kyun aur kyun nahi? → independent inputs choices multiply karte hain.
- Kya guarantee karta hai ki tum har combination ek baar list karo? → binary mein tak count karna.
- Complex expression evaluate karne ka sabse safe tarika kya hai? → intermediate columns banao, NOT→AND→OR.
- Do circuits ka same truth table hai — iska kya matlab hai? → woh logically equivalent hain.
Recall Feynman: 12-saal ke bachche ko samjhao
Socho ek light hai jo kuch switches ke hisaab se on hoti hai. Ek truth table simply har tarike ki ek list hai jisme tum switches flip kar sakte ho, aur har tarike ke liye batata hai: kya light ON hai ya OFF? Yeh make sure karne ke liye ki koi switch-pattern miss na ho, tum "0,1,2,3…" count karte ho lekin robot ke counting system (binary) mein, jahan digits sirf 0 aur 1 hoti hain. Har count = ek row. Phir tum har row ke liye rule check karte ho aur ON (1) ya OFF (0) likhte ho. Yahi poora magic hai — koi guessing nahi, sab kuch list hai.
Connections
- Logic Gates AND OR NOT — har gate ek chhota truth table define karta hai jise tum combine karte ho.
- Boolean Algebra Laws — prove hote hain yeh dikhake ki do expressions ek truth table share karte hain.
- Sum of Products (SOP) — un rows se directly padho jahan output = 1 hai.
- Karnaugh Maps — ek truth table jo simplification ke liye grid ke roop mein redraw ki gayi hai.
- Binary Number System — woh counting jo input rows generate karti hai.
- Combinational Logic Circuits — woh physical cheez jo ek truth table describe karti hai.