Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 5(i)

5 marks

Computer ScienceISC 2023 Computer Science Paper 1Long answerComputer Hardware

Answer the following.

What is an encoder? How is it different from a decoder? Draw the logic circuit for a 4:1…

What is an encoder? How is it different from a decoder? Draw the logic circuit for a 4:1 multiplexer and explain its working.

Answer

Answer

Encoder: a combinational circuit that converts one of $2^n$ active input lines into an n-bit binary code (e.g. octal to binary encoder: 8 inputs, 3 outputs). Difference: an encoder has $2^n$ inputs and n outputs and converts a signal into a code, while a decoder does the reverse: it has n inputs and $2^n$ outputs and activates the one output line selected by the n-bit input code. 4:1 multiplexer: it has four data inputs $I_0, I_1, I_2, I_3$, two select lines $S_1, S_0$ and one output Y. $Y = S_1'S_0'I_0 + S_1'S_0I_1 + S_1S_0'I_2 + S_1S_0I_3$ Working: the select lines choose which input is passed to the output.
$S_1$$S_0$Y
00$I_0$
01$I_1$
10$I_2$
11$I_3$
Only the AND gate whose select combination matches is enabled, so the output Y equals the selected data input.
Diagram for this answer