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

Question 5(a)

5 marks

Computer ScienceISC 2020 Computer Science Paper 1DrawingComputer Hardware

Draw the following.

Draw the logic circuit diagram for an octal to binary encoder and explain its working when a…

Draw the logic circuit diagram for an octal to binary encoder and explain its working when a particular digit is pressed. Also, state the difference between encoders and decoders.

Draw: Logic circuit diagram of an octal to binary encoder

Must show: inputs D0 to D7, outputs A, B, C

Answer

Answer

Octal to binary encoder: it has 8 input lines $D_0$ to $D_7$ (one for each octal digit, only one is 1 at a time) and 3 output lines $A_2 A_1 A_0$ giving the binary code of the digit pressed. Truth table: $D_0 \to 000$, $D_1 \to 001$, $D_2 \to 010$, $D_3 \to 011$, $D_4 \to 100$, $D_5 \to 101$, $D_6 \to 110$, $D_7 \to 111$. From it: $A_2 = D_4 + D_5 + D_6 + D_7$, $A_1 = D_2 + D_3 + D_6 + D_7$, $A_0 = D_1 + D_3 + D_5 + D_7$. Each output is a 4-input OR gate. $D_0$ needs no connection: when it is pressed all three outputs stay 0. Working: when a digit is pressed, only its input line becomes 1 and it feeds those OR gates whose equation contains it. For example, pressing 6 makes $D_6 = 1$; $D_6$ feeds the OR gates for $A_2$ and $A_1$ but not $A_0$, so $A_2 A_1 A_0 = 110$, the binary of 6. Pressing 5 gives $D_5 = 1$, which feeds $A_2$ and $A_0$, so the output is 101. Difference: an encoder converts $2^n$ input lines (only one active) into an n-bit binary code (many inputs to few outputs, built with OR gates). A decoder does the reverse: it converts an n-bit binary input into one of $2^n$ output lines, activating exactly one output (few inputs to many outputs, built with AND gates).
Diagram for this answer