IAE Academy

GATE 2022 CS Q.40: solution and answer

GATE 2022 · CSQ.40 · 2 marks · MCQ

Consider a digital display system (DDS) shown in the figure that displays the contents of register X. A 16-bit code word is used to load a word in X, either from S or from R. S is a 1024-word memory segment and R is a 32-word register file. Based on the value of mode bit M, T selects an input word to load in X. P and Q interface with the corresponding bits in the code word to choose the addressed word. Which one of the following represents the functionality of P, Q, and T?

GATE 2022 CS question 40: A box labelled 'Code Word' is split into three adjacent fields from left to right: M, S-address (wide) and R-address (wide).Tap to open full size
Figure from the GATE 2022 CS paper. It is part of the question.
Figure description

A box labelled 'Code Word' is split into three adjacent fields from left to right: M, S-address (wide) and R-address (wide). An arrow goes from the S-address field down into block P. An arrow goes from the R-address field down into block Q. The output of P goes (via an elbow line) down into block S (a tall box). The output of Q goes (via an elbow line) down into block R (a tall box). Block S and block R each have an arrow going down into block T (a wide box). The M field has a line running down and then right into T as a control input. The output of T goes down into register X (a box), drawn beside a box labelled DDS.

  1. (A)

    P is 10:1 multiplexer; Q is 5:1 multiplexer; T is 2:1 multiplexer

  2. (B)

    P is 10:2^10 decoder; Q is 5:2^5 decoder; T is 2:1 encoder

  3. (C)

    P is 10:2^10 decoder; Q is 5:2^5 decoder; T is 2:1 multiplexer

  4. (D)

    P is 1:10 de-multiplexer; Q is 1:5 de-multiplexer; T is 2:1 multiplexer

Answer and solution

ANSWER

Option C: P is a decoder, Q is a decoder and T is a multiplexer.

Official answer: CSource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. S has words, so addressing one word needs 10 bits: the S-address field is 10 bits wide.

  2. R has words, so addressing one word needs 5 bits: the R-address field is 5 bits wide. With the mode bit M this gives bits, matching the 16-bit code word.

  3. P takes the 10 address bits and must select exactly one of the words of S. A decoder turns an -bit code into one of select lines, so P is a decoder.

  4. Likewise Q takes 5 address bits and selects one of the words of R, so Q is a decoder.

  5. T has two data inputs (the word from S and the word from R), one output going to X, and the single control bit M. Choosing one of two inputs under one select line is a multiplexer.

  6. P and Q only turn address bits into word-select lines; no data word passes through them. A or multiplexer would output a single bit and could not select a word, and a or de-multiplexer has one data input and takes only a one-bit input, not a 10-bit or 5-bit address. So options A and D are wrong.

  7. An encoder does the reverse of a decoder (many lines to a binary code), so it cannot choose between two data words: option B is wrong. The answer is C.

KEY IDEA

Address bits to word-select lines is a decoder (). Choosing one of two data words under a control bit is a multiplexer. The widths follow from of the word counts: and .

WATCH OUT FOR

Calling P and Q multiplexers because they "select" a word. A multiplexer selects among data inputs and produces one bit per output, while here the address bits must activate one of many word lines, which is a decoder's job. Another slip is picking an encoder for T, but an encoder converts one active line into a code and cannot choose between two data words.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 18 Combinational questions, with notes

More Combinational questions