GATE Computer ScienceEasyGATE CS (PYQ pattern)

An 8-bit Gray-to-binary converter computes b_i = g7 ⊕ g6 ⊕ … ⊕ g_i. Built as a ripple chain (b_i = b_(i+1) ⊕ g_i) it uses 7 two-input XOR gates with depth 7. If instead every b_i is computed by its own balanced XOR tree, with no gates shared between outputs, how many 2-input XOR gates are needed and what is the worst-case depth?

  1. A. 28 gates, depth 3
  2. B. 28 gates, depth 4
  3. C. 36 gates, depth 3
  4. D. 7 gates, depth 3

Correct answer: A. 28 gates, depth 3

b_i XORs 8 − i Gray bits, so its tree needs 7 − i gates and depth ⌈log₂(8 − i)⌉. Gate count 0 + 1 + … + 7 = 28; the deepest output, b0 with 8 inputs, has depth 3.

More Digital Logic questions

Exams that ask this topic