The GATE Grind

GATE 2016 EC – Question 52

Digital Circuits · Combinatorial Circuits · 2 marks · Multiple choice

Identify the circuit below.

A 3:8 decoder with inputs $X_2, X_1, X_0$ has outputs $OP_0$ to $OP_7$ wired to the inputs $IP_0$ to $IP_7$ of an 8:3 encoder with outputs $Y_2, Y_1, Y_0$. The wiring is $OP_0 \to IP_0$, $OP_1 \to IP_1$, $OP_2 \to IP_3$, $OP_3 \to IP_2$, $OP_4 \to IP_6$, $OP_5 \to IP_7$, $OP_6 \to IP_4$ and $OP_7 \to IP_5$.
  1. Binary to Gray code converter
  2. Binary to XS3 converter
  3. Gray to Binary converter
  4. XS3 to Binary converter

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) Binary to Gray code converter

Explanation

Each decoder output that goes high drives one encoder input, and the encoder gives the number of that input. So the circuit maps the input value $x$ to a value $g(x)$: $0 \to 0$, $1 \to 1$, $2 \to 3$, $3 \to 2$, and so on. This shuffling of the numbers matches a Gray code pattern for the first few inputs, but the wiring for 6 and 7 does not exactly match the binary to Gray conversion, which would be $6 \to 5$ and $7 \to 4$. Because of this, the official key awards marks to everyone. Binary to Gray code is the intended answer.