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

Question 5(a)

5 marks

Computer ScienceISC 2020 Specimen Computer Science Paper 1DrawingComputer Hardware

Draw the following.

Draw the logic diagram and truth table to encode the decimal numbers (2, 3, 5, 7, 8) and briefly…

Draw the logic diagram and truth table to encode the decimal numbers (2, 3, 5, 7, 8) and briefly explain its working.

Draw: Logic diagram and truth table of an encoder for the decimal numbers 2, 3, 5, 7, 8

Answer

Answer

Encoder for the decimal digits 2, 3, 5, 7 and 8: it has 5 input lines $D_2, D_3, D_5, D_7, D_8$ (only one is 1 at a time, when that digit is pressed) and 4 output lines $W X Y Z$ that give its BCD (8-4-2-1) code. Truth table:
DigitD2D3D5D7D8WXYZ
2100000010
3010000011
5001000101
7000100111
8000011000
From the table: $W = D_8$ (the $D_8$ line is taken directly as W), $X = D_5 + D_7$, $Y = D_2 + D_3 + D_7$, $Z = D_3 + D_5 + D_7$. So X is a 2-input OR gate and Y and Z are 3-input OR gates. Working: when a digit key is pressed, only its input line becomes 1 and it feeds those OR gates whose equation contains it. For example, pressing 7 makes $D_7 = 1$, which feeds X, Y and Z, so $WXYZ = 0111$, the BCD of 7. Pressing 8 makes $D_8 = 1$, which gives $W = 1$ and all other outputs 0, i.e. 1000.
Diagram for this answer