Page 87 - Computer science 868 Class 12
P. 87
3. What is a decoder? How is it different from a multiplexer? Draw the logic circuit for a 2 to 4 decoder and explain its
working. [ISC Specimen Paper 2023]
Ans. Decoder is a combinational circuit that converts any binary number to its equivalent Octal, Decimal or Hexadecimal form. It has
‘n’ input lines and maximum 2 output lines.
n
Decoder Multiplexer
1. Decoder converts binary data to Octal, Decimal and 1. Multiplexer selects a single output from multiple
Hexadecimal form binary inputs
2. Decoder is used to interpret coded data 2. MUX is used to transmit data
A 1 A 0
Y 0
Y0 = A1'.A0'
Y1 = A1'.A0
Y = Y2 = A1.A0'
1
Y3 = A1.A0
If A1=0 and .A0=1 then output across AND gate
Y 2 Y1 is 1 and rest 0. Hence it will be the equivalent
result.
Y 3
4. What is a half adder? Write the truth table and derive an SOP expression for sum and carry for a half adder. [ISC 2019]
Ans. The half adder is a combinational circuit that is designed to perform the addition of two bits and produces the two binary outputs
as sum (S) and the carry(C) bits.
Truth table for half adder is
Input Output
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
SOP expression for sum term = A'.B+A.B'
SOP expression for carry term = A.B
5. Draw the logic diagram and truth table for a 2-input XNOR gate. [ISC 2017]
Ans. The truth table and logic circuit diagram of a 2-variable XNOR gate are given below:
A B A⊙B
0 0 1
0 1 0
1 0 0
1 1 1
85
Computer Hardware 85

