3.3.10 · HinglishCombinational Circuits

Parity generators - checkers

1,791 words8 min readRead in English

3.3.10 · Hardware › Combinational Circuits

Ek choti si error-detection scheme: EK extra bit add karo taaki 1s ki count ek rule follow kare. Agar transmission ke dauran ek bit flip ho jaye, toh rule toot jaata hai — aur hum pakad lete hain.

The Core Idea

WHAT is the key operation? — XOR

Chaliye ise derive karte hain. 2-input XOR truth table yaad karo:

0 0 0
0 1 1
1 0 1
1 1 0

exactly tab jab mein 1s ki count odd ho. XORs ko chain karne par yeh preserve hota hai: XOR associative hai, isliye

Figure — Parity generators - checkers

Worked Examples

Common Mistakes

Active Recall

Recall Feynman: explain to a 12-year-old

Socho tum ek secret message bhej rahe ho jo yes/no lights (1s aur 0s) se bani hai. Tum aur tumhara dost agree karte ho: "jo lights ON hain unki count hamesha even honi chahiye." Bhejne se pehle, tum apni ON lights count karte ho — agar odd hai, toh ek extra light on kar do taaki even ho jaye. Tumhara dost jab milta hai toh count karta hai. Agar unhe odd number milta hai, toh unhe pata chal jaata hai ki raaste mein koi light kharaab ho gayi — jaise ek toot hua bulb flickering kare. Yeh nahi bata sakta kaun sa bulb, bas itna ki kuch galat hai. Aur agar DO bulbs toot jaayein, count even rehti hai aur yeh fooled ho jaata hai — yahi iski weakness hai.

Parity naturally kaun sa logic gate compute karta hai?
XOR — iska output 1 hai iff odd number of inputs 1 hain.
Data bits par even-parity generator ka formula?
(saare data bits ka XOR).
Odd-parity generator ka formula?
(saare data bits ka XNOR).
Parity checker apna error signal kaise produce karta hai?
P sameit saare received bits ka XOR: .
Even parity mein, ki kaun si value error matlab hai?
(ek correct even word deta hai).
Ek bit flip kyun detect ho jaata hai?
Yeh 1s ki count se change karta hai, parity flip karta hai aur isliye flip hota hai.
Double-bit errors kyun miss ho jaate hain?
Do flips count ko even amount se change karte hain, original parity restore kar dete hain, toh unchanged rehta hai.
Kya simple parity errors correct kar sakti hai?
Nahi — yeh sirf detect kar sakti hai (odd number of errors); yeh faulty bit locate nahi kar sakti.
Data 101 ke liye even-parity gen?
, toh ; word .
Data 101 ke liye odd-parity gen?
XOR , complement , toh ; word .
Generator aur checker circuit ke beech relationship?
Same XOR tree; checker bas ek -input version hai jo P bhi XOR karta hai.

Connections

  • XOR and XNOR gates — building block; parity chained XOR hai.
  • Combinational Circuits — parity circuits purely combinational hain (koi memory nahi).
  • Error Detection and Correction — parity sabse simple detection scheme hai.
  • Hamming Codes — multiple parity bits ke saath extend karta hai taaki errors locate aur correct ho sakein.
  • Multiplexers & Adders — doosre XOR-heavy combinational blocks.
  • Checksums and CRC — parity ke stronger error-detection successors.

Concept Map

motivates

adds

is the tool for

even convention

odd convention

generated at

generated at

sends word

XORs all bits incl P

flips count by ±1

E flips

Bit flip during transmission

Parity error detection

One extra parity bit

XOR = odd count of 1s

P even = XOR of data bits

P odd = XNOR of data bits

Parity generator

Parity checker

Error signal E

Single-bit error detected