Chapter 4 · 5 hours
Data Processing Circuits
IOE past exam questions
Past questions and answers
70 questions set from this chapter, 9 of them more than once. Most asked first.
- Asked 4 times
- 2081 Bhadra · 5 marks
- 2070 Chaitra · 5 marks
- 2069 Chaitra · 4 marks
- 2068 Baisakh · 6 marks
Explain the operation of two bit magnitude comparator with truth table and circuit diagram.
Answer
A magnitude comparator is a combinational circuit that compares two binary numbers A and B and gives three outputs: , and . Exactly one output is 1 at a time.
A 2-bit comparator compares with (4 inputs, 3 outputs).
Operation
- Compare the most significant bits first. If and , then ; if and , then .
- Only if are the LSBs , compared in the same way.
- only when both bit pairs are equal.
Equality of bit is given by an X-NOR gate:
Truth table
| 0 0 | 0 0 | 0 | 1 | 0 |
| 0 0 | 0 1 | 0 | 0 | 1 |
| 0 0 | 1 0 | 0 | 0 | 1 |
| 0 0 | 1 1 | 0 | 0 | 1 |
| 0 1 | 0 0 | 1 | 0 | 0 |
| 0 1 | 0 1 | 0 | 1 | 0 |
| 0 1 | 1 0 | 0 | 0 | 1 |
| 0 1 | 1 1 | 0 | 0 | 1 |
| 1 0 | 0 0 | 1 | 0 | 0 |
| 1 0 | 0 1 | 1 | 0 | 0 |
| 1 0 | 1 0 | 0 | 1 | 0 |
| 1 0 | 1 1 | 0 | 0 | 1 |
| 1 1 | 0 0 | 1 | 0 | 0 |
| 1 1 | 0 1 | 1 | 0 | 0 |
| 1 1 | 1 0 | 1 | 0 | 0 |
| 1 1 | 1 1 | 0 | 1 | 0 |
Output expressions
(The same results come from 4-variable K-maps of the table, e.g. .)
Circuit diagram
A1,B1 ─[XNOR]── x1 A0,B0 ─[XNOR]── x0
x1, x0 ───────────[AND]────────────── A=B
A1, B1' ──────────[AND]──┐
├─[OR]────── A>B
x1, A0, B0' ──────[AND]──┘
A1', B1 ──────────[AND]──┐
├─[OR]────── A<B
x1, A0', B0 ──────[AND]──┘
Gates: 2 X-NOR gates for , ; one AND for ; two ANDs and an OR for each of and (inverters give the complemented bits).
Example: , : so ; , so , and the other outputs are 0.
- Asked 3 times
- 2082 Baisakh · 5 marks
- 2081 Baisakh · 5 marks
- 2078 Bhadra · 5 marks
Design 5×32 line decoder using 3×8 line decoders and necessary logic gates.
Answer
A 5×32 decoder has 5 inputs and 32 outputs –; exactly one output is active for each input code. A 3×8 decoder (e.g. 74138) has 3 inputs, 8 outputs and an enable input E. Since , four 3×8 decoders are needed.
Design idea
- The three low bits go to the inputs of all four decoders in parallel.
- The two high bits select which one decoder is enabled. This is done with two NOT gates and four AND gates (a 2×4 decoding of ):
| Enable signal | Decoder enabled | Outputs active | ||
|---|---|---|---|---|
| 0 | 0 | DEC 0 | – | |
| 0 | 1 | DEC 1 | – | |
| 1 | 0 | DEC 2 | – | |
| 1 | 1 | DEC 3 | – |
Circuit
A4 ──┬────────[NOT]── A4'
A3 ──┼──┬─────[NOT]── A3'
│ │
E0 = A4'·A3' (AND)
E1 = A4'·A3 (AND)
E2 = A4 ·A3' (AND)
E3 = A4 ·A3 (AND)
A2 A1 A0 (common to all four decoders)
│
├──>+-----------+
│ | 3x8 DEC0 |── D0 ... D7
│ +-----------+
│ E ── E0
├──>+-----------+
│ | 3x8 DEC1 |── D8 ... D15
│ +-----------+
│ E ── E1
├──>+-----------+
│ | 3x8 DEC2 |── D16 ... D23
│ +-----------+
│ E ── E2
└──>+-----------+
| 3x8 DEC3 |── D24 ... D31
+-----------+
E ── E3
Operation
For an input , only one enable is 1, so only one decoder works; the others keep all outputs inactive. Inside that decoder, selects one of its 8 outputs. Output number = .
Example: input 10110 (22): enables DEC2 (outputs 16–23); selects its output 6, i.e. .
(With 74138 chips, the enable can instead be done using its three enable pins , but the AND-gate method above works with any 3×8 decoder having one active-high enable.)
- Asked 3 times
- 2079 Bhadra · 5 marks
- 2076 Chaitra · 5 marks
- 2072 Chaitra · 6 marks
Realize a full-subtractor logic circuit using a single 1:4 demultiplexer and necessary logic gates.
Answer
A full subtractor subtracts and a borrow-in from , giving difference and borrow-out .
Truth table
| A | B | D | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
Using a 1:4 DEMUX as a 2-to-4 decoder
Connect the data input of the 1:4 demultiplexer to logic 1 and use A, B as its select lines . Each output is then one minterm of A and B:
Group the truth table by A, B and see how D and depend on :
| AB | Active output | D | |
|---|---|---|---|
| 00 | |||
| 01 | 1 | ||
| 10 | 0 | ||
| 11 |
So:
(Since exactly one Y is 1, .)
Circuit
+------------+
1 ────>| Din Y0 |── Y0
| Y1 |── Y1
| 1:4 Y2 |── Y2
| DEMUX Y3 |── Y3
+------------+
S1 S0
A B
Y1, Y2 ─────[OR]── Q
Q, Bin ─────[XOR]─────────────── D
Y0, Y3 ─────[OR]── P
P, Bin ─────[AND]── Bin·P ──┐
├─[OR]── Bo
Y1 ─────────────────────────┘
Gates needed: one 1:4 DEMUX, three 2-input OR gates, one AND gate and one XOR gate.
Check: A=0, B=1, =1 (row 3): , so , and . This matches the truth table.
- Asked 2 times
- 2080 Baisakh · 8 marks
- 2078 Bhadra · 4 marks
Realize Full Adder Circuit using a 2×4 decoder and using logic gates.
Answer
A full adder adds three bits A, B and carry-in and gives sum S and carry-out .
Truth table
| A | B | S | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Realization with logic gates
From K-maps / algebra:
A, B ────────[XOR]── P = A⊕B
P, Cin ──────[XOR]──────────────── S
P, Cin ──────[AND]── Cin·P ──┐
├─[OR]── Co
A, B ────────[AND]── AB ─────┘
(Two XOR, two AND and one OR gate.)
Realization with a 2×4 decoder
A 2×4 decoder has only two inputs, so it cannot generate all 8 minterms. Feed A and B to the decoder; its outputs are the minterms of A, B:
Write S and for each AB combination in terms of :
| AB | Decoder output | S | |
|---|---|---|---|
| 00 | 0 | ||
| 01 | |||
| 10 | |||
| 11 | 1 |
(, so these are the same equations as the gate realization.)
+----------+
A ──────>| I1 Y0 |── (not used)
B ──────>| I0 Y1 |── Y1
| 2x4 Y2 |── Y2
| DEC Y3 |── Y3
+----------+
Y1, Y2 ──────[OR]── P (= A⊕B)
P, Cin ──────[XOR]─────────────── S
P, Cin ──────[AND]── Cin·P ──┐
├─[OR]── Co
Y3 ──────────────────────────┘
Gates needed besides the decoder: two OR gates, one XOR gate and one AND gate.
Check: A=1, B=1, =0: , , so and ; correct ().
(With a 3×8 decoder, the usual method , would need no XOR gate.)
- Asked 2 times
- 2078 Kartik · 2+6 marks
- 2069 Chaitra · 2+4 marks
What is a priority encoder? Design an octal priority encoder.
Answer
A priority encoder is an encoder that, when more than one input is active at the same time, outputs the code of the input with the highest priority and ignores the others. It also has a valid output V that is 1 when at least one input is active, to separate "input active" from "no input active" (both give code 000).
Octal (8-to-3) priority encoder
Inputs – (active high), has the highest priority. Outputs (binary code) and V. X = don't care.
| V | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | X | X | X | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | X | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 0 | 0 | 1 | X | X | 0 | 1 | 0 | 1 |
| 0 | 0 | 0 | 0 | 1 | X | X | X | 0 | 1 | 1 | 1 |
| 0 | 0 | 0 | 1 | X | X | X | X | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | X | X | X | X | X | 1 | 0 | 1 | 1 |
| 0 | 1 | X | X | X | X | X | X | 1 | 1 | 0 | 1 |
| 1 | X | X | X | X | X | X | X | 1 | 1 | 1 | 1 |
Output equations
Each output is 1 for the rows where the highest active input has that bit set. For example, for highest input 7, 5, 3 or 1. Input 5 counts only if 6 and 7 are 0, and so on. After simplification (a term like reduces to because ):
Logic diagram
D4,D5,D6,D7 ─────────────────[OR]── A2
D7 ─────────────────────────┐
D6 ─────────────────────────┤
D3,D4',D5' ──[AND]──────────┼[OR]── A1
D2,D4',D5' ──[AND]──────────┘
D7 ─────────────────────────┐
D5,D6' ──────[AND]──────────┤
D3,D4',D6' ──[AND]──────────┼[OR]── A0
D1,D2',D4',D6' ─[AND]───────┘
D0 ... D7 ───────────────────[OR]── V
Complements come from NOT gates.
Example: , others 0. Then , , (since blocks every term except ). Output = 110 = 6, the highest-priority active input, and V = 1. The IC 74148 is a standard 8-to-3 priority encoder (with active-low inputs and outputs).
- Asked 2 times
- 2075 Chaitra · 6 marks
- 2072 Chaitra · 7 marks
Design a simplest logic circuit for 'b' segment of the BCD-to-7 segment display decoder.
Answer
A BCD-to-7-segment decoder converts a 4-bit BCD digit (A = MSB) into the seven signals a–g that light the segments of a display. Assume a common-cathode display, so a segment glows when its signal is 1.
a
─────
│ │
f│ │b
│ g │
─────
│ │
e│ │c
│ │
─────
d
Truth table for segment b
Segment b (upper right) is ON for digits 0, 1, 2, 3, 4, 7, 8, 9 and OFF for 5 and 6. Inputs 1010–1111 are not valid BCD, so they are don't-cares.
| Digit | A B C D | b |
|---|---|---|
| 0 | 0 0 0 0 | 1 |
| 1 | 0 0 0 1 | 1 |
| 2 | 0 0 1 0 | 1 |
| 3 | 0 0 1 1 | 1 |
| 4 | 0 1 0 0 | 1 |
| 5 | 0 1 0 1 | 0 |
| 6 | 0 1 1 0 | 0 |
| 7 | 0 1 1 1 | 1 |
| 8 | 1 0 0 0 | 1 |
| 9 | 1 0 0 1 | 1 |
| 10–15 | invalid | X |
K-map
CD
AB 00 01 11 10
+---+---+---+---+
00 | 1 | 1 | 1 | 1 |
+---+---+---+---+
01 | 1 | 0 | 1 | 0 |
+---+---+---+---+
11 | X | X | X | X |
+---+---+---+---+
10 | 1 | 1 | X | X |
+---+---+---+---+
- Octet m(0,1,2,3,8,9,10,11) →
- Quad m(0,4,8,12) →
- Quad m(3,7,11,15) →
Check: digit 5 (, , ): , , , so b = 0. Digit 6 (, , ): b = 0. All other digits give 1.
Simplest logic circuit
Since , segment b needs only one X-NOR gate, one NOT gate and one OR gate:
B ──[NOT]── B' ──────────┐
[OR]── b
C ──┐ │
[XNOR]── C⊙D ────────┘
D ──┘
(If X-NOR is not allowed, use two NOT gates, two AND gates and a 3-input OR for .)
- Asked 2 times
- 2075 Chaitra · 5 marks
- 2074 Chaitra · 5 marks
Explain the operation of 3 bit magnitude comparator with truth table and draw the circuit.
Answer
A magnitude comparator compares two binary numbers and indicates whether , or . A 3-bit comparator compares with (6 inputs, 64 combinations, 3 outputs).
Operation
Comparison starts at the most significant bit:
- If , the result is decided: gives ; gives .
- If , compare and in the same way.
- If and , compare and .
- If all three pairs are equal, .
Bit equality is detected by X-NOR gates:
Truth table (condensed)
The full table has 64 rows; it is written compactly by bit priority (X = any value):
| vs | vs | vs | |||
|---|---|---|---|---|---|
| (1,0) | X | X | 1 | 0 | 0 |
| (0,1) | X | X | 0 | 0 | 1 |
| X | 1 | 0 | 0 | ||
| X | 0 | 0 | 1 | ||
| 1 | 0 | 0 | |||
| 0 | 0 | 1 | |||
| 0 | 1 | 0 |
Sample rows: gives (decided at ); gives (decided at ); gives .
Output expressions
Circuit
A2,B2 ─[XNOR]─ x2 A1,B1 ─[XNOR]─ x1
A0,B0 ─[XNOR]─ x0
x2, x1, x0 ──────────[AND]──────────── A=B
A2, B2' ─────────[AND]──┐
x2, A1, B1' ─────[AND]──┼─[OR]──────── A>B
x2, x1, A0, B0' ─[AND]──┘
A2', B2 ─────────[AND]──┐
x2, A1', B1 ─────[AND]──┼─[OR]──────── A<B
x2, x1, A0', B0 ─[AND]──┘
Gates: 3 X-NOR, 7 AND, 2 OR (plus inverters for the complemented bits). The output can also be obtained as using one NOR gate.
- Asked 2 times
- 2079 Bhadra · 1+5 marks
- 2074 Asoj · 1+4 marks
What is an encoder? Explain 8 to 3 line encoder with circuit diagram and truth table.
Answer
An encoder is a combinational circuit that converts an active signal on one of its (or fewer) input lines into an n-bit binary code. It does the reverse of a decoder.
8-to-3 line (octal-to-binary) encoder
It has 8 inputs – (one per octal digit) and 3 outputs . It is assumed that only one input is 1 at any time.
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
Output expressions
Each output is the OR of the inputs whose code has a 1 in that bit:
Circuit diagram
D0 D1 D2 D3 D4 D5 D6 D7
│ │ │ │ │ │ │ │
x │ │ │ ├──┼──┼──┼──[OR]── A2 (D4,D5,D6,D7)
│ ├──┼──┼──┼──┼──┼──[OR]── A1 (D2,D3,D6,D7)
├──┼──┼──┼──┼──┼──┼──[OR]── A0 (D1,D3,D5,D7)
Three 4-input OR gates are enough; is not connected (no output bit is 1 for it).
Limitations
- If no input is active, the output is 000, the same as for ; a valid-output line is needed to tell them apart.
- If two inputs are active together, the output is wrong (e.g. and give , which reads as 7). A priority encoder solves this by encoding only the highest active input.
- Asked 2 times
- 2080 Bhadra · 5 marks
- 2080 Baisakh · 5 marks
Realize a full-adder circuit using a single 1:4 demultiplexer and necessary logic gates.
Answer
A 1:4 demultiplexer with its data input tied to logic 1 behaves as a 2-to-4 decoder: with on the select lines, each output is one minterm of and . The third input is then combined with these outputs using a few gates.
Truth table of the full adder
| A | B | S | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Expressing S and in terms of the DEMUX outputs
With , and data input :
From the table, grouping by :
| AB | DEMUX output | S | |
|---|---|---|---|
| 00 | 0 | ||
| 01 | |||
| 10 | |||
| 11 | 1 |
(Here .)
Circuit
+----------+
1 --->| D Y0 |-- (not used)
| 1:4 Y1 |--+
A --->| S1 Y2 |--+--[OR]--- P (= A xor B)
B --->| S0 Y3 |------------ Y3
+----------+
P, Cin ---[XOR]-------------------- S
P, Cin ---[AND]--- P.Cin --+
Y3 -------------------------+--[OR]-- Cout
Gates needed: one 2-input OR (), one XOR (), one AND () and one OR ().
Check: for : , , so and , i.e. . Correct.
- 2081 Bhadra · 2+2+3 marks
Compare a demultiplexer with the decoder. What is a seven-segment decoder? Find out the simplest logic expression for "b" segment of the BCD to 7-segment display decoder and realize the circuit.
Answer
DEMUX vs decoder
A demultiplexer sends one data input to one of outputs chosen by select lines. A decoder converts an -bit input code into one active line out of lines. A decoder with an enable input works as a DEMUX if the enable is used as the data input.
| Point | Demultiplexer | Decoder |
|---|---|---|
| Inputs | 1 data + n select | n code inputs (+ enable) |
| Function | Routes data to a chosen line | Activates the line for a code |
| Output content | Copy of the data bit | Fixed 1 (or 0) on one line |
| Use | Data distribution, serial-to-parallel | Address decoding, code conversion |
| Example | 1:8 DEMUX | 3-to-8 decoder (74138) |
Seven-segment decoder
A BCD-to-seven-segment decoder (e.g. 7447/7448) takes a 4-bit BCD digit and produces seven outputs to that light the segments of an LED display so that the decimal digit 0–9 is shown. Inputs 1010–1111 never occur, so they are don't-cares.
a
---
f | g | b
---
e | | c
---
d
Simplest expression for segment "b"
Segment b is ON for digits 0, 1, 2, 3, 4, 7, 8, 9 and OFF for 5 and 6 (standard 7447 style).
K-map (rows AB, columns CD):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 1 | 1 |
| 01 | 1 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 1 | 1 | X | X |
Groups: rows 00 and 10 (all ) give ; column 00 gives ; column 11 gives .
Circuit
B ---[NOT]----------------+
C --+ |
+--[XNOR]--------- --[OR]--- b
D --+
So segment b needs one inverter, one XNOR and one 2-input OR gate (or with AND/OR: and from two AND gates and a 3-input OR).
- 2081 Bhadra · 1+3 marks
What is a multiplexer tree? Construct a 1:16 demultiplexer using only 1:4 demultiplexers and logic gates if necessary.
Answer
Multiplexer tree
A multiplexer tree is a larger multiplexer built by connecting smaller multiplexers in two or more levels. The lower select bits drive the first-level MUXes and the higher select bits drive the next level, which picks one first-level output. Example: a 16:1 MUX from five 4:1 MUXes. The same idea used with DEMUXes is called a demultiplexer tree.
1:16 DEMUX from 1:4 DEMUXes
A 1:16 DEMUX needs 4 select lines . Use five 1:4 DEMUXes in two levels:
- Level 1: one 1:4 DEMUX receives the data input ; its selects are the MSBs . It sends to one of four lines.
- Level 2: four 1:4 DEMUXes, each fed from one level-1 output, all with selects . They give the 16 outputs –.
S1 S0
+------+-- Y0
+->| DM1 |-- Y1..Y3
S3 S2 | +------+
+------+ | +------+-- Y4
D --->| DM0 0|-----+->| DM2 |-- Y5..Y7
| 1|--------+------+
| 2|-----+ +------+-- Y8
| 3|--+ +->| DM3 |-- Y9..Y11
+------+ | +------+
| +------+-- Y12
+---->| DM4 |-- Y13..Y15
+------+
Working: if , DM0 () sends to DM3; DM3 () sends it to its second output, which is . No extra gates are needed.
- 2081 Baisakh · 2+3+3 marks
What is a priority encoder? Find out the simplest logic circuit for "e" and "f" segments of the BCD-to-seven segment display decoder.
Answer
Priority encoder
A priority encoder is an encoder that gives the binary code of the highest-priority active input when more than one input is active at the same time. It also has a valid output that shows at least one input is active. Example: in a 4:2 priority encoder with highest, if and are both 1, the output is (code of ). The 74148 is an 8:3 priority encoder used for interrupt handling and keyboard encoding.
Segment "e"
Segment e is ON for digits 0, 2, 6, 8 (inputs 10–15 are don't-cares).
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 1 |
| 01 | 0 | 0 | 0 | 1 |
| 11 | X | X | X | X |
| 10 | 1 | 0 | X | X |
Groups: corners (0, 2, 8, 10) give ; column 10 (2, 6, 10, 14) gives .
B --[NOT]--+
+--[OR]--+
C ---------+ +--[AND]--- e
D --[NOT]-----------+
Segment "f"
Segment f is ON for digits 0, 4, 5, 6, 8, 9.
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 0 |
| 01 | 1 | 1 | 0 | 1 |
| 11 | X | X | X | X |
| 10 | 1 | 1 | X | X |
Groups: rows 11 and 10 give ; column 00 gives ; cells 4, 5, 12, 13 give ; cells 4, 6, 12, 14 give .
C' -+-[AND]-- C'D' --+
D' -+ |
B -+-[AND]-- BC' ---+
C' -+ +--[OR 4]--- f
B -+-[AND]-- BD' ---+
D' -+ |
A ------------------+
Both circuits are checked against the digit table: e.g. for digit 6 (): and , both segments lit as required.
- 2080 Bhadra · 6 marks
Realize the following logic function using a single 1:8 demultiplexer and necessary logic gates. Y(A,B,C,D) = Σm(0,2,3,5,7,8,10,13,15)
Answer
A 1:8 DEMUX with data input tied to 1 produces the 8 minterms of its three select variables. The 4-variable function is realized by choosing three variables as selects and handling the fourth with a gate.
Choice of select lines
Use as selects () and the data input . Then output is 1 when . Each covers two minterms of the function: (with ) and (with ).
| BCD = j | Minterm j (A=0) | Minterm j+8 (A=1) | Contribution |
|---|---|---|---|
| 0 | 0 ✓ | 8 ✓ | |
| 1 | 1 ✗ | 9 ✗ | – |
| 2 | 2 ✓ | 10 ✓ | |
| 3 | 3 ✓ | 11 ✗ | |
| 4 | 4 ✗ | 12 ✗ | – |
| 5 | 5 ✓ | 13 ✓ | |
| 6 | 6 ✗ | 14 ✗ | – |
| 7 | 7 ✓ | 15 ✓ |
Hence
Circuit
+---------+
1 ------>| D Y0 |----------------> to OR
| Y1 |
B --->S2 | Y2 |----------------> to OR
C --->S1 | 1:8 Y3 |--+
D --->S0 | Y4 | +--[AND]------> to OR
| Y5 |-----^-|--------> to OR
| Y6 | |
| Y7 |-------|--------> to OR
+---------+ |
A ---[NOT]--- A' -----------+
Y0, Y2, Y5, Y7, A'Y3 ---[OR 5]---> Y
Gates: one NOT (for ), one 2-input AND () and one 5-input OR.
Check: minterm 11 (): only , but , so (correct, 11 is not in the list). Minterm 3 (): , so . All nine minterms 0, 2, 3, 5, 7, 8, 10, 13, 15 give .
(For reference, the minimal SOP is , which matches the result above.)
- 2080 Bhadra · 4+2 marks
Design the full-subtractor circuit using decoder and required logic gates. What is a combinational logic circuit?
Answer
Full subtractor using a decoder
A full subtractor computes and gives the difference and borrow out .
| A | B | D | Minterm | ||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 2 |
| 0 | 1 | 1 | 0 | 1 | 3 |
| 1 | 0 | 0 | 1 | 0 | 4 |
| 1 | 0 | 1 | 0 | 0 | 5 |
| 1 | 1 | 0 | 0 | 0 | 6 |
| 1 | 1 | 1 | 1 | 1 | 7 |
A 3-to-8 decoder with inputs (A = MSB) gives all 8 minterms at –. Each output function is the OR of its minterm lines:
+--------+
A ----->| 2 Y0 |
B ----->| 1 Y1 |---> D, Bout
Bin --->| 0 Y2 |---> D, Bout
| 3:8 Y3 |---> Bout
| Y4 |---> D
| Y5 |
| Y6 |
| Y7 |---> D, Bout
+--------+
Y1, Y2, Y4, Y7 ---[OR 4]---> D
Y1, Y2, Y3, Y7 ---[OR 4]---> Bout
Two 4-input OR gates complete the design (with an active-low decoder like 74138, use 4-input NAND gates instead).
Combinational logic circuit
A combinational logic circuit is a circuit whose outputs at any instant depend only on the present values of its inputs. It has no memory and no feedback from output to input. It is built only from logic gates. Examples: adders, subtractors, multiplexers, decoders, encoders and comparators.
- 2080 Baisakh · 4+3 marks
Draw the simplest logic circuit for "a" segment of the BCD-to-seven segment display decoder and realize the simplest logic expression using only NOR gates.
Answer
Segment a of a BCD-to-seven-segment decoder is ON for digits 0, 2, 3, 5, 6, 7, 8, 9 and OFF only for 1 and 4. Inputs 10–15 are don't-cares.
Simplest SOP and its circuit
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 1 | 1 |
| 01 | 0 | 1 | 1 | 1 |
| 11 | X | X | X | X |
| 10 | 1 | 1 | X | X |
Groups: rows 11, 10 give ; columns 11, 10 give ; cells 5, 7, 13, 15 give ; corners 0, 2, 8, 10 give .
B --+-[AND]--------+
D --+ |
B'--+-[AND]--------+--[OR 4]--- a
D'--+ |
A -----------------+
C -----------------+
Realization using only NOR gates
NOR-NOR logic directly implements a product-of-sums. Take the 0s of the map (cells 1 and 4) with don't-cares:
- Cell 1 (): cannot combine with 9 (9 is a 1), so the maxterm is .
- Cell 4 () combines with don't-care 12: .
Using De Morgan's theorem:
So: two first-level NORs form the complemented sums, a second-level NOR combines them, and the complemented inputs and are made with NOR gates used as inverters (both inputs tied together).
B --[NOR]-- B' D --[NOR]-- D'
A --+
B --+--[NOR 4]--N1--+
C --+ |
D' --+ +--[NOR 2]--- a
B' --+ |
C --+--[NOR 3]--N2--+
D --+
Total: 2 NOR inverters + one 4-input NOR + one 3-input NOR + one 2-input NOR = 5 NOR gates.
Check: digit 1 (): , so . Digit 4 (): , so . Digit 9 (): , , so . Correct.
- 2079 Baisakh · 6 marks
Design the logic circuit for 4:2 Priority Encoder.
Answer
A 4:2 priority encoder has four inputs – and gives the 2-bit code of the highest-priority active input. Here has the highest priority and the lowest. A valid bit shows that at least one input is 1 (otherwise is meaningless).
Truth table (X = don't care)
| X | Y | V | ||||
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X | X | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | X | 0 | 1 | 1 |
| 0 | 1 | X | X | 1 | 0 | 1 |
| 1 | X | X | X | 1 | 1 | 1 |
K-maps (rows , columns )
For X:
| \ | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | 0 | 0 | 0 |
| 01 | 1 | 1 | 1 | 1 |
| 11 | 1 | 1 | 1 | 1 |
| 10 | 1 | 1 | 1 | 1 |
For Y:
| \ | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | 0 | 1 | 1 |
| 01 | 0 | 0 | 0 | 0 |
| 11 | 1 | 1 | 1 | 1 |
| 10 | 1 | 1 | 1 | 1 |
Valid output:
Logic circuit
D3 ------+-----------------[OR]---- X
D2 ---+--|-----------------^
| |
+-[NOT]--+
D1 ----------[AND]--+
+--[OR]------- Y
D3 -----------------+
D0,D1,D2,D3 -------[OR 4]--------- V
Check: : , , so output = input 2, the highest active one. gives whatever the others are. All cases were verified against the table.
- 2079 Baisakh · 6 marks
Design 8:1 Multiplexer using 4:1 Multiplexer and 2:1 Multiplexer.
Answer
An 8:1 MUX has 8 data inputs – and 3 select lines . It can be built as a multiplexer tree from two 4:1 MUXes and one 2:1 MUX.
Design
- Level 1: two 4:1 MUXes. MUX-1 takes –, MUX-2 takes –. Both use the lower select bits .
- Level 2: one 2:1 MUX picks MUX-1 output (when ) or MUX-2 output (when ).
S1 S0
+-------+
I0 ---->| |
I1 ---->| 4:1 |--P--+
I2 ---->| MUX-1 | | S2
I3 ---->| | | +-----+
+-------+ +->|0 |
+-------+ | 2:1 |---> Y
I4 ---->| | +->|1 |
I5 ---->| 4:1 |--Q--+ +-----+
I6 ---->| MUX-2 |
I7 ---->| |
+-------+
S1 S0
Function table
| Y | |||
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 0 | 1 | |
| 0 | 1 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 | |
| 1 | 1 | 1 |
Working
Substituting gives , the 8:1 MUX equation, where is the minterm of .
Example: . Both 4:1 MUXes select their input 2, so and . The 2:1 MUX with passes , so . Correct.
- 2079 Bhadra · 5 marks
Implement the following Boolean function using a single 8:1 multiplexer. F(A,B,C,D) = Σm(2,4,5,7,10,14).
Answer
Use as the select lines of the 8:1 MUX and feed each data input with , , or .
Implementation table
Each data input corresponds to and covers minterms () and (). Required minterms: 2, 4, 5, 7, 10, 14.
| ABC | Minterms (D=0, D=1) | In F? | ||
|---|---|---|---|---|
| 000 | 0, 1 | no, no | 0 | |
| 001 | 2, 3 | yes, no | ||
| 010 | 4, 5 | yes, yes | 1 | |
| 011 | 6, 7 | no, yes | ||
| 100 | 8, 9 | no, no | 0 | |
| 101 | 10, 11 | yes, no | ||
| 110 | 12, 13 | no, no | 0 | |
| 111 | 14, 15 | yes, no |
The same result in the usual two-row form:
| 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | |
| 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | |
| Input | 0 | 1 | 0 | 0 |
Circuit
+--------+
0 -------->| I0 |
D --[NOT]->| I1 |
1 -------->| I2 |
D -------->| I3 8:1 |----> F
0 -------->| I4 MUX |
D' ------->| I5 |
0 -------->| I6 |
D' ------->| I7 |
+--------+
S2 S1 S0
A B C
Only one inverter is needed besides the MUX.
Check: (minterm 10): select picks , so . (minterm 11): , so . Correct.
- 2078 Kartik · 3+3 marks
Realize full adder circuit using decoder and gates. Subtract (43)₁₀ from (57)₁₀ using 2's complement method.
Answer
Full adder using a decoder and gates
A full adder adds , and carry-in :
| A | B | C | S | |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
A 3-to-8 decoder (inputs ) produces every minterm; OR the required lines:
+-------+
A ----->| 2 Y0 |
B ----->| 1 Y1 |---> to S
C ----->| 0 Y2 |---> to S
| Y3 |---> to Co
| 3:8 Y4|---> to S
| Y5 |---> to Co
| Y6 |---> to Co
| Y7 |---> to S and Co
+-------+
Y1,Y2,Y4,Y7 --[OR 4]--> S
Y3,Y5,Y6,Y7 --[OR 4]--> Co
(57)₁₀ − (43)₁₀ by 2's complement
Use 7 bits (57 needs 6 bits; one extra bit for sign safety).
1's complement of 43: . Add 1: 2's complement .
0111001 (+57)
+ 1010101 (2's complement of 43)
---------
1 0001110
^ end carry discarded
An end carry appears, so the result is positive and equals the remaining bits: .
Answer:
- 2078 Kartik · 6 marks
Realize a following logic expression using a 4:1 multiplexer and standard logic gates. Y(A,B,C) = ΠM(0,2,6,7)
Answer
First convert the maxterm list to minterms. A 3-variable function has minterms 0–7; the ones not listed as maxterms are the minterms:
Implementation table
Use as select lines (, ) and express each data input in terms of . Input covers minterms () and ().
| 0 | 2 | 4 | 6 | |
| 1 | 3 | 5 | 7 | |
| Input | 1 | 0 |
- : only minterm 1 present, so .
- : only minterm 3, so .
- : both 4 and 5, so .
- : neither 6 nor 7, so .
Circuit
+--------+
C -------->| I0 |
C -------->| I1 4:1 |----> Y
1 (Vcc) -->| I2 MUX |
0 (GND) -->| I3 |
+--------+
S1 S0
A B
No extra gate is needed here (no input appears).
Check
The MUX equation gives
| ABC | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
|---|---|---|---|---|---|---|---|---|
| Y | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
Y is 0 exactly at 0, 2, 6, 7, which matches .
- 2078 Bhadra · 5 marks
Design a circuit that compares two 2-bit numbers, A and B, to check if they are equal. The circuit has one output x, so that x = 1 if A = B and x = 0 if A≠B.
Answer
Two 2-bit numbers and are equal only when each pair of corresponding bits is equal. Bit equality is given by the XNOR gate.
Truth table (16 rows; x = 1 only when A = B)
| x | ||
|---|---|---|
| 00 | 00 | 1 |
| 01 | 01 | 1 |
| 10 | 10 | 1 |
| 11 | 11 | 1 |
| any other pair | 0 |
So
Simplification
Group the terms by the bit-1 pair and the bit-0 pair:
The K-map (rows , columns ) has 1s only on the diagonal cells 0, 5, 10, 15, which cannot be grouped, confirming that the SOP form has four terms; the XNOR form is the simplest circuit.
Logic circuit
A1 --+
+--[XNOR]-- E1 --+
B1 --+ |
+--[AND]--- x
A0 --+ |
+--[XNOR]-- E0 --+
B0 --+
Alternative: , i.e. two XOR gates followed by one NOR gate.
Check: , : , , so . , : , so .
- 2076 Chaitra · 2+4 marks
Describe the importance of parity bits in communication system. Explain 3 bits even parity generator circuit clearly.
Answer
Importance of parity bits
A parity bit is an extra bit added to a data word so that the total number of 1s is even (even parity) or odd (odd parity). Its importance in communication:
- Error detection: noise can flip a bit during transmission. The receiver recounts the 1s; a wrong parity shows that an error occurred.
- Simple and cheap: only one extra bit and a few XOR gates are needed at each end.
- Detects all single-bit (odd-number) errors, which are the most common in many links. (It cannot detect two-bit errors and cannot correct errors.)
- Used in serial links (UART), memory (parity RAM) and as the base of Hamming codes.
3-bit even parity generator
Inputs: data bits . Output: parity bit chosen so that together have an even number of 1s.
| A | B | C | P |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
The K-map is a checkerboard (no adjacent 1s), so it is simplified with XOR:
A --+
+--[XOR]--+
B --+ +--[XOR]--- P
C ------------+
Working: is 1 when the data has an odd number of 1s, which makes the total even. Example: data has two 1s, so , and the transmitted word has two 1s (even). At the receiver, a 4-bit checker gives 0 for no error and 1 if a single bit has flipped.
- 2076 Chaitra · 3+3 marks
Explain the operation of 8:1 multiplexer with necessary diagrams. Construct 32:1 MUX using only 8:1 MUXs.
Answer
Operation of an 8:1 multiplexer
An 8:1 multiplexer selects one of 8 data inputs – and passes it to a single output . The input is chosen by three select lines ().
| 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 | |
|---|---|---|---|---|---|---|---|---|
| Y |
Internally it has eight 4-input AND gates (each gets one data input and one combination of or their complements) and one 8-input OR gate. Only the AND gate whose select combination is true is enabled.
I0..I7 ---->+---------+
| 8:1 |
| MUX |-----> Y
S2 S1 S0 -->+---------+ (74151)
32:1 MUX using only 8:1 MUXes
A 32:1 MUX needs 5 select lines –.
- Level 1: four 8:1 MUXes (M1–M4) take –, –, –, –. All use .
- Level 2: a fifth 8:1 MUX (M5) selects one of the four outputs. Its select lines are , on its two lower selects and its MSB select tied to 0, so only inputs – of M5 are used.
I0-I7 -->[M1 8:1]--+ M5 (8:1)
I8-I15 -->[M2 8:1]--+---> I0
I16-I23 -->[M3 8:1]--+---> I1 ... --> Y
I24-I31 -->[M4 8:1]--+---> I2, I3
S2S1S0 sel: 0, S4, S3
I4-I7 = 0
Total: 5 MUXes of 8:1. Example: gives M3 output , and M5 with passes M3, so .
- 2076 Asoj · 1+5 marks
What is a decoder? Realize a 2-to-4 line decoder as a full adder circuit.
Answer
Decoder
A decoder is a combinational circuit that converts an -bit binary input code into output lines, of which exactly one is active for each input combination. Each output is one minterm of the inputs (e.g. 2-to-4, 3-to-8 (74138), BCD-to-decimal decoders).
Full adder using a 2-to-4 decoder
A 2-to-4 decoder has only two inputs, so feed it and . Its outputs are the minterms of :
Group the full-adder truth table by and write and in terms of :
| AB | Active line | S | |
|---|---|---|---|
| 00 | 0 | ||
| 01 | |||
| 10 | |||
| 11 | 1 |
Let (). Then
Circuit
+--------+
A ----->| 2-to-4 |-- D0 (unused)
B ----->| decoder|-- D1 --+
| |-- D2 --+--[OR]-- P
| |-- D3 -----------------+
+--------+ |
P ---+--[XOR]------------------- S |
Cin -+ |
P ---+--[AND]--------------------+ |
Cin -+ +-[OR]--+-- Cout
Gates: 2 OR, 1 XOR, 1 AND.
Check
| A B | P | S | A+B+C (binary) | |
|---|---|---|---|---|
| 0 1 1 | 1 | 0 | 1 | 10 |
| 1 1 0 | 0 | 0 | 1 | 10 |
| 1 1 1 | 0 | 1 | 1 | 11 |
| 1 0 0 | 1 | 1 | 0 | 01 |
All eight combinations were verified.
Alternative: two 2-to-4 decoders with enable can be joined (using on the enables) into a 3-to-8 decoder; then and are taken with two 4-input OR gates.
- 2076 Asoj · 3 marks
Realize the logic circuit of 1×16 DMUX using 1×4 DMUX and gates if necessary.
Answer
A 1×16 DMUX needs 4 select lines . It is built as a demultiplexer tree from five 1×4 DMUXes; no extra gates are needed.
- Stage 1: one 1×4 DMUX receives the data and uses the MSBs to send it to one of four second-stage DMUXes.
- Stage 2: four 1×4 DMUXes use and produce –.
S1 S0
+------+-- Y0..Y3
S3 S2 +->| DM1 |
+------+ | +------+
D -->| DM0 0|---+ +------+-- Y4..Y7
| 1|----->| DM2 |
| 2|---+ +------+
| 3|-+ | +------+-- Y8..Y11
+------+ | +->| DM3 |
| +------+
| +------+-- Y12..Y15
+--->| DM4 |
+------+
| Active stage-2 DMUX | Outputs reached by | |
|---|---|---|
| 00 | DM1 | – |
| 01 | DM2 | – |
| 10 | DM3 | – |
| 11 | DM4 | – |
Example: → DM0 picks DM4, DM4 picks its output 2, so appears at .
- 2075 Chaitra · 7 marks
Design the operation of octal priority encoder with neat diagram.
Answer
An octal (8-to-3) priority encoder has eight inputs – and three outputs giving the binary code of the highest-numbered active input ( = highest priority). A valid output is 1 when any input is active. The 74148 is a common IC (active-low).
Truth table (X = don't care)
| V | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | X | X | X | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | X | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 0 | 0 | 1 | X | X | 0 | 1 | 0 | 1 |
| 0 | 0 | 0 | 0 | 1 | X | X | X | 0 | 1 | 1 | 1 |
| 0 | 0 | 0 | 1 | X | X | X | X | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | X | X | X | X | X | 1 | 0 | 1 | 1 |
| 0 | 1 | X | X | X | X | X | X | 1 | 1 | 0 | 1 |
| 1 | X | X | X | X | X | X | X | 1 | 1 | 1 | 1 |
Output equations
Write each output as the OR of the rows where it is 1; each row requires all higher inputs to be 0, and redundant conditions are dropped.
- for highest input 4, 5, 6 or 7:
- for highest input 2, 3, 6 or 7. Inputs 2 and 3 count only if (if or is 1, is 1 anyway):
- for highest input 1, 3, 5 or 7:
- Valid bit:
Logic diagram
D4,D5,D6,D7 ----------------------[OR 4]--- Y2
D7 ---------------------------+
D6 ---------------------------+
D5',D4',D3 ---[AND 3]---------+--[OR 4]--- Y1
D5',D4',D2 ---[AND 3]---------+
D7 ---------------------------+
D6',D5 -------[AND 2]---------+
D6',D4',D3 ---[AND 3]---------+--[OR 4]--- Y0
D6',D4',D2',D1 [AND 4]--------+
D0 ... D7 ------------------------[OR 8]--- V
Inverters provide .
Operation
When several keys or interrupt lines are active together, only the highest one is encoded. Example: , others 0. Then , (from ), (since blocks all terms and ). Output and . All 255 non-zero input patterns were checked against these equations.
- 2075 Asoj · 3+3 marks
Explain the operation of octal to binary encoder with necessary diagrams. Convert A+B'C in to canonical form.
Answer
Octal-to-binary encoder
An octal-to-binary (8-to-3) encoder has eight inputs –, one for each octal digit, and three outputs giving the 3-bit binary code of the active input. Only one input is assumed to be active at a time.
| Active input | |||
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 0 | 1 | |
| 0 | 1 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 | |
| 1 | 1 | 1 |
Each output is 1 for the inputs whose code has a 1 in that position:
D4 D5 D6 D7 --[OR 4]--> Y2
D2 D3 D6 D7 --[OR 4]--> Y1
D1 D3 D5 D7 --[OR 4]--> Y0
(D0 is not connected: it gives 000)
Limitations: active and "no input active" both give 000, and two active inputs give a wrong code (e.g. → 111). A priority encoder solves these.
Canonical form of
Expand each term with the missing variables using :
Combine and remove the repeated term :
The canonical POS form uses the remaining combinations:
- 2075 Asoj · 3+3 marks
Describe the importance of parity bits in communication system. Explain 3 bits odd parity generator circuit clearly.
Answer
Importance of parity bits
A parity bit is one extra bit attached to a data word so that the total count of 1s is either even (even parity) or odd (odd parity). In communication systems it matters because:
- Error detection: noise or interference may flip a bit. The receiver checks the parity; a mismatch shows an error, and the data can be re-requested.
- Low cost: only one extra bit per word and a few XOR gates.
- Single-bit errors are always detected (in fact any odd number of errors).
- Limits: an even number of bit errors goes unnoticed, and the faulty bit cannot be located or corrected. Codes like Hamming code extend the parity idea to correct errors.
- Odd parity is often preferred because an all-zero word (e.g. a dead line) still carries a 1, so a stuck-at-0 line is detected.
3-bit odd parity generator
Inputs ; output is chosen so that together contain an odd number of 1s.
| A | B | C | P |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
The K-map has no adjacent 1s, so it is simplified with XOR/XNOR:
A --+
+--[XOR]--+
B --+ +--[XNOR]--- P
C ------------+
Working: if the data already has an odd number of 1s, ; if even, . Example: data (two 1s) gives , so the word has three 1s (odd). The receiver's odd parity checker computes , which is 0 when no error is present.
- 2075 Asoj · 3+3 marks
Realize the circuit diagram for BCD decoder. Explain 1's and 2's complements with examples?
Answer
BCD decoder (BCD-to-decimal, 4-to-10)
A BCD decoder takes a 4-bit BCD code ( = MSB) and activates one of ten outputs – (IC 7442). Codes 1010–1111 never occur, so they are don't-cares and allow partial decoding.
| Digit | ABCD | Full decoding | Simplified (with don't-cares) |
|---|---|---|---|
| 0 | 0000 | ||
| 1 | 0001 | ||
| 2 | 0010 | ||
| 3 | 0011 | ||
| 4 | 0100 | ||
| 5 | 0101 | ||
| 6 | 0110 | ||
| 7 | 0111 | ||
| 8 | 1000 | ||
| 9 | 1001 |
A B C D A' B' C' D' (inverters)
| | | |
+--+--+--+--[AND]--- D0 = A'B'C'D'
+--+--+--+--[AND]--- D1 = A'B'C'D
... (one AND gate per output)
+--------+--[AND]--- D8 = AD'
+--------+--[AND]--- D9 = AD
Ten AND gates and four inverters form the decoder.
1's and 2's complements
1's complement: invert every bit (0 → 1, 1 → 0). Example: 1's complement of is .
2's complement: 1's complement + 1. Example: 2's complement of is .
They represent negative numbers and turn subtraction into addition. Example in 4 bits:
1's complement method 2's complement method
1001 (9) 1001 (9)
+ 1010 (1's comp of 0101) + 1011 (2's comp of 0101)
------ ------
1 0011 1 0100
+1 end-around carry carry discarded
------
0100 = 4 0100 = 4
In 1's complement the end carry is added back; in 2's complement it is discarded. 2's complement has a single zero and is used in computers.
- 2075 Asoj · 2+4 marks
What is the role of hazards in asynchronous circuit design? Explain two bit magnitude comparator with necessary diagrams.
Answer
Role of hazards in asynchronous circuit design
A hazard is an unwanted momentary pulse (glitch) at a circuit output caused by unequal propagation delays along different paths when an input changes. Types: static-1 (output should stay 1 but dips to 0), static-0, and dynamic hazards; essential hazards come from feedback delays.
In asynchronous circuits there is no clock to wait until signals settle, and outputs are fed back as state variables. A glitch can therefore be taken as a real change and drive the circuit into a wrong stable state, causing malfunction. So hazards must be removed, e.g. by adding redundant (consensus) terms in the K-map so that every pair of adjacent 1s is covered by a common group, and by careful delay control.
Two-bit magnitude comparator
It compares and and gives three outputs: (), () and ().
Let and (bit-equal signals). Compare the MSBs first; only if they are equal, compare the LSBs:
From K-maps the same functions in plain SOP are:
Partial truth table:
| G | E | L | ||
|---|---|---|---|---|
| 10 | 01 | 1 | 0 | 0 |
| 01 | 01 | 0 | 1 | 0 |
| 01 | 11 | 0 | 0 | 1 |
| 11 | 10 | 1 | 0 | 0 |
A1,B1 --[XNOR]-- x1 A0,B0 --[XNOR]-- x0
x1, x0 ------------------[AND]------------ E
A1,B1' ---[AND]---+
x1,A0,B0' [AND]---+------[OR]------------- G
A1',B1 ---[AND]---+
x1,A0',B0 [AND]---+------[OR]------------- L
Example: , : , , so . All 16 input combinations were verified.
- 2074 Chaitra · 4+2 marks
Design the 32:1 Multiplexer using 4:1 multiplexers tree concept and implement the function F = Σ(0,1,3,8,9,13) using suitable Multiplexer.
Answer
32:1 MUX using a 4:1 multiplexer tree
A 32:1 MUX has 32 data inputs and 5 select lines (). With 4:1 MUXes (2 selects each) the tree has three levels:
| Level | 4:1 MUXes | Select lines | Function |
|---|---|---|---|
| 1 | 8 (M1–M8) | Each picks 1 of 4 inputs | |
| 2 | 2 (M9, M10) | Each picks 1 of 4 level-1 outputs | |
| 3 | 1 (M11) | (on its ; its ) | Picks M9 or M10 |
I0-I3 ->[M1 ]--+
I4-I7 ->[M2 ]--+->[M9 ]--+
I8-I11 ->[M3 ]--+ S3S2 |
I12-I15 ->[M4 ]--+ | S4 on S0,
+--->[M11]---> Y
I16-I19 ->[M5 ]--+ | S1 = 0
I20-I23 ->[M6 ]--+->[M10]--+
I24-I27 ->[M7 ]--+ S3S2
I28-I31 ->[M8 ]--+
(M1-M8 use S1S0)
Total: 11 MUXes of 4:1 (the last one uses only two inputs; a 2:1 MUX could replace it). Example: → M6 passes , M10 () passes M6, M11 () passes M10, so .
Implementing
The largest minterm is 13, so F is a 4-variable function . A suitable MUX is an 8:1 MUX with as selects and on the data side.
| 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | |
| 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | |
| Input | 1 | 0 | 0 | 1 | 0 | 0 |
+--------+
1 ------->| I0 |
D ------->| I1 |
0 ------->| I2,I3 |
1 ------->| I4 8:1 |----> F
0 ------->| I5 |
D ------->| I6 |
0 ------->| I7 |
+--------+
A B C (S2 S1 S0)
Check: (13): select 110 → , so . (12): , so .
- 2074 Asoj · 1+4 marks
What is a multiplexer tree? Design the 16 to 1 multiplexer using 4 to 1 multiplexer.
Answer
Multiplexer tree
A multiplexer tree is the connection of small multiplexers in levels to make a larger multiplexer. The first level selects within groups using the lower select bits, and the next level selects one group using the higher select bits.
16:1 MUX from 4:1 MUXes
A 16:1 MUX has inputs – and four select lines . Use five 4:1 MUXes:
- Level 1: four 4:1 MUXes (M1–M4) with selects . M1 gets –, M2 gets –, M3 gets –, M4 gets –.
- Level 2: one 4:1 MUX (M5) with selects picks one of the outputs of M1–M4.
S1 S0
I0-I3 -->[ M1 ]--Y1--+
I4-I7 -->[ M2 ]--Y2--+--> I0..I3 of
I8-I11 -->[ M3 ]--Y3--+ [ M5 ] ----> Y
I12-I15 -->[ M4 ]--Y4--+ S3 S2
| M5 passes | Y for = 00, 01, 10, 11 | |
|---|---|---|
| 00 | ||
| 01 | ||
| 10 | ||
| 11 |
Example: . Every level-1 MUX selects its input 3, so M3 outputs . M5 with selects M3, so , which is input number . Correct.
- 2074 Asoj · 3 marks
Write a short note on ROM.
Answer
ROM (Read-Only Memory) is a non-volatile semiconductor memory whose contents are written once (at manufacture or by programming) and then mainly read. It keeps data when power is removed, so it stores fixed programs such as BIOS/boot code, look-up tables and microcode.
Structure: a ROM has address lines and data outputs. An -to- decoder selects one word (row); a programmable OR array (links at row–column crossings) gives the output bits. So a ROM can implement any set of Boolean functions of variables in sum-of-minterms form.
A(n-1)..A0 -->[ n:2^n decoder ]--> 2^n word lines
|
[ OR array (links) ]
|
D(m-1) ... D0 (outputs)
Types:
| Type | How programmed / erased |
|---|---|
| Mask ROM | Fixed by the maker using a photo-mask |
| PROM | Fuses blown once by the user |
| EPROM | Electrically written, erased by UV light |
| EEPROM | Electrically written and erased, byte-wise |
| Flash | Electrically erased in blocks |
Example: a ROM has 5 address lines and 8 outputs, storing 256 bits.
- 2074 Asoj · 3 marks
Write a short note on DE-MUX tree.
Answer
A DEMUX tree is a large demultiplexer formed by connecting smaller demultiplexers in two or more levels. It is used when a DEMUX of the required size is not available as one IC.
Principle: the first-level DEMUX receives the data input and is driven by the higher-order select bits; each of its outputs feeds a second-level DEMUX driven by the lower-order select bits. Number of outputs = product of the outputs of each level.
Example: 1:16 DEMUX from five 1:4 DEMUXes
S1 S0
S3 S2 +-->[1:4]-- Y0..Y3
+-------+ |
D -->| 1:4 |---+-->[1:4]-- Y4..Y7
| DEMUX |---+
+-------+ +-->[1:4]-- Y8..Y11
|
+-->[1:4]-- Y12..Y15
If , the first DEMUX sends D to the second DEMUX (group 01), which sends it to its output 2, i.e. .
Features:
- No extra gates are needed; only select lines are shared.
- Other sizes: 1:32 from 1:8 and 1:4 (or 1:2), 1:8 from 1:2 DEMUXes, etc.
- Delay increases with the number of levels.
- 2073 Shrawan · 5 marks
Implement a full adder circuit using 4:1 Multiplexers.
Answer
A full adder has inputs , , and outputs Sum and Carry . Two 4:1 MUXes are used, one for each output, with and on the select lines (, ) and on the data side.
Truth table
| A | B | S | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Implementation tables
For data input (), the two rows are (minterm ) and (minterm ).
Sum:
| 0 | 2 | 4 | 6 | |
| 1 | 3 | 5 | 7 | |
| Input |
Carry:
| 0 | 2 | 4 | 6 | |
| 1 | 3 | 5 | 7 | |
| Input | 0 | 1 |
Circuit
+-------+ +-------+
Cin -------->| I0 | 0 --------->| I0 |
Cin --[NOT]->| I1 4:1|-> S Cin ------->| I1 4:1|-> Cout
Cin'-------->| I2 | Cin ------->| I2 |
Cin -------->| I3 | 1 --------->| I3 |
+-------+ +-------+
A B A B
Check
From the MUX equation:
which is the standard carry expression. For : select gives and , i.e. . All eight rows were verified.
- 2073 Shrawan · 6 marks
Design 1:32 demultiplexer tree using 1:8 DEMUXs and 1:2 DEMUXs only.
Answer
A 1:32 DEMUX has one data input , five select lines and 32 outputs –. Since , it can be built with three 1:2 DEMUXes and four 1:8 DEMUXes in three levels.
Design
| Level | DEMUXes | Select | Outputs |
|---|---|---|---|
| 1 | one 1:2 (DM-A) | 2 lines | |
| 2 | two 1:2 (DM-B, DM-C) | 4 lines | |
| 3 | four 1:8 (DM1–DM4) | 32 outputs |
S2S1S0
S3 +->[1:8 DM1]-- Y0..Y7
S4 +[1:2]-+
+[1:2]--+ DM-B +->[1:8 DM2]-- Y8..Y15
D -->| DM-A |
+-------+ S3 +->[1:8 DM3]-- Y16..Y23
+[1:2]-+
DM-C +->[1:8 DM4]-- Y24..Y31
- DM-A output 0 (when ) feeds DM-B; output 1 feeds DM-C.
- DM-B sends data to DM1 () or DM2 (); DM-C to DM3 or DM4.
- Each 1:8 DEMUX decodes to one of its eight outputs.
| Active 1:8 DEMUX | Output range | |
|---|---|---|
| 00 | DM1 | – |
| 01 | DM2 | – |
| 10 | DM3 | – |
| 11 | DM4 | – |
Example
(): DM-A () → DM-C; DM-C () → DM4; DM4 () → its output 2, which is . So appears at and all other outputs stay 0.
Total: 3 DEMUXes of 1:2 + 4 DEMUXes of 1:8 = 7 ICs, no extra gates.
- 2073 Shrawan · 2+6 marks
Differentiate between combinational and sequential circuits. Explain BCD-to-Decimal decoder circuit with suitable diagram.
Answer
Combinational vs sequential circuits
| Point | Combinational | Sequential |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and past state |
| Memory | None | Has memory (flip-flops) |
| Feedback | No | Yes |
| Clock | Not needed | Usually needed (synchronous) |
| Building blocks | Gates | Gates + flip-flops |
| Examples | Adder, MUX, decoder | Counter, register, FSM |
BCD-to-decimal decoder
A BCD-to-decimal (4-line to 10-line) decoder accepts a 4-bit BCD code ( = MSB) and makes exactly one of ten outputs – active, showing the decimal digit. The 7442 is the TTL IC (active-low outputs).
Truth table
| ABCD | Active output | ABCD | Active output |
|---|---|---|---|
| 0000 | 0101 | ||
| 0001 | 0110 | ||
| 0010 | 0111 | ||
| 0011 | 1000 | ||
| 0100 | 1001 |
Codes 1010–1111 are invalid in BCD, so they are don't-cares.
Output expressions. With full decoding each output is a 4-variable minterm, e.g. . Using the don't-cares (K-map grouping), shorter expressions are obtained:
| Output | Full decoding | Simplified |
|---|---|---|
For example, : 1000 can be grouped with don't-cares 1010, 1100, 1110, giving .
Logic diagram
A B C D
| | | |---[NOT]-- D'
| | |------[NOT]-- C'
| |---------[NOT]-- B'
|------------[NOT]-- A'
A',B',C',D' --[AND4]--> D0
A',B',C',D --[AND4]--> D1
B',C,D' --[AND3]--> D2
B',C,D --[AND3]--> D3
B,C',D' --[AND3]--> D4
B,C',D --[AND3]--> D5
B,C,D' --[AND3]--> D6
B,C,D --[AND3]--> D7
A,D' --[AND2]--> D8
A,D --[AND2]--> D9
Working: for input , only the gate has all inputs 1, so and the others are 0. The simplified version gives false outputs for invalid codes (e.g. 1111 activates and ); if invalid codes must be rejected, full decoding is used, as in the 7442 which keeps all outputs inactive for 1010–1111. Uses: driving decimal indicators (Nixie tubes, LEDs) and selecting one of ten devices.
- 2072 Chaitra · 4+3 marks
How do you design 32:1 Mux by using multiplexer tree? Implement logic function Y = Σm(0,1,3,8,9,13,15) by using suitable multiplexer.
Answer
32:1 MUX by multiplexer tree
A 32:1 MUX needs 5 select lines –. A common tree uses four 8:1 MUXes and one 4:1 MUX:
- Level 1: four 8:1 MUXes with selects : M1 takes –, M2 –, M3 –, M4 –.
- Level 2: one 4:1 MUX (M5) with selects selects one of M1–M4.
S2 S1 S0
I0-I7 -->[M1 8:1]--+
I8-I15 -->[M2 8:1]--+-->[M5 4:1]---> Y
I16-I23 -->[M3 8:1]--+ S4 S3
I24-I31 -->[M4 8:1]--+
| Selected MUX | Inputs reached | |
|---|---|---|
| 00 | M1 | – |
| 01 | M2 | – |
| 10 | M3 | – |
| 11 | M4 | – |
Example: → M3 picks its input 5 () and M5 () passes it, so . (With only 4:1 MUXes the tree would need 8 + 2 + 1 = 11 MUXes.)
Implementing
The largest minterm is 15, so . A suitable MUX is an 8:1 MUX with on the selects and on the data inputs.
| 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | |
| 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | |
| Input | 1 | 0 | 0 | 1 | 0 |
+--------+
1 ------->| I0 |
D ------->| I1 |
0 ------->| I2 |
0 ------->| I3 8:1 |----> Y
1 ------->| I4 MUX |
0 ------->| I5 |
D ------->| I6 |
D ------->| I7 |
+--------+
A B C
Check: (15): select 111 → , . (2): select 001 → , . All 16 rows match.
- 2070 Chaitra · 4 marks
Realize the logic circuit of the following using 8:1 MUX. F(W,X,Y,Z) = Σm(1,2,5,7,8,10,12,13,15)
Answer
Use as the select lines of the 8:1 MUX and connect , , 0 or 1 to the data inputs. Input covers minterms () and ().
Required minterms: 1, 2, 5, 7, 8, 10, 12, 13, 15.
| 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | |
| 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | |
| Input | 1 |
+--------+
Z -------->| I0 |
Z' ------->| I1 |
Z -------->| I2 |
Z -------->| I3 8:1 |----> F
Z' ------->| I4 MUX |
Z' ------->| I5 |
1 -------->| I6 |
Z -------->| I7 |
+--------+
W X Y
(Z' from one NOT gate)
Check: (12): select 110 → , so . (9): select 100 → , so (9 is not a minterm). Correct.
- 2068 Chaitra · 5 marks
Design a 32 to 1 multiplexer using 16 to 1 and 2 to 1 multiplexers.
Answer
A 32:1 MUX has inputs – and five select lines . It is built from two 16:1 MUXes and one 2:1 MUX (a multiplexer tree).
Design
- Level 1: MUX-1 (16:1) takes –; MUX-2 (16:1) takes –. Both share the lower selects .
- Level 2: a 2:1 MUX with select passes MUX-1 output when and MUX-2 output when .
S3 S2 S1 S0
+-----------+
I0-I15 -->| 16:1 MUX-1|--P--+ S4
+-----------+ | +------+
+-->|0 |
+-----------+ | 2:1 |---> Y
I16-I31 ->| 16:1 MUX-2|--Q----->|1 |
+-----------+ +------+
S3 S2 S1 S0
Output equation
where and , with the minterms of .
| Y | ||
|---|---|---|
| 0 | 0000 – 1111 | – |
| 1 | 0000 – 1111 | – |
Example
(= 25). MUX-1 gives and MUX-2 gives (both select input 9). The 2:1 MUX with passes , so . Correct.
Alternative: if the 16:1 MUXes (e.g. 74150) have enable inputs, connect to the enable of MUX-1 and to MUX-2, and OR the two outputs instead of using the 2:1 MUX.
- 2068 Chaitra · 5 marks
Design a 3-bit even parity generator and 4-bit even parity checker circuit.
Answer
Parity is used to detect single-bit errors. With even parity, the transmitted word (data + parity bit) always has an even number of 1s.
3-bit even parity generator
Inputs ; output makes the total number of 1s even.
| A | B | C | P |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
A --+
+--[XOR]--+
B --+ +--[XOR]--- P
C ------------+
4-bit even parity checker
The receiver gets and produces the parity error check : 0 if the count of 1s is even (no error), 1 if odd (error).
| A B C P | No. of 1s | PEC |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0011 | 2 | 0 |
| 0111 | 3 | 1 |
| 1111 | 4 | 0 |
| (other rows follow the same rule) |
for minterms 1, 2, 4, 7, 8, 11, 13, 14 (odd number of 1s). The K-map is a checkerboard, so
A --+
+--[XOR]--+
B --+ |
+--[XOR]--- PEC
C --+ |
+--[XOR]--+
P --+
Example
Data : generator gives ; sent word . If received correctly, (no error). If bit C flips (received ), , so an error is flagged.
- 2082 Shrawan · 4 marks
Implement 16:1 multiplexer using only 8:1 multiplexers.
Answer
A 16:1 MUX has inputs – and four selects . Using only 8:1 MUXes, three are needed:
- MUX-1 (8:1): inputs –, selects , output .
- MUX-2 (8:1): inputs –, selects , output .
- MUX-3 (8:1) used as a 2:1 MUX: to its , to its ; its select is driven by and its other two selects are tied to 0.
S2 S1 S0
+--------+
I0-I7->| MUX-1 |--P--+ +--------+
+--------+ +---->| I0 |
+--------+ +---->| I1 MUX3|---> Y
I8-15->| MUX-2 |--Q--+ | I2-I7=0|
+--------+ +--------+
S2 S1 S0 0 0 S3
(S2 S1 S0 of MUX-3)
| Y | |
|---|---|
| 0 | = one of – |
| 1 | = one of – |
Example: : , ; MUX-3 select passes , so . Correct.
- 2082 Shrawan · 4 marks
Realize a full-subtractor circuit using a single 2×4 decoder and necessary logic gates.
Answer
A full subtractor computes , giving difference and borrow . A single 2×4 decoder has only two inputs, so feed it and ; its outputs are the minterms of , and is combined with gates.
Truth table grouped by AB
| A | B | D | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
| AB | Decoder line | D | |
|---|---|---|---|
| 00 | |||
| 01 | 1 | ||
| 10 | 0 | ||
| 11 |
Equations
(Here and .)
+--------+
A ----->| 2x4 Y0|---> E (OR)
B ----->| Y1|---> P (OR), Bout (OR)
| Y2|---> P (OR)
| Y3|---> E (OR)
+--------+
Y0, Y3 ---[OR]--- E (= A xnor B)
Y1, Y2 ---[OR]--- P (= A xor B)
P, Bin ---[XOR]------------------ D
E, Bin ---[AND]--- E.Bin --+
Y1 ------------------------+-[OR]-- Bout
Gates: 2 OR (2-input), 1 XOR, 1 AND, 1 OR.
Check: : , , , ; indeed , i.e. with borrow 1. All 8 rows were verified.
- 2082 Shrawan · 2+3 marks
Differentiate between RAM and ROM. How does an EEPROM cell work?
Answer
RAM vs ROM
| Point | RAM | ROM |
|---|---|---|
| Full form | Random Access Memory | Read Only Memory |
| Operation | Read and write | Read only (written once / rarely) |
| Volatility | Volatile: data lost on power off | Non-volatile: data kept |
| Use | Temporary data, running programs | Firmware, BIOS, look-up tables |
| Types | SRAM, DRAM | Mask ROM, PROM, EPROM, EEPROM |
| Write speed | Fast | Slow or not possible |
Working of an EEPROM cell
EEPROM (Electrically Erasable PROM) can be written and erased electrically, byte by byte, in the circuit. Each cell uses a floating-gate MOSFET (FLOTOX) plus a select transistor.
Control gate
==============
oxide
-------------- Floating gate (isolated)
thin tunnel oxide (~10 nm)
n+ Source [ p-substrate ] n+ Drain
- Structure: a floating gate, fully surrounded by oxide, lies between the control gate and the channel. A small region of very thin oxide lies over the drain.
- Programming (write): a high voltage (about 12–20 V) is applied to the control gate with the drain grounded. Electrons tunnel through the thin oxide into the floating gate (Fowler–Nordheim tunnelling). The trapped negative charge raises the transistor's threshold voltage.
- Erasing: the voltage is reversed (high voltage on the drain, control gate grounded), so electrons tunnel back out of the floating gate and the threshold falls to its normal value.
- Reading: a normal voltage is applied to the control gate. A charged cell does not conduct (read as 0); an uncharged cell conducts (read as 1). The charge stays for 10+ years without power, so the memory is non-volatile.
EEPROM does not need UV light (unlike EPROM), but the cell is larger and the number of write cycles is limited (about –).
- 2082 Baisakh · 5 marks
Design a circuit that compares two 4-bit numbers, A and B, to check if they are equal. The circuit has one output X, so that X = 1 if A = B and X = 0 if A ≠ B.
Answer
Two 4-bit numbers and are equal only when every pair of corresponding bits is equal. Equality of one pair is detected by an XNOR gate.
Bit-equality signals
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Output
only if all four :
Equivalent form with XOR and NOR:
A full truth table would have rows with in only 16 of them (), so the bit-wise method is used instead of a K-map.
Logic circuit
A3 --+
B3 --+--[XNOR]-- x3 --+
A2 --+ |
B2 --+--[XNOR]-- x2 --+
+--[AND 4]--- X
A1 --+ |
B1 --+--[XNOR]-- x1 --+
A0 --+ |
B0 --+--[XNOR]-- x0 --+
Gates: four 2-input XNOR gates and one 4-input AND gate.
Examples
| A | B | X | |
|---|---|---|---|
| 1011 | 1011 | 1111 | 1 |
| 1011 | 1001 | 1101 | 0 |
| 0110 | 1110 | 0111 | 0 |
This is the "A = B" part of the 7485 4-bit magnitude comparator.
- 2082 Baisakh · 4 marks
Implement the following function with 8:1 multiplexer F(A,B,C,D) = Σm(0,1,3,4,8,9,15) + dΣ(2,6,13).
Answer
Use as the select lines and (or , 0, 1) on the data inputs. Input covers minterms () and ().
- Minterms: 0, 1, 3, 4, 8, 9, 15
- Don't-cares: 2, 6, 13 (each can be taken as 0 or 1, whichever gives a simpler input)
Implementation table (X = don't care)
| 0 | X(2) | 4 | X(6) | 8 | 10 | 12 | 14 | |
| 1 | 3 | 5 | 7 | 9 | 11 | X(13) | 15 | |
| Input | 1 | 1 | 0 | 1 | 0 | 0 |
Choices for the don't-cares:
- : minterm 3 is 1; taking d(2) = 1 gives (no gate needed).
- : minterm 7 is 0; taking d(6) = 0 gives .
- : minterm 12 is 0; taking d(13) = 0 gives .
Circuit
+--------+
1 -------->| I0 |
1 -------->| I1 |
D --[NOT]->| I2 |
0 -------->| I3 8:1 |----> F
1 -------->| I4 MUX |
0 -------->| I5 |
0 -------->| I6 |
D -------->| I7 |
+--------+
A B C
Check: (4): select 010 → , . (5): , . (15): . All required minterms give 1 and all other non-don't-care minterms give 0.
- 2082 Baisakh · 6 marks
Implement the circuit with a PLA of the following Boolean function: F1 = Σm(3,5,6,7) and F2 = Σm(0,2,4,7).
Answer
A PLA (Programmable Logic Array) has a programmable AND array that forms product terms and a programmable OR array that sums them into outputs. To use it efficiently, each function is minimized and product terms are shared where possible.
Simplification
:
| A \ BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 |
:
| A \ BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 |
Groups: (0, 2) gives ; (0, 4) gives ; 7 alone gives .
PLA programming table
Six product terms are needed (none is common to both functions). In the input columns 1 = true variable, 0 = complemented, – = not connected; in the output columns 1 = term connected to that OR gate.
| Term | Product | A | B | C | ||
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | – | 1 | – | |
| 2 | 1 | – | 1 | 1 | – | |
| 3 | – | 1 | 1 | 1 | – | |
| 4 | 0 | – | 0 | – | 1 | |
| 5 | – | 0 | 0 | – | 1 | |
| 6 | 1 | 1 | 1 | – | 1 |
Size: 3 inputs × 6 product terms × 2 outputs.
PLA diagram
A A' B B' C C' (input buffers)
| | | | | |
x--+--x--+--+--+--[AND]-- P1 = AB
x--+--+--+--x--+--[AND]-- P2 = AC
+--+--x--+--x--+--[AND]-- P3 = BC
+--x--+--+--+--x--[AND]-- P4 = A'C'
+--+--+--x--+--x--[AND]-- P5 = B'C'
x--+--x--+--x--+--[AND]-- P6 = ABC
OR array
P1, P2, P3 ----------[OR]--> F1
P4, P5, P6 ----------[OR]--> F2
(x = programmed connection)
Check: (6): , so ; , so . Both match the given minterm lists for all 8 inputs.
- 2081 Bhadra · 3+3 marks
Realize logic circuit for segment "b" and "d" of the seven segment display decoder.
Answer
A BCD-to-seven-segment decoder takes BCD input ( = MSB) and drives segments a–g. Inputs 10–15 never occur, so they are don't-cares (X).
a
---
f | g | b
---
e | | c
---
d
Segment "b"
Segment b is ON for digits 0, 1, 2, 3, 4, 7, 8, 9 (OFF for 5, 6).
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 1 | 1 |
| 01 | 1 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 1 | 1 | X | X |
Groups: (rows 00 and 10), (column 00), (column 11).
B ---[NOT]---------------+
C --+ +--[OR]--- b
D --+--[XNOR]------------+
Segment "d"
Segment d is ON for digits 0, 2, 3, 5, 6, 8, 9 (OFF for 1, 4, 7).
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 1 | 1 |
| 01 | 0 | 1 | 0 | 1 |
| 11 | X | X | X | X |
| 10 | 1 | 1 | X | X |
Groups: (rows 11, 10); (corners 0, 2, 8, 10); (2, 3, 10, 11); (2, 6, 10, 14); (5 with 13).
B',D' ---[AND]---+
B',C ---[AND]---+
C,D' ---[AND]---+--[OR 5]--- d
B,C',D --[AND]---+
A ---------------+
Check: digit 5 (): (b off) and (d on). Digit 7 (): and every term of is 0. Both expressions were verified for digits 0–9.
- 2081 Baisakh · 2+5 marks
Differentiate between encoder and decoder. Design an 8 to 3 encoder with diagrams.
Answer
Encoder vs decoder
| Point | Encoder | Decoder |
|---|---|---|
| Function | Converts one active line to a binary code | Converts a binary code to one active line |
| Inputs / outputs | inputs, outputs | inputs, outputs |
| Main gates | OR gates | AND gates |
| Example | 8-to-3 (octal to binary) | 3-to-8 (74138) |
| Use | Keyboards, interrupt encoding | Address decoding, display driving |
8-to-3 encoder
An 8-to-3 (octal-to-binary) encoder has eight inputs – and three outputs . When one input is 1, the output is the binary code of . Only one input is assumed active at a time.
Truth table
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
Output equations. Each output is 1 for the inputs whose code has a 1 in that bit:
Logic diagram
D4, D5, D6, D7 ---[OR 4]---> Y2
D2, D3, D6, D7 ---[OR 4]---> Y1
D1, D3, D5, D7 ---[OR 4]---> Y0
(D0 not connected: it gives 000)
Example: → , , , output .
Limitations: and "no input active" both give 000, and two active inputs give a wrong code (e.g. and give 111). A valid-output bit and a priority encoder (74148) remove these problems.
- 2081 Baisakh · 2+4 marks
Explain the applications of de-multiplexer. Subtract 011 from 010 using 2's complement method.
Answer
Applications of a demultiplexer
A demultiplexer sends one input to one of many outputs selected by the select lines. Uses:
- Data distribution / serial-to-parallel conversion: serial data on one line is sent to different output lines in turn.
- Time-division demultiplexing in communication: separating signals from a shared line at the receiver (e.g. telephone exchanges).
- Decoder function: with data input held at 1 (or used as enable), a 1: DEMUX works as an -to- decoder for memory address decoding and chip selection.
- Boolean function generation: outputs give minterms, which can be ORed to realize functions (e.g. full adder).
- Control signal routing in ALUs, microprocessors and multi-display systems.
(010)₂ − (011)₂ using 2's complement
Here and ; expected result .
- 2's complement of the subtrahend :
- 1's complement:
- add 1:
- Add to the minuend:
010 (+2)
+ 101 (2's complement of 3)
-----
111 (no end carry)
- There is no end carry, so the result is negative and is in 2's complement form. Take the 2's complement of to get its magnitude:
- 1's complement:
- add 1:
Answer: . In 3-bit 2's complement form the result is stored as .
- 2081 Baisakh · 2+5 marks
Differentiate between de-multiplexer and decoder. Construct 4×16 line decoder using 2×4 line decoders with enable.
Answer
DEMUX vs decoder
| Point | Demultiplexer | Decoder |
|---|---|---|
| Inputs | 1 data + select lines | code inputs (+ enable) |
| Outputs | ||
| Job | Routes the data bit to one output | Activates the output for the input code |
| Output value | Equals the data input | Fixed active level (1 or 0) |
| Typical use | Data distribution | Address decoding, code conversion |
A decoder with enable becomes a DEMUX when the enable pin is used as the data input; e.g. 74138 serves both roles.
4×16 decoder from 2×4 decoders with enable
A 4×16 decoder has inputs ( = MSB) and outputs –. Use five 2×4 decoders:
- Decoder 0 (control): inputs ; enable tied to 1 (or to an overall enable ). Its outputs – enable one of the four output decoders.
- Decoders 1–4: inputs ; each enable comes from one output of decoder 0. Each produces four of the final outputs.
A B C D
+--------+ +--------+
E ->|E O0 |------------>|E DEC1 |--> Y0 .. Y3
| O1 |---------+ +--------+
| DEC0 | | +--------+
| O2 |------+ +-->|E DEC2 |--> Y4 .. Y7
| O3 |---+ | +--------+
+--------+ | | +--------+
| +----->|E DEC3 |--> Y8 .. Y11
| +--------+
| +--------+
+-------->|E DEC4 |--> Y12 .. Y15
+--------+
(C, D go to all of DEC1 - DEC4)
Connections: DEC1, DEC2, DEC3, DEC4 (all enables).
| AB | Enabled decoder | Outputs for CD = 00…11 |
|---|---|---|
| 00 | DEC1 | – |
| 01 | DEC2 | – |
| 10 | DEC3 | – |
| 11 | DEC4 | – |
Working
Input : decoder 0 sees and enables DEC4 only; DEC4 decodes and makes its second output high, i.e. . The disabled decoders keep all their outputs at 0, so exactly one of the 16 lines is active, giving .
- 2081 Baisakh · 2 marks
Write a short note on PROM.
Answer
PROM (Programmable Read-Only Memory) is a ROM that is manufactured blank and can be programmed once by the user with a PROM programmer. After programming its contents cannot be changed (one-time programmable, OTP).
- Structure: a fixed AND array (decoder producing all minterms of the address lines) and a programmable OR array. Each cross-point has a fusible link (nichrome or polysilicon fuse, or a diode).
- Programming: all fuses are intact at first (all bits 1). A high current pulse blows selected fuses, making those bits 0. This is permanent.
- Uses: storing fixed programs, look-up tables and code converters; it can implement any combinational function in sum-of-minterms form.
Unlike EPROM or EEPROM, a PROM cannot be erased; a mistake means a new chip.
- 2081 Baisakh · 2 marks
Write a short note on MUX tree.
Answer
A MUX tree is a way of building a large multiplexer from several smaller multiplexers connected in levels (a tree). It is used when a single IC with enough inputs is not available.
- The first level of small MUXes receives the data inputs. The lower-order select lines are applied to all of them in common.
- The outputs of the first level go to the data inputs of the next level, which is driven by the higher-order select lines.
- The last MUX gives the final output .
Example: 8:1 MUX from 2:1 MUXes (needs 4 + 2 + 1 = 7 MUXes):
I0,I1 -[2:1]-+
I2,I3 -[2:1]-+-[2:1]-+
I4,I5 -[2:1]-+ +-[2:1]--> Y
I6,I7 -[2:1]-+-[2:1]-+
^S0 ^S1 ^S2
Similarly a 16:1 MUX can be built from five 4:1 MUXes (four in the first level using , one in the second level using ).
Advantages: large MUX from standard small ICs; easy to expand. Drawback: more ICs and more propagation delay (one MUX delay per level).
- 2080 Bhadra · 1+4 marks
What is meant by a decoder? Construct 3×8 decoder using two 2×4 decoders and additional gates if required.
Answer
A decoder is a combinational circuit that converts an -bit binary input code into one of unique output lines; for each input combination exactly one output is active (it generates all minterms).
3×8 decoder using two 2×4 decoders
Let the inputs be (MSB), , (LSB). Each 2×4 decoder has an enable input (active high).
- and go to the inputs of both 2×4 decoders.
- selects which decoder works: (through a NOT gate) drives of decoder 1 and drives of decoder 2.
- When , decoder 1 is enabled and gives –; when , decoder 2 gives –.
+---------+
B,C ---+----->| 2x4 #1 |--> D0..D3
| +->| E |
| | +---------+
A -+-[NOT]-+
| | +---------+
| +----->| 2x4 #2 |--> D4..D7
+--------->| E |
+---------+
| A | B | C | Active output |
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 0 | 1 | |
| 0 | 1 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 | |
| 1 | 1 | 1 |
Only one extra gate (an inverter) is needed. With an overall enable , use and (two AND gates) for the two enables.
- 2080 Baisakh · 2+4 marks
What is a priority encoder? Find out logic expressions and draw the logic circuit of 4 to 2 priority encoder.
Answer
A priority encoder is an encoder that gives the binary code of the highest-priority active input when more than one input is active at the same time. It also has a valid output that shows whether any input is active (an ordinary encoder gives a wrong code when two inputs are high).
4-to-2 priority encoder
Inputs –, with the highest priority. Outputs and (X = don't care).
| 0 | 0 | 0 | 0 | X | X | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | X | 0 | 1 | 1 |
| 0 | 1 | X | X | 1 | 0 | 1 |
| 1 | X | X | X | 1 | 1 | 1 |
Expressions (from K-maps of the expanded table):
- when or :
- when , or when with (and ):
- is 1 if any input is 1:
Logic circuit
D3 -----------+---------> [OR] --> Y1
D2 ---+-------|---------> [ ]
| |
+-[NOT]-|-+
| [AND]-+
D1 -----------|-[ ] +-> [OR] --> Y0
+---------> [ ]
D0,D1,D2,D3 ----------> [4-in OR] --> V
So the circuit needs one NOT, one 2-input AND, two 2-input OR gates and one 4-input OR gate. Example: gives because has higher priority than .
- 2080 Baisakh · 2+4 marks
What is a ROM? Explain it how one bit memory is stored as '1' or '0', based on BJT circuit.
Answer
ROM (Read Only Memory) is a non-volatile semiconductor memory in which data is written once (during manufacture or by programming) and afterwards can only be read. Data stays even when power is removed. It is used to store fixed programs (BIOS, firmware), look-up tables and code converters. Types: mask ROM, PROM, EPROM, EEPROM.
Storing 1 or 0 in a BJT ROM cell
A bipolar ROM is an array of row (word) lines and column (bit) lines. At each crossing there is a cell position where a BJT may or may not be connected.
- The base of the transistor is connected to the row line.
- The collector is connected to .
- The emitter is connected to the column line only if a 1 is to be stored. Each column line has a resistor to ground.
Vcc Row line (from decoder)
| |
C |
\|--------+ (stored '1')
/| B
E
|
==+===== Column line --> sense --> Data = 1
|
[R]
|
GND
Stored '0': emitter link absent (or fuse blown),
so column stays at 0 V through R.
Reading:
- The address decoder makes the selected row line HIGH.
- In a cell storing 1, the transistor's base is high, so it conducts (emitter follower). Current flows through the column resistor and the column line goes HIGH, which is read as 1.
- In a cell storing 0, there is no emitter connection, so no current flows into that column; the resistor keeps it at 0 V, read as 0.
- Unselected rows are LOW, so their transistors are off and do not affect the columns.
In a mask ROM the connection is made or left out by the metal mask. In a bipolar PROM every cell is made with a fusible link in the emitter; the user stores a 0 by blowing the fuse with a high current pulse, and the intact fuse keeps a 1. Since the stored pattern is fixed by a physical connection, the data is non-volatile.
- 2079 Bhadra · 4 marks
Realize full-adder using a single 4:1 MUX and logical gates.
Answer
A full adder adds , and and gives
Use and as the select lines (, ) of the 4:1 MUX and express each output in terms of .
Truth table grouped by A, B
| A | B | S | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
| AB | S in terms of | in terms of |
|---|---|---|
| 00 () | 0 | |
| 01 () | ||
| 10 () | ||
| 11 () | 1 |
Realization
- Sum from the single 4:1 MUX: , , , (one NOT gate gives ).
- Carry from gates: , using one XOR, two AND and one OR gate (or the simpler ).
Cin ------+----------> I0 +-------+
+-[NOT]--+-> I1 | 4:1 |
+-> I2 | MUX |--> S
Cin -----------------> I3 | |
+-------+
S1=A S0=B
A --+--[AND]---------------+
B --+--[ ] +--[OR]--> Cout
A,B --[XOR]--[AND]---------+
Cin ---------[ ]
Check: selects so , and . This matches .
(If a second 4:1 MUX were allowed, would use .)
- 2079 Bhadra · 6 marks
Design the BCD to seven segment decoder. Obtain the simplest logic expressions for segments "a" and "e" also draw their circuits.
Answer
A BCD-to-seven-segment decoder takes a 4-bit BCD digit ( = MSB) and drives the seven segments a–g of a display so that the decimal digit 0–9 is shown. Inputs 1010–1111 never occur, so they are don't cares. (Common-cathode display: a 1 lights the segment.)
--a--
| |
f b
|--g--|
e c
| |
--d--
Truth table for segments a and e
| Digit | A B C D | a | e |
|---|---|---|---|
| 0 | 0000 | 1 | 1 |
| 1 | 0001 | 0 | 0 |
| 2 | 0010 | 1 | 1 |
| 3 | 0011 | 1 | 0 |
| 4 | 0100 | 0 | 0 |
| 5 | 0101 | 1 | 0 |
| 6 | 0110 | 1 | 1 |
| 7 | 0111 | 1 | 0 |
| 8 | 1000 | 1 | 1 |
| 9 | 1001 | 1 | 0 |
So and .
K-map for a
CD=00 01 11 10
AB=00 1 0 1 1
AB=01 0 1 1 1
AB=11 X X X X
AB=10 1 1 X X
Groups: (rows 11, 10 with don't cares), (columns 11, 10), (cells 5, 7, 13, 15), (corners 0, 2, 8, 10).
K-map for e
CD=00 01 11 10
AB=00 1 0 0 1
AB=01 0 0 0 1
AB=11 X X X X
AB=10 1 0 X X
Groups: (corners 0, 2, 8, 10) and (column 10: 2, 6, 14, 10).
Circuits
a: A --------------------+
C --------------------+
B --+[AND]------------+--[4-in OR]--> a
D --+[ ] |
B'--+[AND]------------+
D'--+[ ]
e: B' --+--[OR]--+
C --+--[ ] +--[AND]--> e
D' -----------+--[ ]
needs only one OR gate, one AND gate and an inverter for ( is shared with segment a). Check: digit 6 (0110): , , correct.
- 2079 Bhadra · 2+4 marks
What is a memory device? Distinguish between PAL and PLA memory devices.
Answer
A memory device is a device that stores binary information (bits) and lets it be read back, and in some types written. Each stored word is reached by an address. Examples: ROM, PROM, EPROM, RAM. Programmable logic devices such as PROM, PAL and PLA use the same array structure (an AND array that decodes the inputs and an OR array that holds the pattern), so they are studied with memories.
PAL vs PLA
PLA (Programmable Logic Array): both the AND array and the OR array are programmable. PAL (Programmable Array Logic): the AND array is programmable but the OR array is fixed (each OR gate gets a fixed group of product terms).
| Point | PAL | PLA |
|---|---|---|
| AND array | Programmable | Programmable |
| OR array | Fixed | Programmable |
| Sharing of product terms | Not possible; each output has its own terms | Any product term can feed any output |
| Flexibility | Less | More |
| Speed | Faster (fewer programmable links in path) | Slower |
| Cost and complexity | Cheaper, simpler to make | Costlier, more complex |
| Terms per output | Limited to a fixed number | Limited only by total AND gates |
| Typical use | Simple glue logic, widely used (e.g. PAL16L8) | Multi-output functions with common terms |
PAL: inputs -> [programmable AND] -> [fixed OR] -> out
PLA: inputs -> [programmable AND] -> [prog. OR] -> out
Example: if and , a PLA generates once and feeds it to both outputs; a PAL must generate twice, once in each OR group.
- 2078 Bhadra · 4+3 marks
Implement the given function F = Σ(0,2,3,5,8,12,14) using only one 8:1 MUX. Add the binary numbers 1011 and 1101 by using Full adders.
Answer
Implementing F = Σ(0,2,3,5,8,12,14) with one 8:1 MUX
Take as select lines () and the LSB as the data variable. Each data input covers minterms () and ().
| ABC | Minterms (=0, =1) | In F? | ||
|---|---|---|---|---|
| 000 | 0, 1 | yes, no | ||
| 001 | 2, 3 | yes, yes | 1 | |
| 010 | 4, 5 | no, yes | ||
| 011 | 6, 7 | no, no | 0 | |
| 100 | 8, 9 | yes, no | ||
| 101 | 10, 11 | no, no | 0 | |
| 110 | 12, 13 | yes, no | ||
| 111 | 14, 15 | yes, no |
D' --> I0 +--------+
1 --> I1 | |
D --> I2 | 8:1 |
0 --> I3 | MUX |--> F
D' --> I4 | |
0 --> I5 | |
D' --> I6 | |
D' --> I7 +--------+
S2 S1 S0
A B C
Only one NOT gate is needed for .
Adding 1011 and 1101 with full adders
Use a 4-bit parallel adder: four full adders FA0–FA3, with and each carry going to the next stage.
A3B3 A2B2 A1B1 A0B0
1 1 0 1 1 0 1 1
[FA3]<-C3[FA2]<-C2[FA1]<-C1[FA0]<-C0=0
| \ | | |
C4 S3 S2 S1 S0
| Stage | |||||
|---|---|---|---|---|---|
| FA0 | 1 | 1 | 0 | 0 | 1 |
| FA1 | 1 | 0 | 1 | 0 | 1 |
| FA2 | 0 | 1 | 1 | 0 | 1 |
| FA3 | 1 | 1 | 1 | 1 | 1 |
Answer: (carry , sum ). Check: .
- 2078 Bhadra · 6 marks
Find out the simplest logic circuit as far as possible for the 'e' segment of the seven segment display decoder.
Answer
For a BCD-to-seven-segment decoder the input is a BCD digit ( = MSB). Codes 1010–1111 never occur, so they are don't cares. Segment e is the lower-left segment (common-cathode display: 1 = ON).
--a--
f b
--g--
e c
--d--
Truth table for e
Segment e is ON only for digits 0, 2, 6 and 8.
| Digit | A B C D | e |
|---|---|---|
| 0 | 0000 | 1 |
| 1 | 0001 | 0 |
| 2 | 0010 | 1 |
| 3 | 0011 | 0 |
| 4 | 0100 | 0 |
| 5 | 0101 | 0 |
| 6 | 0110 | 1 |
| 7 | 0111 | 0 |
| 8 | 1000 | 1 |
| 9 | 1001 | 0 |
| 10–15 | 1010–1111 | X |
K-map
CD=00 01 11 10
AB=00 1 0 0 1
AB=01 0 0 0 1
AB=11 X X X X
AB=10 1 0 X X
- Quad 1: the four corners give .
- Quad 2: column : give .
Simplest circuit
The factored form needs only one OR, one AND and two inverters:
B --[NOT]-- B' --+
+--[OR]--+
C ---------------+ +--[AND]--> e
D --[NOT]-- D' -----------+
Check: digit 2 (0010): , , so ; digit 4 (0100): , , so . Both correct.
- 2078 Bhadra · 2+3 marks
Define PLA (Programmable Logic Array). Implement the full subtractor using PLA.
Answer
A PLA (Programmable Logic Array) is a programmable logic device with a programmable AND array followed by a programmable OR array. The AND array generates the needed product terms of the inputs and the OR array sums any of them for each output, so it can implement several SOP functions that share product terms.
Full subtractor using PLA
Inputs (minuend), (subtrahend), (borrow in). Outputs: difference and borrow out .
| A | B | D | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
(XOR) cannot be simplified, so 4 + 3 = 7 product terms are needed.
PLA programming table (1 = true input, 0 = complemented, – = not used):
| Term | Product | A | B | D | ||
|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 1 | 1 | – | |
| 2 | 0 | 1 | 0 | 1 | – | |
| 3 | 1 | 0 | 0 | 1 | – | |
| 4 | 1 | 1 | 1 | 1 | – | |
| 5 | 0 | – | 1 | – | 1 | |
| 6 | 0 | 1 | – | – | 1 | |
| 7 | – | 1 | 1 | – | 1 |
A B Bin (true and complement lines)
| | |
[ AND array: P1 ... P7 ] (programmed)
|
[ OR array ]
OR1 = P1+P2+P3+P4 ---> D
OR2 = P5+P6+P7 ---> Bo
So a 3-input, 7-product-term, 2-output PLA implements the full subtractor.
- 2078 Kartik · 4 marks
Implement the given function F = Σ(0,1,3,6,10,12,14) using 8×1 MUX only.
Answer
Use as the select lines () and the LSB as the data variable. Data input covers minterm (when ) and (when ).
Implementation table (F = Σ(0,1,3,6,10,12,14)):
| row | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 |
| row | 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 |
| Input | 1 | 0 | 0 |
(Bold = minterm present in F.)
Rules: both entries present gives 1, none gives 0, only the row gives , only the row gives .
1 --> I0 +--------+
D --> I1 | |
0 --> I2 | 8x1 |
D' --> I3 | MUX |--> F
0 --> I4 | |
D' --> I5 | |
D' --> I6 | |
D' --> I7 +--------+
S2 S1 S0
A B C
Inputs 1 and 0 are tied to and ground; one inverter gives .
Check: (minterm 12) selects , so ; (minterm 5) selects , so . Both agree with the given function.
- 2078 Kartik · 2+2×2 marks
Differentiate between PROM and PLA. Implement the following boolean functions using PAL. a) A(x,y,z) = Σ(2,4,5,7) b) B(x,y,z) = Σ(0,2,6)
Answer
PROM vs PLA
| Point | PROM | PLA |
|---|---|---|
| AND array | Fixed (full decoder, all minterms) | Programmable |
| OR array | Programmable | Programmable |
| Functions in form | Sum of minterms (no simplification) | Simplified SOP, shared terms |
| Size for many inputs | Grows as , wasteful | Only needed product terms |
| Typical use | Look-up tables, code converters | Multi-output logic with common terms |
Functions using PAL
In a PAL the AND array is programmable and the OR array is fixed, so each function is first simplified to SOP.
a)
yz=00 01 11 10
x=0 0 0 0 1
x=1 1 1 1 0
- give ; give ; alone gives .
b)
yz=00 01 11 10
x=0 1 0 0 1
x=1 0 0 0 1
- give ; give .
PAL programming table (each OR gate has 3 AND inputs; 1 = true, 0 = complement, – = not connected):
| Product term | x | y | z | Output |
|---|---|---|---|---|
| 1: | 1 | 0 | – | A |
| 2: | 1 | – | 1 | A |
| 3: | 0 | 1 | 0 | A |
| 4: | 0 | – | 0 | B |
| 5: | – | 1 | 0 | B |
| 6: (unused) | – | – | – | B |
x y z --[prog. AND]-- P1,P2,P3 --[fixed OR]--> A
\----- P4,P5,P6 --[fixed OR]--> B
The unused term 6 has all its fuses intact (both and connected) so it gives 0 and does not affect B.
- 2076 Chaitra · 4 marks
Implement 1:16 demultiplexer using 1:2 demultiplexer.
Answer
A 1:16 demultiplexer sends one data input to one of 16 outputs chosen by 4 select lines . With 1:2 demultiplexers (one select line each) we build a tree of four levels.
Number of 1:2 DEMUXes: .
| Level | DEMUXes | Select line | Outputs |
|---|---|---|---|
| 1 | 1 | (MSB) | 2 |
| 2 | 2 | 4 | |
| 3 | 4 | 8 | |
| 4 | 8 | (LSB) | 16 (–) |
+-[1:2]-Y0,Y1
+-[1:2]--+
| +-[1:2]-Y2,Y3
+-[1:2]--+
| | +-[1:2]-Y4,Y5
| +-[1:2]--+
| +-[1:2]-Y6,Y7
D-[1:2]+
| +-[1:2]-Y8,Y9
| +-[1:2]--+
| | +-[1:2]-Y10,Y11
+-[1:2]--+
| +-[1:2]-Y12,Y13
+-[1:2]--+
+-[1:2]-Y14,Y15
S3 S2 S1 S0
Working:
- The first DEMUX sends to its upper output if (towards –) or lower output if (towards –).
- Each level halves the group again using , then , then .
- All DEMUXes at one level share the same select line.
Example: : level 1 goes to the lower half (8–15), level 2 () to 8–11, level 3 () to 10–11, level 4 () to . So and all other outputs are 0.
- 2076 Chaitra · 2+4 marks
Differentiate between RAM and ROM. Implement F1 = Σ(1,2,4,6) and F2 = Σm(0,2,3) using PROM.
Answer
RAM vs ROM
| Point | RAM | ROM |
|---|---|---|
| Full form | Random Access Memory | Read Only Memory |
| Operation | Read and write | Read only (written once/rarely) |
| Volatility | Volatile: data lost on power off | Non-volatile |
| Use | Temporary data and running programs | Fixed programs (BIOS, firmware), tables |
| Types | SRAM, DRAM | Mask ROM, PROM, EPROM, EEPROM |
| Speed | Fast read and write | Fast read; writing slow or impossible |
F1 = Σ(1,2,4,6) and F2 = Σ(0,2,3) using PROM
Three inputs (, , ) and two outputs, so an 8 × 2 PROM is used: a fixed 3-to-8 decoder (AND array) produces all minterms –, and the programmable OR array connects the needed minterms to each output.
PROM truth table (contents):
| Address | Minterm | ||
|---|---|---|---|
| 000 | 0 | 1 | |
| 001 | 1 | 0 | |
| 010 | 1 | 1 | |
| 011 | 0 | 1 | |
| 100 | 1 | 0 | |
| 101 | 0 | 0 | |
| 110 | 1 | 0 | |
| 111 | 0 | 0 |
A 1 means the fuse/link between that minterm line and the OR gate is kept; a 0 means it is blown.
A B C
| | |
[3-to-8 decoder] (fixed AND array)
m0 m1 m2 m3 m4 m5 m6 m7
| x x | x | x | --> OR1 --> F1
x | x x | | | | --> OR2 --> F2
(x = intact link)
No simplification is needed with a PROM, because the decoder already gives every minterm.
- 2076 Asoj
Define encoder. Design 4×16 Decoder using 2×4 Decoder only.
Answer
An encoder is a combinational circuit that does the reverse of a decoder: it has (or fewer) input lines and output lines, and gives the binary code of the input line that is active. Example: an 8-to-3 (octal-to-binary) encoder gives when input is high.
4×16 decoder using only 2×4 decoders
Inputs (MSB), , , (LSB). Each 2×4 decoder has an enable input . Five 2×4 decoders are needed, in two levels.
- First level (1 decoder): inputs , . Its four outputs act as enables, selecting one of the second-level decoders.
- Second level (4 decoders): inputs , in common. Only the enabled one gives an active output.
+-------+
C,D ------>| 2x4 #1|--> Y0..Y3
+--->| E |
| +-------+
+--------+ O0--+ +-------+
A-| 2x4 | O1------>| 2x4 #2|--> Y4..Y7
B-| (#0) | O2--+ +-------+
E-| | O3-+| +-------+
+--------+ |+--->| 2x4 #3|--> Y8..Y11
| +-------+
| +-------+
+---->| 2x4 #4|--> Y12..Y15
+-------+
(C,D go to all four second-level decoders)
| AB | Enabled decoder | Outputs active (by CD) |
|---|---|---|
| 00 | #1 | – |
| 01 | #2 | – |
| 10 | #3 | – |
| 11 | #4 | – |
Example: : decoder #0 makes O3 high, enabling #4; makes its second output high, so (since ).
- 2076 Asoj
Write a short note on PLA.
Answer
A PLA (Programmable Logic Array) is a programmable logic device made of a programmable AND array followed by a programmable OR array. It implements several Boolean functions in sum-of-products (SOP) form.
Structure (n inputs, k product terms, m outputs):
inputs --[buffers: true and complement]
|
[ programmable AND array ] -> P1 ... Pk
|
[ programmable OR array ] -> F1 ... Fm
|
[ XOR / inverter (optional) ] -> outputs
- Each input is given in true and complemented form.
- Each AND gate forms one product term by connecting chosen literals.
- Each OR gate adds any chosen product terms. A product term can be shared by several outputs.
- Size is given as , e.g. a 3 × 4 × 2 PLA.
Design steps:
- Simplify each function to minimum SOP (try both and to reduce product terms).
- Find the common product terms.
- Write the PLA programming table (inputs used, output connections, true/complement).
Example: , need only three product terms (, , ) since is shared.
Advantages: both arrays programmable, so very flexible; shares product terms; uses fewer terms than a PROM for functions with many inputs.
Disadvantages: two programmable arrays make it slower and costlier than a PAL; harder to manufacture.
- 2075 Chaitra · 5 marks
Implement the following function using 8×1 MUX. F(A,B,C,D) = Σ(0,2,3,6,7,8,12,13,15)
Answer
Use as select lines () and (LSB) as the data variable. Input corresponds to minterms (with ) and (with ).
Implementation table for (bold = minterm in F):
| row | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 |
| row | 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 |
| Input | 1 | 0 | 1 | 0 | 1 |
Rule: both circled gives 1, none gives 0, only the upper () row gives , only the lower () row gives .
Circuit:
D' --> I0 +--------+
1 --> I1 | |
0 --> I2 | 8x1 |
1 --> I3 | MUX |--> F
D' --> I4 | |
0 --> I5 | |
1 --> I6 | |
D --> I7 +--------+
S2 S1 S0
A B C
Logic 1 is tied to , logic 0 to ground, and a NOT gate gives .
Verification:
| ABCD | Minterm | Selected input | F |
|---|---|---|---|
| 0000 | 0 | 1 | |
| 0001 | 1 | 0 | |
| 1101 | 13 | 1 | |
| 1110 | 14 | 0 | |
| 1111 | 15 | 1 |
All agree with the given minterm list, so the function is realised with one 8×1 MUX and one inverter.
- 2075 Chaitra · 1+4 marks
What is ROM? Implement given functions F1(A,B,C) = Σ(2,3,5,6) and F2(A,B,C) = Σ(0,1,5) using ROM.
Answer
ROM (Read Only Memory) is a non-volatile memory whose contents are fixed once programmed and can only be read in normal operation. As a logic device it is a fixed AND array (decoder) that generates all minterms of the address inputs, followed by a programmable OR array.
F1 = Σ(2,3,5,6), F2 = Σ(0,1,5) using ROM
Three inputs and two outputs, so an 8 × 2 ROM (3-to-8 decoder + 2 OR gates).
| Address | Minterm | ||
|---|---|---|---|
| 000 | 0 | 1 | |
| 001 | 0 | 1 | |
| 010 | 1 | 0 | |
| 011 | 1 | 0 | |
| 100 | 0 | 0 | |
| 101 | 1 | 1 | |
| 110 | 1 | 0 | |
| 111 | 0 | 0 |
A B C
| | |
[3-to-8 decoder]
m0 m1 m2 m3 m4 m5 m6 m7
. . x x . x x . --> OR1 --> F1
x x . . . x . . --> OR2 --> F2
(x = connection kept, . = removed)
When an address is applied, the decoder makes one minterm line high; each output is 1 if that line is connected to its OR gate. Example: activates , which is connected to both OR gates, so .
Questions from Old Question Collection (EX 502) (IOE EX 502 exam papers (BEL/BEX/BCT II/I) from 2068 to 2081) and Old Question Collection (BEI, EX 401) (IOE EX 401 exam papers (BEI I/I) from 2075 to 2082). Answers are written for this site; check them against your class notes.
Chapter titles and hours from the IOE syllabus ↗