3.3.10 · D3Combinational Circuits

Worked examples — Parity generators - checkers

2,160 words10 min readBack to topic

This page is a drill. The parent note built the formulas; here we throw every kind of input at them — even data, odd data, all-zeros, all-ones, single flips, double flips, a real transmission story, and an exam-style twist. Follow along, and by the end there is no parity question that can surprise you.

Before anything, two reminders in plain words:

The scenario matrix

Every parity question is one cell of this grid. If we work one example per cell, nothing is left uncovered.

Cell What makes it distinct Covered by
A. Even parity, data has even 1s generator must output Ex 1
B. Even parity, data has odd 1s generator must output Ex 2
C. Odd parity (complement branch) , opposite convention Ex 3
D. Degenerate input: all-zeros edge: no 1s at all Ex 4
E. Degenerate input: all-ones edge: max 1s, count depends on Ex 4
F. Checker, no error must read "OK" Ex 5
G. Checker, single flip (detected) flips → error Ex 6
H. Checker, double flip (blind spot) unchanged → missed Ex 7
I. Real-world word problem keyboard byte over a cable Ex 8
J. Exam twist: parity of a parity / wider word large, mixed convention Ex 9

The map below shows how a bit-vector flows through the same XOR tree at the sender and receiver — the only difference is one extra input at the receiver.

Figure — Parity generators - checkers

Ex 1 — Cell A: even parity, even data

Ex 2 — Cell B: even parity, odd data

Ex 3 — Cell C: odd parity, same data

Ex 4 — Cells D & E: degenerate all-zeros and all-ones

Ex 5 — Cell F: checker, no error

Ex 6 — Cell G: single flip is caught

Ex 7 — Cell H: the double-flip blind spot

Ex 8 — Cell I: a real transmission (word problem)

Ex 9 — Cell J: exam twist (wide word, mixed reasoning)


Recall Which cell does each example prove?

Ex1→A, Ex2→B, Ex3→C, Ex4→D&E, Ex5→F, Ex6→G, Ex7→H, Ex8→I, Ex9→J. Every cell covered.

Recall Odd vs even data under even parity — quick check

Even data → ; odd data → ::: because equals , and tells you if the data count is odd.

Recall Why does the double-flip fool the checker?

Two flips change the 1-count by an even amount, so the parity (and ) is unchanged ::: parity sees only odd/even, not the actual number.

Connections

  • XOR and XNOR gates — every step above is chained XOR / one XNOR.
  • Combinational Circuits — all these examples are memoryless, output depends only on current bits.
  • Error Detection and Correction — Ex 6–8 are the detection story; Ex 7 is its limit.
  • Hamming Codes — the fix for "which bit?" that parity can't answer.
  • Checksums and CRC — stronger successors that catch the double-flip Ex 7 misses.
  • Multiplexers & Adders — other XOR-heavy blocks built the same associative way (Ex 9).