3.1.5 · HinglishBoolean Algebra & Logic Gates

Truth tables construction

1,908 words9 min readRead in English

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:

  1. Inputs gino → rows ki sankhya decide karo .
  2. 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.
  3. Expression ko intermediate columns mein tod do (har gate/sub-expression ke liye ek). Yeh divide-and-conquer trick hai.
  4. Row by row evaluate karo, pehle intermediates bharo, phir final output.
  5. Sanity-check karo row count aur kuch extreme rows (all-0s, all-1s).
Figure — Truth tables construction

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

inputs wale truth table mein kitni rows hoti hain?
Yeh kyun hai aur kyun nahi?
Har input independent hai 2 possible values ke saath, toh choices multiply hoti hain: .
Saare input combinations exactly ek baar list karne ka reliable method kya hai?
se tak binary mein count karo, har number ko bits tak pad karo.
Standard column pattern mein, sabse rightmost input column kaisa vary karta hai?
Yeh har single row pe alternate karta hai.
Evaluate karte waqt correct operator precedence kya hai?
Pehle NOT, phir AND, phir OR.
Table construct karte waqt intermediate columns kyun use karein?
Woh expression ko chhote pieces mein tod dete hain, precedence respect karte hain, aur evaluation errors kam karte hain.
Do alag circuits same truth table produce karte hain — kya conclude kar sakte ho?
Woh logically equivalent hain (same function perform karte hain).
ka output column inputs (00,01,10,11) ke liye do.
0,0,0,1
XOR ka output column (00,01,10,11) ke liye do.
0,1,1,0 (1 jab inputs alag hon).
4-input function ke liye kitni rows?
.

Concept Map

captured by

lists

each 2 values

multiplication principle

recurrence R n = 2 R n-1

listed by

guarantees

split into

divide and conquer

same table means

verified by

Digital circuit promise

Truth table

Every input combination

n inputs

2^n rows

Count in binary 0 to 2^n-1

Complete no repeats

Intermediate gate columns

Final output value

Logically identical circuits

Sanity-check extreme rows