Chapter 3
Digital Logic
TU BSc CSIT past exam questions
Past questions and answers
66 questions set from this chapter, 2 of them more than once; 1 is most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.
- Most repeated · 3 of 8 exams
- 2075 · 10 marks
Implement the following function F = Σ(1, 2, 3, 4, 8) using
- Decoder
- Multiplexer
- PLA
Similar questions: Digital Logic: Implement the following Functions F= Σ (0,3,5,6,7) (2074) · Digital Logic: Implement the Boolean function F(P,Q,R,S) = ∑ (2080)
Answer
Take with as the MSB.
(a) Using a decoder. Use a decoder with inputs . Its outputs are the minterms . Since a decoder gives each minterm separately, connect the outputs to a 5-input OR gate:
A B C D --> [ 4 x 16 DECODER ] -- m1, m2, m3, m4, m8 --> [ 5-input OR ] --> F
(b) Using a multiplexer. Use an MUX with as the select lines () and (or its complement, 0 or 1) on the data inputs. Pair the minterms by :
| Minterms | Present in | Input | |
|---|---|---|---|
| 000 | 0, 1 | 1 only | |
| 001 | 2, 3 | both | |
| 010 | 4, 5 | 4 only | |
| 011 | 6, 7 | none | |
| 100 | 8, 9 | 8 only | |
| 101 | 10, 11 | none | |
| 110 | 12, 13 | none | |
| 111 | 14, 15 | none |
So the data inputs are , and the MUX output is .
(c) Using a PLA. First simplify with a K-map. The prime implicants are: ; ; alone ; alone . Hence
PLA programming table (4 inputs, 4 product terms, 1 output; 1 = true input, 0 = complemented input, - = not connected, 1 in the output column = term connected to the OR gate):
| Product term | |||||
|---|---|---|---|---|---|
| 0 | 0 | - | 1 | 1 | |
| 0 | 0 | 1 | - | 1 | |
| 0 | 1 | 0 | 0 | 1 | |
| 1 | 0 | 0 | 0 | 1 |
In the PLA diagram, the AND array has four AND gates that receive the inputs and their complements, with fuses left intact only where the table has 0 or 1. The OR array has one OR gate with all four product-term fuses intact, giving .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2075 · 5 marks
- 2077 · 5 marks
What is the difference between a serial and parallel transfer? Explain how to convert serial data to parallel and parallel data to serial. What type of register is needed?
Answer
Serial and parallel transfer
| Serial transfer | Parallel transfer |
|---|---|
| Data move one bit at a time over a single line | All bits of a word move at the same time, one line per bit |
| clock pulses are needed for an -bit word | One clock pulse is enough |
| Slow, but needs only one wire; suitable for long distances | Fast, but needs wires; suitable for short distances (inside a computer) |
| Example: communication between computers (UART, USB) | Example: transfer between registers over a bus |
Serial to parallel conversion. The serial data are fed bit by bit into the serial input of a shift register. After clock pulses the bits occupy the flip-flops, and all the flip-flop outputs can be read at the same time as the parallel word. Example: serial input stream shifted into a 4-bit register gives after four pulses. This is a serial-in parallel-out (SIPO) operation.
Parallel to serial conversion. The parallel word is loaded into all the flip-flops at once, using the parallel data inputs and a Load control (for example a multiplexer in front of each D input selecting between parallel data and the previous stage). The control is then switched to shift mode, and on each clock pulse the word moves one place and one bit leaves at the serial output. After pulses all bits have been sent. This is a parallel-in serial-out (PISO) operation.
Parallel in -> [load] -> FF3 -> FF2 -> FF1 -> FF0 -> Serial out (shift right)
Serial in -> FF3 -> FF2 -> FF1 -> FF0 -> parallel outputs Q3 Q2 Q1 Q0
Type of register needed. A shift register: serial-in parallel-out for serial to parallel, and parallel-in serial-out for parallel to serial. A single shift register with parallel load, shift right control and a serial input and output (a universal shift register) can perform both conversions.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2075 · 5 marks
- 2077 · 5 marks
Design 4-bit even parity generator.
Answer
Even parity generator. An even parity generator adds a parity bit to the data so that the total number of 1s in the data plus parity bit is even. So when the number of 1s in the 4 data bits is odd.
Truth table (data )
| 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | |
| 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | |
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | |
| 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | |
| 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | |
| 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Expression. The K-map has a checkerboard pattern (no two 1s adjacent), so no simplification is possible in SOP form, but the function is the exclusive-OR of all the inputs:
Circuit. Three 2-input XOR gates: and in the first level, and their outputs XORed in the second level to give . The transmitted 5-bit word is , which always has an even number of 1s.
A --\
XOR --\
B --/ \
XOR --> P
C --\ /
XOR --/
D --/
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 10 marks
Implement the following Functions F= Σ (0,3,5,6,7) using
- Decoder
- Multiplexer
- PLA
Similar questions: Digital Logic: Implement the following function F = Σ(1 (2075)
Answer
Take the function in variables ( is the MSB):
(a) Using a 3-to-8 decoder. Connect to the select inputs . The decoder produces all minterms on its outputs. Since is the sum of minterms, an OR gate collects the required outputs:
Outputs go to a 5-input OR gate whose output is (outputs are left unused). Alternatively, can be formed with a 3-input OR and inverted.
(b) Using a multiplexer. Use a 4-to-1 MUX with as select lines (, ) and as the data variable. Build the implementation table:
| Input | ||||
|---|---|---|---|---|
| 0 (m0) | 2 | 4 | 6 (m6) | |
| 1 | 3 (m3) | 5 (m5) | 7 (m7) |
Circled (present) minterms: 0, 3, 5, 6, 7. For each column:
- : only present (), so .
- : only present (), so .
- : only present (), so .
- : both present, so .
Connections: , , , , selects , , output .
(c) Using a PLA. First simplify with a K-map:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 |
Groups: gives ; gives ; gives ; stays alone as .
The PLA needs 3 inputs (), 4 product terms and 1 output. AND-plane programming:
| Product term | Output | |||
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | |
| - | 1 | 1 | 1 | |
| 1 | - | 1 | 1 | |
| 1 | 1 | - | 1 |
In the AND plane, fuses are kept for the literals shown (complemented or true form; "-" means no connection). In the OR plane, all four product terms are connected to the output .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Design a combinational circuit with three inputs, x, y, and z, and three outputs, A, B, and C. When the binary input is 0, 1, 2, or 3, the binary output is one greater than the input. When the binary input is 4, 5, 6, or 7, the binary output is one less than the input.
Similar questions: Digital Logic: Explain design procedure of combinatorial circuits. Design (2081)
Answer
Specification. For inputs from 0 to 3 the output is the input ; for inputs 4 to 7 the output is the input . Three output bits are enough (the largest output is 6).
Truth table
| Input | Output | ||||||
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 | 2 | 0 | 1 | 0 |
| 0 | 1 | 0 | 2 | 3 | 0 | 1 | 1 |
| 0 | 1 | 1 | 3 | 4 | 1 | 0 | 0 |
| 1 | 0 | 0 | 4 | 3 | 0 | 1 | 1 |
| 1 | 0 | 1 | 5 | 4 | 1 | 0 | 0 |
| 1 | 1 | 0 | 6 | 5 | 1 | 0 | 1 |
| 1 | 1 | 1 | 7 | 6 | 1 | 1 | 0 |
Simplification
- . K-map groups ; ; . So .
- . No two minterms are adjacent (a checkerboard pattern), so .
- .
Circuit. is just an inverter on . uses two XOR gates. is the majority function: three 2-input AND gates feeding a 3-input OR gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Implement the Boolean function F(P,Q,R,S) = ∑ (3,4,6,8,9,14) using:
a. 8 to 1 multiplexer
b. PLA
c. Decoder
Similar questions: Digital Logic: Implement the following function F = Σ(1 (2075)
Answer
, with as the MSB.
(a) Using an 8-to-1 multiplexer
Connect to the select lines and express each data input in terms of . Each data line covers a pair of minterms (S = 0) and (S = 1):
| Minterms (S=0, S=1) | Function present | Input | |
|---|---|---|---|
| 000 | neither | ||
| 001 | only | ||
| 010 | only | ||
| 011 | only | ||
| 100 | both | ||
| 101 | neither | ||
| 110 | neither | ||
| 111 | only |
So , , , and (one inverter). Output of the MUX is .
(b) Using a PLA
K-map (rows , columns in Gray order):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 0 | 0 | 1 | 0 |
| 01 | 1 | 0 | 0 | 1 |
| 11 | 0 | 0 | 0 | 1 |
| 10 | 1 | 1 | 0 | 0 |
Groups: gives ; gives ; gives ; alone gives .
PLA programming table:
| Product | |||||
|---|---|---|---|---|---|
| 0 | 1 | - | 0 | 1 | |
| - | 1 | 1 | 0 | 1 | |
| 1 | 0 | 0 | - | 1 | |
| 0 | 0 | 1 | 1 | 1 |
The AND plane makes these 4 product terms (with inputs and complements available) and the OR plane connects them to output .
(c) Using a decoder
Use a decoder with inputs whose outputs are the minterms, and a 6-input OR gate:
P Q R S --> [4x16 decoder] --D3 --\
D4 ---\
D6 ----\
D8 -----> OR --> F
D9 ----/
D14---/
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Explain design procedure of combinatorial circuits. Design a combinatorial circuit with three inputs x, y, and z, and three outputs A, B, and C. When the binary input is 0, 1, 2 or 3, the binary output is one greater than the input. When the input is 4, 5, 6, or 7, the binary output is one less than the input.
Similar questions: Digital Logic: Design a combinational circuit with three inputs (2075)
Answer
Design procedure of combinational circuits
A combinational circuit has outputs that depend only on the present inputs. The design steps are:
- State the problem and decide the number of inputs and outputs.
- Assign letter symbols to the inputs and outputs.
- Derive the truth table that defines the required input-output relation.
- Obtain the simplified Boolean function for each output (K-map or algebra).
- Draw the logic diagram and verify it.
Design of the given circuit
Inputs (binary number ), outputs ( is the MSB). For to 3 the output is ; for to 7 the output is .
| N | x y z | Output value | A B C |
|---|---|---|---|
| 0 | 0 0 0 | 1 | 0 0 1 |
| 1 | 0 0 1 | 2 | 0 1 0 |
| 2 | 0 1 0 | 3 | 0 1 1 |
| 3 | 0 1 1 | 4 | 1 0 0 |
| 4 | 1 0 0 | 3 | 0 1 1 |
| 5 | 1 0 1 | 4 | 1 0 0 |
| 6 | 1 1 0 | 5 | 1 0 1 |
| 7 | 1 1 1 | 6 | 1 1 0 |
From the table:
K-map simplification (rows , columns ):
- : the 1s are at . Pairs (), (), () give
- : the 1s are at , a checkerboard with no adjacent pairs. This is the odd-parity function:
- : the 1s are at , the whole column :
Logic diagram.
- : three 2-input AND gates (, , ) feeding one 3-input OR gate.
- : two cascaded XOR gates, .
- : one NOT gate on .
The circuit therefore needs 3 AND, 1 OR, 2 XOR and 1 NOT gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 10 marks
Draw a block diagram, truth table and logic circuit of 1*16 Demultiplexer and explain its working principle.
Answer
1-to-16 demultiplexer. A demultiplexer has one data input , select lines and outputs. It routes the input to exactly one output, chosen by the select code. For 16 outputs, select lines are needed.
Block diagram.
+-----------------+
| |--- Y0
| |--- Y1
D ------->| |--- Y2
| 1 x 16 DEMUX | ...
| |--- Y14
| |--- Y15
+--+--+--+--+-----+
| | | |
S3 S2 S1 S0
Truth table (output equals when equals the binary value of ; all other outputs are 0):
| Output that follows | Others | |
|---|---|---|
| 0000 | 0 | |
| 0001 | 0 | |
| 0010 | 0 | |
| 0011 | 0 | |
| 0100 | 0 | |
| 0101 | 0 | |
| 0110 | 0 | |
| 0111 | 0 | |
| 1000 | 0 | |
| 1001 | 0 | |
| 1010 | 0 | |
| 1011 | 0 | |
| 1100 | 0 | |
| 1101 | 0 | |
| 1110 | 0 | |
| 1111 | 0 |
Logic circuit. Each output is a 5-input AND gate of the data input and a select combination (using inverters for complemented selects):
So the circuit has four inverters (for ) and sixteen 5-input AND gates; the data line is connected to one input of every AND gate.
Working principle. The four select bits form a binary number from 0 to 15. Only the AND gate whose select pattern matches this number has all its inputs at 1 when , so only that output equals ; every other AND gate has at least one 0 input, so its output stays 0. For example, with (), only follows . The circuit is the same as a 4-to-16 decoder with used as the enable input. It can also be built from a tree of 1-to-2 or 1-to-4 demultiplexers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Perform the arithmetic operation (+42)+(-13) and (-42)-(-13) in binary using the signed -2’s-complement representation for negative numbers.
Answer
Use 8 bits (sign bit plus 7 magnitude bits). Negative numbers are stored in 2's complement.
Representations.
- : 1's complement of is ; add 1 to get .
- : 1's complement of is ; add 1 to get .
(a) .
00101010 (+42)
+ 11110011 (-13)
-----------
1 00011101
The carry out of the sign bit is discarded (the carries into and out of the sign bit are both 1, so there is no overflow). Result . Check: .
(b) . Subtraction is done by adding the 2's complement of the subtrahend. The 2's complement of () is . So
11010110 (-42)
+ 00001101 (+13)
-----------
11100011
There is no carry out. The sign bit is 1, so the result is negative. Its magnitude is the 2's complement of : invert to , add 1 to get . Result . Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Express the complement of the following function in sum of min-terms.
F(A, B, C, D) = Σ(0, 2, 6, 11, 13, 14)
Answer
For a 4-variable function there are minterms ( to ). The complement consists of exactly those minterms that are not in .
All minterms: . Removing leaves . Hence
Check: has minterms and has , and .
In terms of maxterms, , i.e. the minterms of are the maxterm numbers of .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Reduce the following function using k-map F = wxy + yz + xy’z + x’y
Answer
Expand to minterms (index ):
- : , any, giving
- : , giving
- : , giving
- : , giving and (with )
K-map (rows , columns ):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 0 | 0 | 1 | 1 |
| 01 | 0 | 1 | 1 | 1 |
| 11 | 0 | 1 | 1 | 1 |
| 10 | 0 | 0 | 1 | 1 |
Grouping.
- Octet of the two columns and (all cells: ) gives .
- Quad of cells (rows and , columns and ) gives .
Check: covers 8 minterms, and with adds and , a total of minterms, matching the original function.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Design a combinational circuit with three inputs and six outputs. The output binary number should be the square of the input binary number.
Answer
Design. Let the 3-bit input be ( the MSB). The largest input is , and , so six output bits are enough.
Truth table
| Decimal | Square | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 2 | 4 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 3 | 9 | 0 | 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 4 | 16 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 5 | 25 | 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 6 | 36 | 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 7 | 49 | 1 | 1 | 0 | 0 | 0 | 1 |
Simplification from the minterms
- (a square is always or , so this bit is always 0)
Circuit. is connected directly to and is tied to logic 0. uses one NOT and one AND gate. uses one XOR and one AND gate. uses one NOT, one OR and one AND gate. uses one AND gate. Only the inputs , , (and their complements) are needed, so the whole circuit is a small two-level combinational network.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Design a 5 x 32 decoder with four 3 x 8 decoder with enable and one 2 x 4 decoder. Use block diagrams only.
Answer
Idea. A decoder has inputs and 32 outputs . The two most significant bits select one of four groups of eight outputs; the three least significant bits select one output inside the group.
- A decoder takes . Its four outputs drive the enable inputs of the four decoders, so only one of them is active at a time.
- The three lines are connected in parallel to the select inputs of all four decoders.
Block diagram
+-----------+
A4 ---------------->| |--Y0--> E of DEC-0 (3x8) -> D0 ... D7
A3 ---------------->| 2 x 4 DEC |--Y1--> E of DEC-1 (3x8) -> D8 ... D15
| |--Y2--> E of DEC-2 (3x8) -> D16 ... D23
+-----------+--Y3--> E of DEC-3 (3x8) -> D24 ... D31
A2 A1 A0 ---------> (common to the select inputs of all four 3x8 decoders)
Working. When , only the first decoder is enabled and gives outputs to according to . For , the second decoder gives to ; for the third gives to ; for the fourth gives to . The disabled decoders keep all their outputs at the inactive level. For example, enables decoder 2 and selects its output 6, which is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Design and explain the Decimal adder with truth table and suitable diagram.
Answer
Decimal (BCD) adder. A decimal adder adds two BCD digits and a carry-in and produces a BCD digit and a carry-out. Since each digit is at most 9, the largest sum is .
Method. Add the two BCD digits and the input carry with an ordinary 4-bit binary adder. This gives a binary sum . If the sum is 9 or less, it is already the correct BCD digit. If it is 10 to 19, it is not valid BCD, and adding (6) corrects it and produces the decimal carry.
Truth table
| Binary sum | Decimal | BCD sum |
|---|---|---|
| 0 0000 to 0 1001 | 0 to 9 | 0 0000 to 0 1001 (same) |
| 0 1010 | 10 | 1 0000 |
| 0 1011 | 11 | 1 0001 |
| 0 1100 | 12 | 1 0010 |
| 0 1101 | 13 | 1 0011 |
| 0 1110 | 14 | 1 0100 |
| 0 1111 | 15 | 1 0101 |
| 1 0000 | 16 | 1 0110 |
| 1 0001 | 17 | 1 0111 |
| 1 0010 | 18 | 1 1000 |
| 1 0011 | 19 | 1 1001 |
Correction condition. Correction is needed when the binary sum has produced a carry (, sums 16 to 19) or when the 4-bit result is 10 to 15, i.e. together with or :
When , the number is added to and the carry-out of the digit is .
Diagram
A (4-bit BCD) --+
B (4-bit BCD) --+--> [ 4-bit binary adder 1 ] <-- Cin
| K (carry) Z8 Z4 Z2 Z1
|
K + Z8.Z4 + Z8.Z2 (AND-OR gates) ---> C = carry-out
|
+--> 0 C C 0 (= 0110 when C=1, else 0000)
|
Z8 Z4 Z2 Z1 ------> [ 4-bit binary adder 2 ] ---> S8 S4 S2 S1
The first adder forms the binary sum, the AND-OR logic generates , and the second adder adds (6 or 0) to give the corrected BCD digit. The carry is passed to the next decade for multi-digit addition. Example: ; , so ; , and the discarded carry gives the BCD result , i.e. 15.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Explain shift register with parallel load. Highlight on its practical implications.
Answer
Shift register with parallel load. A shift register is a group of flip-flops connected in cascade so that the binary data stored in them moves one position on each clock pulse. A shift register with parallel load can additionally load all of its flip-flops simultaneously from external parallel inputs, so it can be loaded in parallel and shifted serially.
Structure (4 bits). Each flip-flop has a multiplexer in front of its D input. The select line is a control input :
- : (parallel data input), so all four bits are loaded at the next clock edge.
- : (output of the previous stage), and the serial input feeds the first stage, so the data shifts one place right.
Serial in --> [MUX]->[D FF Q3]-->[MUX]->[D FF Q2]-->[MUX]->[D FF Q1]-->[MUX]->[D FF Q0]--> Serial out
^ ^ ^ ^
I3 I2 I1 I0 (parallel inputs)
All MUX select lines = Shift/Load; all flip-flops share the same clock
Function table
| Clock | Shift/Load | Operation |
|---|---|---|
| ↑ | 0 | Parallel load: |
| ↑ | 1 | Shift right: |
Practical implications
- It converts parallel data to serial data (load in one clock pulse, then shift out bit by bit) and serial data to parallel data, which is essential in serial communication such as UART and keyboard or modem interfaces.
- It is the basic building block of the accumulator and arithmetic units in a computer, where shifting left or right multiplies or divides by 2.
- It can be used as a temporary storage register, a delay line, and to build ring and twisted-ring (Johnson) counters.
- Because the data are loaded and shifted under control of the same clock, the multiplexers add gate delay in front of every flip-flop. The clock rate is therefore limited by the multiplexer delay plus the flip-flop setup time.
- Serial transfer needs only one data line but clock pulses, while parallel transfer needs lines but one pulse, so the register lets the designer trade wiring against speed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Explain master slave J-K flipflop.
Answer
Master-slave J-K flip-flop. A plain level-triggered J-K latch suffers from the race-around condition: when and the clock stays high longer than the propagation delay, the output toggles repeatedly during one clock pulse. The master-slave arrangement removes this problem.
Construction. It consists of two clocked J-K (or SR) latches in cascade:
- the first is the master, the second is the slave;
- the master is enabled by the clock , the slave by its complement (through an inverter);
- the outputs and of the slave are fed back to the master's inputs, giving and .
J --+--[AND]--+ +-----------+
CP -+--[AND]--+--> MASTER latch --Qm,Qm'--> SLAVE +--> Q
K --+--[AND]--+ (enabled when CP=1) | (enabled |--> Q'
^ ^ | when CP=0)|
| +-------- feedback Q, Q' -------+-----------+
Working
- When , the master is enabled and takes up the state decided by , and the fed-back , . The slave is disabled, so the output does not change.
- When falls to 0, the master is disabled (it holds the value it captured) and the slave is enabled. The slave copies the master's state, so the output changes only at the falling edge of the clock.
- Because the output only changes after the master is isolated, the changed cannot reach the master input while the master is active, so there is no race-around.
Truth table
| Operation | |||
|---|---|---|---|
| 0 | 0 | No change | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Toggle |
Characteristic equation: .
The master-slave J-K flip-flop therefore acts as a negative-edge triggered flip-flop: the output transition occurs at the end (falling edge) of the clock pulse, using the input values present during the pulse, and it can be used safely as a toggle element in counters.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2074 · 5 marks
Write short notes on (any two):
- State diagram
- De-Morgan’s theorem
- TTL
Answer
(a) State diagram. A state diagram is the graphical representation of a sequential circuit. Each state (the contents of the flip-flops) is drawn as a circle, and a directed arrow between circles shows a transition. The arrow is labelled with the input that causes the transition and, for a Mealy machine, the output as well (input/output); in a Moore machine the output is written inside the circle. For example, a T flip-flop has two states, 0 and 1. With , the arrow goes from 0 to 1 and from 1 to 0; with , a loop arrow keeps the state. State diagrams are the first step in sequential design: from the diagram the state table is built, then the flip-flop input equations are found with K-maps.
(b) De Morgan's theorem. It states two rules relating AND, OR and complement:
The complement of a sum is the product of the complements, and the complement of a product is the sum of the complements. It extends to any number of variables: . Proof for the first rule: if both sides are 1; in every other case the left side is 0 and the right side contains a 0 factor, so is 0. The theorem is used to convert an AND-OR network into NAND-NAND or an OR-AND network into NOR-NOR form, and to find the complement of a function.
(c) TTL. Transistor-Transistor Logic is a bipolar logic family in which the input stage uses a multiple-emitter transistor and the output stage is a totem-pole (a pull-up transistor on top of a pull-down transistor). The 74xx series is the standard TTL series, with a supply of , logic-0 below and logic-1 above at the input. Typical figures: propagation delay about and power dissipation about per gate for standard TTL, fan-out 10. Variants are Schottky (74S), low-power Schottky (74LS), advanced versions, and open-collector and tri-state outputs. TTL is fast and cheap but dissipates more power than CMOS.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 10 marks
The following is a truth table of a 3-input,4 output combinational circuit. Tabulate the PAL programming table for the circuit and mark for the circuit and mark the fuses to be blown in a PAL diagram.
Input Output X Y 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1
Answer
Step 1: simplify each output (inputs with the MSB).
Step 2: PAL programming table. In a PAL, the AND array is programmable but each OR gate is fixed to its own set of product terms, so terms cannot be shared between outputs. Here at most 4 terms per output are needed, so a PAL with four product terms per OR gate is enough. In the table, 1 means the true input is connected, 0 means the complemented input is connected, and - means the input is not connected (both fuses blown).
| Product term | AND inputs | Outputs | ||
|---|---|---|---|---|
| 1 | 0 | 0 | 1 | |
| 2 | 1 | - | 0 | |
| 3 | - | 1 | 0 | |
| 4 | 0 | - | 1 | |
| 5 | 1 | 1 | - | |
| 6 | 0 | 0 | 1 | |
| 7 | 1 | - | 0 | |
| 8 | - | 1 | 0 | |
| 9 | 1 | 1 | - | |
| 10 | - | - | 1 | |
| 11 | 0 | 1 | - |
Step 3: fuse map for the PAL diagram. Every AND gate has six input lines , each with a fuse. A fuse is left intact (marked ×) where the table requires the line, and all other fuses of that gate are blown. Unused AND gates in an OR gate keep all fuses intact (output 0).
| Term | Output OR | ||||||
|---|---|---|---|---|---|---|---|
| 1 | blown | × | blown | × | × | blown | |
| 2 | × | blown | blown | blown | blown | × | |
| 3 | blown | blown | × | blown | blown | × | |
| 4 | blown | × | blown | blown | × | blown | |
| 5 | × | blown | × | blown | blown | blown | |
| 6 | blown | × | blown | × | × | blown | |
| 7 | × | blown | blown | blown | blown | × | |
| 8 | blown | blown | × | blown | blown | × | |
| 9 | × | blown | × | blown | blown | blown | |
| 10 | blown | blown | blown | blown | × | blown | |
| 11 | blown | × | × | blown | blown | blown |
The remaining fuses (the ones marked "blown") are the ones to be burnt out in the PAL diagram; the intact fuses form the four product-term groups feeding the four fixed OR gates .
Check, e.g. : term 2 () gives ; term 5 gives ; terms 7, 9 give ; terms are both 0, so . This matches the row .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Convert the following decimal numbers to the indicated bases.
- 7562.45 to octal
- 1938.257 to hexadecimal
- 175.175 to binary
Answer
(a) to octal
Integer part (divide by 8):
| Division | Quotient | Remainder |
|---|---|---|
| 945 | 2 | |
| 118 | 1 | |
| 14 | 6 | |
| 1 | 6 | |
| 0 | 1 |
Reading the remainders upward: . (Check: .)
Fraction part (multiply by 8): ; ; ; ; ; , and the digits repeat.
(b) to hexadecimal
Integer part: remainder ; remainder ; remainder . So . (Check: .)
Fraction part (multiply by 16): ; ; ; ; ;
(c) to binary
Integer part: .
Fraction part (multiply by 2): ; ; ; ; ; ; ; ; ; ; ...
The fraction is (the pattern repeats after the third bit).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Express the Boolean Function F = A + B’ C in a sum of min terms .
Answer
Given with three variables .
Each product term must contain all three variables, so multiply the missing variables by .
Adding the two and removing the repeated term :
In minterm form (binary → decimal): , , , , .
Check: when (minterms 4 to 7) and, with , when (minterm 1). This agrees.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Reduce the following function using k-map F = B’D + A’BC’ + AB’C + ABC’
Answer
in four variables .
Minterms (order ):
- :
- :
- :
- :
K-map (rows , columns in the order 00, 01, 11, 10):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 0 | 1 | 1 | 0 |
| 01 | 1 | 1 | 0 | 0 |
| 11 | 1 | 1 | 0 | 0 |
| 10 | 0 | 1 | 1 | 1 |
Groups
- Quad (columns 01 and 11 in rows 00 and 10, wrapping):
- Quad (rows 01 and 11, columns 00 and 01):
- Pair : (only way to cover )
All nine minterms are covered, and each group is essential.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Implement half adder using 2-4 decoder.
Answer
Half adder. The half adder adds two bits and and gives
Using a decoder. The decoder produces all four minterms of the two inputs:
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
Connect to the MSB input and to the LSB input of the decoder. Then:
- Sum: , taken from a 2-input OR gate on outputs and .
- Carry: , taken directly from output .
x --> A1 +---------+ D0 (unused)
y --> A0 | 2 x 4 | D1 ---+
| DECODER | D2 ---+--[OR]--> Sum
| | D3 -------------> Carry
+---------+
Output is left unused. This gives the half adder with one decoder and one OR gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Design a 4-bit binary ripple counter with D flip-flops.
Answer
4-bit binary ripple counter with D flip-flops. An asynchronous (ripple) counter has the clock applied only to the first flip-flop; each following flip-flop is clocked by the output of the previous one. A D flip-flop is turned into a toggle (divide-by-2) element by connecting its output back to its D input (), so it changes state at every active clock edge.
Connections (positive-edge triggered D flip-flops, up counter):
- , , ,
- external clock clock of FF0
- clock of FF1; clock of FF2; clock of FF3
(With negative-edge triggered flip-flops, the output of each stage would drive the next clock instead.) When goes from 1 to 0, goes from 0 to 1, which is a positive edge that toggles FF1, and so on, so each stage toggles when the previous stage falls from 1 to 0.
CLK -> [FF0: D=Q0'] --Q0'--> [FF1: D=Q1'] --Q1'--> [FF2: D=Q2'] --Q2'--> [FF3: D=Q3']
Q0 Q1 Q2 Q3
Count sequence (output )
| Clock pulse | Decimal | ||||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 2 | 0 | 0 | 1 | 0 | 2 |
| 3 | 0 | 0 | 1 | 1 | 3 |
| 4 | 0 | 1 | 0 | 0 | 4 |
| 5 | 0 | 1 | 0 | 1 | 5 |
| 6 | 0 | 1 | 1 | 0 | 6 |
| 7 | 0 | 1 | 1 | 1 | 7 |
| 8 | 1 | 0 | 0 | 0 | 8 |
| 9 | 1 | 0 | 0 | 1 | 9 |
| 10 | 1 | 0 | 1 | 0 | 10 |
| 11 | 1 | 0 | 1 | 1 | 11 |
| 12 | 1 | 1 | 0 | 0 | 12 |
| 13 | 1 | 1 | 0 | 1 | 13 |
| 14 | 1 | 1 | 1 | 0 | 14 |
| 15 | 1 | 1 | 1 | 1 | 15 |
| 16 | 0 | 0 | 0 | 0 | 0 (repeats) |
changes at every clock pulse, so , , , . The counter is a modulo-16 counter. Its drawback is that the delays add up ( for the last stage), so the maximum clock frequency is limited and glitches may occur in decoding.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2075 · 5 marks
Write short notes on any two:
- SIMM
- RTL
- Parity Checker
Answer
(a) SIMM. A Single In-line Memory Module is a small circuit board carrying several DRAM chips, with a single row of contacts along one edge that plugs into a socket on the motherboard. The contacts on the two sides of a SIMM are electrically the same (unlike a DIMM, where each side is separate). The common types are the 30-pin SIMM (8 bits wide) and the 72-pin SIMM (32 bits wide). Because a 32-bit SIMM matches a 32-bit data bus, they were installed in pairs on 64-bit buses. SIMMs made it easy to expand the memory of a computer by plugging modules in; they were later replaced by DIMMs.
(b) RTL. Resistor-Transistor Logic is one of the earliest digital logic families. The basic gate is a NOR gate: several input resistors feed the bases of parallel transistors whose collectors share a common load resistor. If any input is HIGH, the corresponding transistor conducts and pulls the output LOW; the output is HIGH only when all inputs are LOW.
- Advantages: simple, cheap.
- Disadvantages: low noise margin, high power consumption, low fan-out (about 5), slow speed.
It has been replaced by DTL, TTL and CMOS.
(c) Parity checker. A parity checker checks the received data for errors by checking the parity bit that was added by the parity generator. For a 4-bit data word with an even parity bit , the checker receives and generates the error output
If the number of 1s among the five bits is even (no error, or an even number of bit errors), . If it is odd, , which indicates an error. The circuit uses four 2-input XOR gates in a tree arrangement. A parity check detects any single-bit error, but cannot locate it, and cannot detect an even number of errors.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
Design a combinational circuit that generates 9’s complement of a BCD number.
Answer
9's complement of a BCD digit. The 9's complement of a decimal digit is . Let the BCD input be (digits 0 to 9) and the output . The input codes 1010 to 1111 never occur in BCD, so they are don't-care conditions.
Truth table
| Digit | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 9 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 8 | 1 | 0 | 0 | 0 |
| 2 | 0 | 0 | 1 | 0 | 7 | 0 | 1 | 1 | 1 |
| 3 | 0 | 0 | 1 | 1 | 6 | 0 | 1 | 1 | 0 |
| 4 | 0 | 1 | 0 | 0 | 5 | 0 | 1 | 0 | 1 |
| 5 | 0 | 1 | 0 | 1 | 4 | 0 | 1 | 0 | 0 |
| 6 | 0 | 1 | 1 | 0 | 3 | 0 | 0 | 1 | 1 |
| 7 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 1 | 0 |
| 8 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 9 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 10 to 15 | d | d | d | d |
K-map simplification (using the don't-cares where they help)
- : for digits 0, 2, 4, 6, 8, which are exactly the inputs with . So .
- : for digits 2, 3, 6, 7 (all those with ; for 10 to 15 the don't-cares may be taken as needed). So .
- : for digits 2, 3, 4, 5, i.e. when and differ. So .
- : only for digits 0 and 1, i.e. . So .
Circuit. One NOT gate on gives ; is a straight wire from ; one XOR gate gives ; one 3-input NOR gate on (or three NOT gates and an AND gate) gives . For example, input 0100 (digit 4) gives , , , , so the output is = 5, which is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
Implement the following functions using PLA
- w (A, B, C, D) = Σ(2, 12, 13)
- x (A, B, C, D) = Σ(7, 8, 9, 10, 11, 12, 13, 14, 15)
- y (A, B, C, D) = Σ(0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15)
- z (A, B, C, D) = Σ(1, 2, 8, 12, 13)
Answer
Step 1: simplify each function.
- ( form the pair ; stands alone)
- ( to is the group ; pairs with to give )
- (check: its complement is , and none of these is covered by the four terms)
The terms (shared by and ) and (shared by and ) need to be generated only once in a PLA.
Step 2: PLA programming table. The distinct product terms are numbered 1 to 10. In the input columns, 1 = true input, 0 = complemented input, - = not connected. In the output columns, 1 means the product term is connected to that output's OR gate (an output with no entry is 0).
| Term | Product | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0 | - | 1 | - | - | 1 | |
| 2 | 0 | 0 | 1 | 0 | 1 | - | - | 1 | |
| 3 | 1 | - | - | - | - | 1 | - | - | |
| 4 | - | 1 | 1 | 1 | - | 1 | - | - | |
| 5 | 1 | 0 | - | - | - | - | 1 | - | |
| 6 | 0 | 1 | - | - | - | - | 1 | - | |
| 7 | - | - | 1 | 1 | - | - | 1 | - | |
| 8 | - | 0 | - | 0 | - | - | 1 | - | |
| 9 | 1 | - | 0 | 0 | - | - | - | 1 | |
| 10 | 0 | 0 | 0 | 1 | - | - | - | 1 |
So the PLA has 4 inputs, 10 product terms and 4 outputs. The outputs are:
Step 3: diagram. In the AND array, the ten AND gates take and their complements, with fuses left intact only at the 1 and 0 entries of the table. In the OR array, the four OR gates have fuses intact only at the 1 entries of the output columns.
Check with (12): (needs ) = 1 and = 1, = 1; so , , , and (no term is active). This agrees with 12 being in , , but not in .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
List two major characteristics of digital computer. Represent -6 (negative six) 8 bits in signed magnitude, signed 1’s complement and signed 2’s complement respectively. Represent decimal number 4673 in a) octal and b) BCD
Answer
Two major characteristics of a digital computer
- It works with discrete (digital) data, represented by binary digits 0 and 1, and it processes them with logic circuits, so results are exact and noise has little effect.
- It is a stored-program machine: instructions and data are held in memory, and it carries out the instructions automatically, at very high speed and with high accuracy, without human intervention.
Representation of in 8 bits. .
- Signed magnitude: sign bit 1 and the magnitude 6:
- Signed 1's complement: invert all bits of :
- Signed 2's complement: 1's complement plus 1:
Decimal 4673
(a) Octal (divide by 8):
| Division | Quotient | Remainder |
|---|---|---|
| 584 | 1 | |
| 73 | 0 | |
| 9 | 1 | |
| 1 | 1 | |
| 0 | 1 |
Reading upward: . (Check: .)
(b) BCD: replace each decimal digit by its 4-bit code: , , , .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Where is CMOS suitable to use? Define Power dissipation. Show that the positive logic NAND gate is a negative logic NOR gate and vice versa.
Answer
Where CMOS is suitable. CMOS (Complementary MOS) has a very low static power consumption, high noise immunity, a wide supply range (3 V to 15 V or more) and a very high packing density. It is therefore suitable for battery-powered and portable equipment (watches, calculators, laptops, mobile phones), for VLSI circuits such as microprocessors and memories, and for places where power dissipation or heat must be kept low or where there is much electrical noise.
Power dissipation. Power dissipation of a gate is the power it consumes from the supply, (average supply current). It consists of static power, drawn when the gate is in a steady state, and dynamic power, drawn while the gate is switching, for CMOS (where is the load capacitance and the switching frequency). In CMOS the static part is nearly zero, so the power depends mainly on the switching frequency.
Positive logic NAND is negative logic NOR. In positive logic the high voltage level H is logic 1 and the low level L is logic 0; in negative logic H is 0 and L is 1.
Voltage table of the gate that is a NAND in positive logic:
| Output | ||
|---|---|---|
| L | L | H |
| L | H | H |
| H | L | H |
| H | H | L |
Positive logic (H = 1, L = 0):
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
This is the NAND function.
Negative logic (H = 0, L = 1): the same voltage table becomes
| 1 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
Re-ordered, the output is 1 only when both inputs are 0, which is the NOR function. Hence a positive logic NAND gate is a negative logic NOR gate. By the same argument, a positive logic NOR gate (output H only when both inputs L) becomes, with H = 0 and L = 1, a gate whose output is 0 only when both inputs are 1, i.e. a negative logic NAND gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Simplify the following function and implement them with two level NOR gate circuit, F(w, x, y, z) = wx’ + y’z’ + w’yz’.
Answer
Minterms (order ):
- :
- :
- :
K-map (rows , columns in the order 00, 01, 11, 10)
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 1 |
| 01 | 1 | 0 | 0 | 1 |
| 11 | 1 | 0 | 0 | 0 |
| 10 | 1 | 1 | 1 | 1 |
Simplification (sum of products). Groups: (row 10), (column 00) and (rows 00 and 01, columns 00 and 10, i.e. ).
Two-level NOR implementation. A NOR-NOR circuit needs a product-of-sums form. Take the zeros of the map: . Grouping: ; ; .
Complementing with De Morgan's theorem:
Then , which is implemented as:
- First level: three NOR gates, , and (the complemented inputs come from inverters).
- Second level: one 3-input NOR gate whose inputs are the outputs of the three first-level gates and whose output is .
Check: for , the three sums are , so (minterm 12 is in ); for the sum , so (minterm 13 is not in ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Design a full subtractor circuit with three inputs x, y, and two outputs Diff and · The circuit subtracts ., where is the input borrow, is the output borrow, and Diff is the difference.
Answer
Full subtractor. A full subtractor subtracts and gives the difference and the output borrow .
Truth table
| Diff | ||||
|---|---|---|---|---|
| 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 |
(For example : difference 0 with a borrow; : difference 1 with a borrow.)
Expressions
For , the K-map groups are ; ; :
An equivalent form that shares the XOR gate: .
Circuit. Two XOR gates in cascade give . For : an inverter on , three 2-input AND gates (, , ) and a 3-input OR gate. The full subtractor can also be built from two half subtractors and an OR gate for the borrow.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Explain negative-edge triggered D flip flop with necessary logic diagram and truth table.
Answer
Negative-edge triggered D flip-flop. A D flip-flop has a data input and a clock input. The output takes the value of only at the active clock edge; in a negative-edge triggered flip-flop the active edge is the falling edge of the clock (1 to 0). At all other times, whatever does, the output is unchanged.
Logic diagram (master-slave form). It is made of two gated D latches in cascade, each built from NAND gates and an inverter:
+----------------+ +----------------+
D ------>| MASTER latch |--Qm-->| SLAVE latch |--> Q
| enabled when | | enabled when |--> Q'
CLK ---->| CLK = 1 | +-->| CLK = 0 |
| +----------------+ | +----------------+
+---------[NOT]-----------+
- When the master is transparent and follows , while the slave is disabled, so is unchanged.
- When falls from 1 to 0, the master is closed and keeps the value had just before the edge, and the slave is enabled and copies the master's value to .
- While the master is closed, so changes in have no effect on . When rises, the slave closes first, so still does not change.
Thus can change only at the falling edge of the clock.
Truth table
| CLK | Operation | ||
|---|---|---|---|
| ↓ | 0 | 0 | Reset |
| ↓ | 1 | 1 | Set |
| 0, 1 or ↑ | X | No change |
Characteristic equation: . The flip-flop is used as a one-bit memory and delay element, and in registers, counters and shift registers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Illustrate the use of Binary ripple counter and BCD ripple counter.
Answer
Binary ripple counter. A binary ripple counter is an asynchronous counter built from toggle (T or J-K with ) flip-flops in which each flip-flop's output clocks the next one. An -bit counter counts from 0 to (modulo ) and then returns to 0. A 4-bit counter counts and repeats.
Uses of a binary ripple counter
- Counting events or pulses (for example, counting items on a production line or the number of clock pulses), where the output is the binary count.
- Frequency division: the output of the first stage is , the second , the third , and the -th is . This is used to derive slower clocks from a crystal oscillator, as in digital watches.
- Timers and time delays: counting a known number of clock pulses gives a known time interval.
- Address generation: sequencing through the memory addresses or control states in a computer.
BCD (decade) ripple counter. A BCD counter counts only the ten states to (0 to 9) and then resets to 0000. It is built from a 4-bit ripple counter with a NAND gate connected to the outputs and . After the ninth pulse the counter enters (10) for a very short time, the NAND output goes low and clears all the flip-flops asynchronously to , so the sequence is:
| Pulse | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 0000 |
Uses of the BCD counter
- It counts in decimal, so each decade stage can drive a BCD-to-seven-segment decoder and display. Cascading decades (the carry from clocks the next decade) gives units, tens, hundreds and so on. This is used in digital clocks, frequency counters, digital voltmeters and electronic counters and calculators.
- It divides frequency by exactly 10 (a divide-by-10 stage); e.g. a 1 MHz clock gives 100 kHz, which is useful for decimal time bases.
- It is used where decimal-based outputs are needed directly without further binary-to-decimal conversion.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Write Short notes on (Any two)
- RTL
- State Reduction
- POS
Answer
RTL (Register Transfer Language)
RTL is a symbolic notation for describing the micro-operations performed on data stored in registers. A register is named by capital letters (R1, MAR, PC), and a transfer is written with a replacement arrow.
- Simple transfer:
R2 ← R1copies the contents of R1 into R2; R1 is unchanged. - Conditional transfer:
P: R2 ← R1means the transfer occurs only when the control function . - Arithmetic:
R3 ← R1 + R2; logic:R3 ← R1 ∧ R2; shift:R1 ← shl R1. - Memory transfer:
DR ← M[AR](read) andM[AR] ← DR(write). - Several transfers separated by commas happen simultaneously on the same clock edge, e.g.
T: R1 ← R2, R2 ← R1swaps two registers.
RTL is the language used to specify the sequence of operations of a digital system, and each statement maps directly to a set of registers, a bus or multiplexers, and control signals.
State Reduction
State reduction removes redundant states from the state table of a sequential circuit so that fewer flip-flops and less gating are needed, without changing the input-output behaviour.
Two states are equivalent if, for every input sequence, they give the same output sequence, i.e. they have the same outputs for each input and their next states are the same or are themselves equivalent. One of two equivalent states can be removed and all references to it replaced by the other.
Example: if states and both have next state and for inputs and and both give output and , then is replaced by . Repeating this until no more equivalent pairs exist gives the minimal table. The reduced table needs fewer state bits (for instance 5 states need 3 flip-flops, 4 states need only 2).
POS (Product of Sums)
POS is a standard form of a Boolean function in which sum (OR) terms are ANDed together:
In the canonical POS form every sum term contains all the variables and is called a maxterm . A function is written as the product of the maxterms for which . For example,
POS is obtained from the 0s of a K-map (group the 0s, complement each group's product to get a sum term). It is implemented with an OR-AND two-level circuit, or with NOR-NOR gates only.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Implement F = Σ(0, 2, 3, 4, 7) using
- Multiplexer
- Decoder
- PLA
Answer
Here , with the MSB.
(a) Using a multiplexer
A 3-variable function can be implemented with a MUX: use as the select lines and express each data input in terms of .
| minterms | in terms of | MUX input | |
|---|---|---|---|
| 00 | (z=0) = 1, (z=1) = 0 | ||
| 01 | = 1, = 1 | ||
| 10 | = 1, = 0 | ||
| 11 | = 0, = 1 |
4x1 MUX
z' --| I0 |
1 --| I1 |-- F
z' --| I2 |
z --| I3 |
S1 S0
x y
Connections: (one inverter on ), (logic 1), , select , .
(b) Using a decoder
Use a decoder with inputs (outputs are the minterms) and a 5-input OR gate:
x y z --> [3x8 decoder] --D0--\
D2----\
D3-----> OR --> F
D4----/
D7---/
(Equivalently, using NAND outputs of the decoder, with a 3-input AND of the complement outputs; the OR form above is simpler.)
(c) Using a PLA
First simplify with a K-map:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 |
Groups: gives ; gives ; gives .
PLA programming table (inputs ; 1 = true, 0 = complemented, - = not used):
| Product term | Output | |||
|---|---|---|---|---|
| - | 0 | 0 | 1 | |
| 0 | 1 | - | 1 | |
| - | 1 | 1 | 1 |
The AND plane is programmed to generate these 3 product terms and the OR plane connects all three to output . Only 3 product lines are needed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Difference between synchronous and asynchronous counter. Design mode-7 synchronous counter using T-flip flop. Show necessary truth tables and k-maps.
Answer
Difference between synchronous and asynchronous counters
| Synchronous counter | Asynchronous (ripple) counter |
|---|---|
| All flip-flops receive the same clock pulse simultaneously | Only the first flip-flop gets the external clock; each next one is clocked by the output of the previous |
| All FFs change state at the same time | FFs change state one after another (ripple effect) |
| Propagation delay is that of one FF plus gate, so it is fast | Delay accumulates: , so it is slow |
| Needs extra combinational logic to drive the inputs, so the design is more complex | Simple design, little extra hardware |
| No decoding glitches; suitable for high frequency | Decoding errors/glitches at intermediate states; limited frequency |
Design of a mode-7 synchronous counter using T flip-flops
A mode-7 counter counts . It needs 3 flip-flops (). State (7) is unused and treated as don't care. Let the state be ( = MSB).
For a T flip-flop , so .
| Present | Next | |||
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 1 |
| 010 | 011 | 0 | 0 | 1 |
| 011 | 100 | 1 | 1 | 1 |
| 100 | 101 | 0 | 0 | 1 |
| 101 | 110 | 0 | 1 | 1 |
| 110 | 000 | 1 | 1 | 0 |
| 111 | xxx | x | x | x |
K-maps (rows , columns = 00, 01, 11, 10):
:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | x | 1 |
Groups: gives ; gives .
:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | x | 1 |
Groups: gives ; gives .
:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | x | 0 |
Groups: the row gives ; the cells give .
Circuit: three T flip-flops with a common clock. from a NAND gate; from an AND gate and an OR gate; from two AND gates and an OR gate.
Self-start check: from the unused state : so the next state is , a valid state. The counter therefore recovers by itself.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Provide one example where shift right operation can be used. Explain parallel-in-parallel-out register.
Answer
Example where shift right operation is used
A right shift moves every bit one position towards the LSB and fills the MSB with 0 (logical shift). Shifting a binary number right by one place divides it by 2 (integer part).
Example: . After one right shift: ; after another: . So a right shift divides by after shifts. This is used in division by powers of two, in the shift-and-add multiplier/divider algorithms of an ALU, and in serial-to-parallel conversion of data received bit by bit (e.g. UART receiver).
Parallel-in-parallel-out (PIPO) register
A PIPO register loads all bits at the same time and makes all stored bits available at the same time. A 4-bit PIPO register consists of four D flip-flops with a common clock (and optional common clear).
D3 D2 D1 D0 (parallel data inputs)
| | | |
[D FF][D FF][D FF][D FF] <-- common CLK
| | | |
Q3 Q2 Q1 Q0 (parallel data outputs)
Working:
- Each input is connected directly to the D input of its own flip-flop. There is no connection between the flip-flops.
- On the active clock edge, for all four bits simultaneously, so the word is loaded in a single clock pulse.
- Between clock pulses, the flip-flops hold the data, and the outputs can be read in parallel at any time.
- An asynchronous clear input resets all outputs to 0.
Example: if , after one clock pulse .
It is the fastest register type (one clock for load, no shifting) and is used as a temporary storage or buffer register, e.g. data/address registers in a CPU.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Carry out the following task
- Preform 1’s complement subtraction 110101 – 100101
- Represent decimal number 0.125 into its binary form
Answer
(a) 1's complement subtraction:
and .
Step 1: 1's complement of the subtrahend is .
Step 2: add it to the minuend:
Step 3: a carry out () is produced, so the result is positive. Add the end-around carry:
Result: .
Check: . Correct.
(b) Binary form of
Multiply the fraction repeatedly by 2 and record the integer parts:
| Step | Multiplication | Integer part |
|---|---|---|
| 1 | 0 | |
| 2 | 0 | |
| 3 | 1 |
The fraction becomes 0, so we stop. Reading the integer parts from top to bottom:
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Derive the Boolean expression for sum and carry of half adder. Draw its combinational circuit. Implement it using only NAND gates.
Answer
Half adder
A half adder adds two 1-bit numbers and and gives a sum and a carry .
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
From the table, for and ; only for :
Combinational circuit: one XOR gate gives and one AND gate gives ; both gates have inputs and .
A ----+-----|=\\
| |XOR|------ S
B --+-|-----|=//
| |
| +-----|AND|
+-------| |------ C
NAND-only implementation
Use the identity NANDed together. Let
- (a NAND gate with both inputs tied to , i.e. an inverter)
Verification: . And .
A,B --> [NAND N1] --> N1
A,N1 --> [NAND N2] --> N2
B,N1 --> [NAND N3] --> N3
N2,N3 --> [NAND] --> S
N1,N1 --> [NAND] --> C
Total: 5 two-input NAND gates (4 for the sum and 1 as inverter for the carry).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Express the Boolean function F = x + yz as product of max-terms.
Answer
Given , which is a function of the three variables .
Step 1: Make every term contain all variables.
Removing the duplicate :
Step 2: Product of maxterms. The maxterms are those whose indices are missing from the minterm list: .
Each maxterm has a variable complemented where the minterm bit is 1:
Check by the distributive law: . Then and . The product, with the repeated factor removed, gives the same three maxterms.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Minimize the Boolean function Boolean function using K-map
F(A, B, C, D) = Σ(0, 1, 3, 5, 7, 8, 9, 11, 13, 15)
Answer
K-map (rows , columns in Gray order):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 1 () | 1 () | 1 () | 0 () |
| 01 | 0 () | 1 () | 1 () | 0 () |
| 11 | 0 () | 1 () | 1 () | 0 () |
| 10 | 1 () | 1 () | 1 () | 0 () |
Grouping
- Octet: the whole column and (minterms ). In these cells and all of change, so the term is .
- Quad: the four corner-type cells (rows and , columns and ). Here and stay constant, so the term is .
All 10 minterms are covered, and are shared.
Check: gives the 8 odd minterms. With , gives and . Total 10 minterms, which matches.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
What are the practical implementations of up counter? Explain Binary ripple counter.
Answer
Practical implementations of an up counter
An up counter counts on each clock pulse. Its common applications are:
- Frequency division: the output of the -th flip-flop has frequency , used for clock dividers in digital watches.
- Digital clocks and timers: mod-60 and mod-24 counters for seconds, minutes and hours.
- Event or pulse counting: counting objects on a conveyor, vehicles, or pulses in a frequency counter.
- Address generation: the program counter of a CPU and address sequencing for memory.
- Time-delay generation and sequencing: producing timing and control signals in a control unit.
- Digital voltmeters and A/D converters (counter-type ADC).
Binary ripple counter
A binary ripple counter is an asynchronous counter. An -bit ripple counter uses flip-flops connected in cascade, each wired as a toggle (T) flip-flop (, or JK with ). The external clock drives only the first flip-flop (LSB), and the output of each flip-flop clocks the next one. Triggering is on the falling (negative) edge, so a flip-flop toggles when the previous output goes from 1 to 0.
CLK --> [FF0 T=1] --Q0--> [FF1 T=1] --Q1--> [FF2 T=1] --Q2--> [FF3 T=1] --Q3
Count sequence of a 4-bit counter (mod 16):
| Clock | Clock | ||
|---|---|---|---|
| 0 | 0000 | 8 | 1000 |
| 1 | 0001 | 9 | 1001 |
| 2 | 0010 | 10 | 1010 |
| 3 | 0011 | 11 | 1011 |
| 4 | 0100 | 12 | 1100 |
| 5 | 0101 | 13 | 1101 |
| 6 | 0110 | 14 | 1110 |
| 7 | 0111 | 15 | 1111 |
After 15 it returns to 0000.
Operation: toggles on every clock pulse, so it is the clock divided by 2. toggles when falls, so it is divided by 4. is divided by 8 and by 16.
Timing:
CLK : _|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|
Q0 : __|‾‾|__|‾‾|__|‾‾|__|‾‾| (toggles every clock)
Q1 : ____|‾‾‾‾|____|‾‾‾‾| (toggles when Q0 falls)
Q2 : ________|‾‾‾‾‾‾‾‾| (toggles when Q1 falls)
Drawback: the clock "ripples" through the flip-flops, so total delay is about . This limits the maximum frequency to and can give momentary wrong states. Its advantages are simplicity and minimum hardware. The same circuit counting down (using outputs as clock) gives a down counter.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Design a combinational circuit with three inputs and one output. The output is 1 when the binary value of the inputs is an odd number.
Answer
Let the three inputs be ( = MSB, = LSB) and the output be .
Truth table
| Decimal | ||||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 2 | 0 |
| 0 | 1 | 1 | 3 | 1 |
| 1 | 0 | 0 | 4 | 0 |
| 1 | 0 | 1 | 5 | 1 |
| 1 | 1 | 0 | 6 | 0 |
| 1 | 1 | 1 | 7 | 1 |
K-map
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 |
The four 1s form a single quad (columns and ), where and change and only stays constant.
Circuit: no gate is required. The output is simply connected directly to the LSB input . This is obvious because a binary number is odd exactly when its least significant bit is 1.
A ---(not used)
B ---(not used)
C --------------------- F
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Differentiate between PLA and PAL. Explain 4-bit magnitude comparator
Answer
Difference between PLA and PAL
| PLA (Programmable Logic Array) | PAL (Programmable Array Logic) |
|---|---|
| Both AND plane and OR plane are programmable | Only the AND plane is programmable; the OR plane is fixed |
| More flexible: a product term can be shared by several outputs | Less flexible: each output has its own fixed set of product terms |
| Needs more fuses and a larger chip area | Simpler, cheaper and faster |
| Harder to program and slower, because of two programmable arrays | Easier to program and to use |
| Used for complex multi-output functions | Used for simple functions, with more standard devices |
4-bit magnitude comparator
A magnitude comparator compares two 4-bit numbers and and produces three outputs: , and .
Equality. Bit is equal when (XNOR). The numbers are equal only if all four bit pairs are equal:
Greater than. Compare from the MSB. if the MSBs differ and ; or the MSBs are equal and the next bits decide, and so on:
Less than.
Implementation: four XNOR gates produce . A 4-input AND gives . The and outputs use AND gates (with inverters for , ) feeding an OR gate each. Only one of the three outputs is 1 at a time.
Example: , . , (0 and 0), (1 and 0). Then : the third term . So (10 > 9), which is correct. The IC 7485 is the standard 4-bit comparator, with cascading inputs for larger words.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Write short notes on (Any Two)
- Negative Logic
- CMOS
- EBCDIC
Answer
Negative logic
In digital circuits, logic levels are represented by two voltages. In positive logic, the higher voltage () is logic 1 and the lower voltage () is logic 0. In negative logic, the higher voltage represents logic 0 and the lower voltage logic 1.
Changing the logic convention changes the function a gate performs (dual of the function). For example, a gate that works as AND in positive logic works as OR in negative logic, and NAND becomes NOR.
| (V) | (V) | (V) | Positive-logic function | Negative-logic function |
|---|---|---|---|---|
| L | L | L | 0 0 -> 0 | 1 1 -> 1 |
| L | H | L | 0 1 -> 0 | 1 0 -> 1 |
| H | L | L | 1 0 -> 0 | 0 1 -> 1 |
| H | H | H | 1 1 -> 1 | 0 0 -> 0 |
The same gate is AND in positive logic and OR in negative logic. Negative logic is also used with active-low signals (such as chip select ), which are shown with a bubble at the pin.
CMOS (Complementary Metal-Oxide-Semiconductor)
CMOS is a logic family that uses a pair of complementary MOSFETs, a p-channel (PMOS) pull-up network and an n-channel (NMOS) pull-down network, in each gate.
- In a CMOS inverter, the PMOS source is at , the NMOS source is at ground, gates are joined as the input and drains are joined as the output. For input low, PMOS is ON and NMOS is OFF, so output is high. For input high, NMOS is ON and PMOS is OFF, so output is low.
- At any steady state only one transistor conducts, so there is almost no static current.
Features: very low static power dissipation, high noise margin (about 40-45% of ), wide supply range (3 to 15 V for the 4000 series), high fan-out, and high packing density. The disadvantages are lower speed than TTL (older series) and sensitivity to static electricity. Power increases with frequency because of switching currents: . CMOS is used in microprocessors, memories and almost all modern ICs.
EBCDIC
EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit character-encoding scheme developed by IBM for its mainframe computers. It can represent characters, including upper and lower case letters, digits, punctuation and control characters.
Each character is coded in two 4-bit parts: a zone (high nibble) and a digit (low nibble). For example, digits 0-9 are to (hex), the capital letters A-I are -, J-R are -, and S-Z are -. Hence and .
The letters are not in a contiguous sequence (there are gaps between I/J and R/S), which makes sorting and range checks harder than in ASCII. EBCDIC is still found in IBM mainframes, while ASCII (7 bit) and Unicode are used elsewhere.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
What is combinational circuit? Design a combinational circuit with four inputs that represent a decimal digit in BCD and four output lines that generate the 1’s complement of the input binary patterns.
Answer
Combinational circuit
A combinational circuit is a logic circuit whose outputs depend only on the present values of the inputs. It has no memory and no feedback; it consists of logic gates connected from inputs to outputs. Examples are adders, subtractors, multiplexers, decoders and comparators. Design steps: state the problem, list inputs and outputs, make the truth table, simplify the output functions, and draw the logic diagram.
Design: BCD to 1's complement
Let the BCD input be ( = MSB) and the outputs , where the output is the 1's complement of the input (every bit inverted). Only the BCD codes 0 to 9 occur; codes 1010 to 1111 are invalid and treated as don't care.
| Decimal | ||
|---|---|---|
| 0 | 0000 | 1111 |
| 1 | 0001 | 1110 |
| 2 | 0010 | 1101 |
| 3 | 0011 | 1100 |
| 4 | 0100 | 1011 |
| 5 | 0101 | 1010 |
| 6 | 0110 | 1001 |
| 7 | 0111 | 1000 |
| 8 | 1000 | 0111 |
| 9 | 1001 | 0110 |
| 10-15 | 1010-1111 | xxxx |
Looking at each output column, is 1 for 0 to 7 and 0 for 8, 9. With don't cares at 10-15, the K-map of is 1 exactly where (cells 8-15 are 0 or x, and 0-7 are 1), so . Similarly is 1 where in the valid codes: ; ; . (The don't cares allow no further simplification, since each output is already a single literal.)
Logic diagram: four NOT gates (inverters), one for each input line.
A --[NOT]-- W
B --[NOT]-- X
C --[NOT]-- Y
D --[NOT]-- Z
Check: input 0101 (5) gives 1010 (1's complement). Correct.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
What is asynchronous counter? Design asynchronous counter that counts the sequence of 0-1-4-6-7 using T flip-flop.
Answer
Asynchronous counter
An asynchronous (ripple) counter is a counter in which the flip-flops do not share a common clock. The external clock drives the first flip-flop, and the other flip-flops are clocked by the output of an earlier flip-flop, so state changes ripple through the stages one after another.
Design for the sequence 0-1-4-6-7 using T flip-flops
The sequence in binary is (5 states, so mod-5, 3 flip-flops). Let the state be ( = MSB). Unused states are don't cares.
Transitions and flip-flop toggling ():
| Present | Next | |||
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 100 | 1 | 0 | 1 |
| 100 | 110 | 0 | 1 | 0 |
| 110 | 111 | 0 | 0 | 1 |
| 111 | 000 | 1 | 1 | 1 |
| 010, 011, 101 | xxx | x | x | x |
Choice of clock for each flip-flop (asynchronous part):
- falls (1 to 0) exactly in the transitions and , which are the only two transitions where toggles, and it never falls at any other time. So FF-A is clocked by (falling edge) with .
- FF-B and FF-C are clocked by the external clock, with their T inputs found from K-maps.
K-map for : for ; for ; don't care for .
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 1 | 1 | x | x |
| 1 | 0 | x | 1 | 1 |
Groups: gives ; gives .
K-map for : for , ; for .
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 0 | x | x |
| 1 | 1 | x | 1 | 0 |
Groups: gives ; gives .
Verification of the count:
| Clock | State | Next state | ||
|---|---|---|---|---|
| 1 | 000 | 1 | 0 | 001 |
| 2 | 001 | 1 | 0 | falls, so toggles: 100 |
| 3 | 100 | 0 | 1 | 110 |
| 4 | 110 | 1 | 0 | 111 |
| 5 | 111 | 1 | 1 | falls, toggles: 000 |
The sequence 0-1-4-6-7-0 is obtained. The unused states are self-correcting: and .
Circuit: CLK goes to the clock inputs of FF-B and FF-C; goes to the (negative-edge) clock input of FF-A with . An OR gate forms and AND/OR gates form .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Perform the following operations:
a. (011101)_2 – (110011)_2 using 2’s complement
b. (89344)_10– – (98654)_10 using 9’s complement.
Answer
(a) using 2's complement
and , so the expected answer is .
Step 1: 2's complement of the subtrahend : 1's complement is , add 1 to get .
Step 2: add to the minuend:
Step 3: there is no carry out, so the result is negative and is in 2's complement form. Take the 2's complement of : 1's complement , plus 1 gives .
This agrees with .
(b) using 9's complement
Step 1: 9's complement of the subtrahend is .
Step 2: add:
Step 3: there is no end-around carry (the sum has only 5 digits), so the result is negative. Its magnitude is the 9's complement of : .
Check: . Correct.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
If f(P,Q,R,S) = ∑(3,4,7,8,14) and d(P,Q,R,S) = ∑(1,6,9,13). Simplify using K-map and design the circuit using minimum number of NAND gates.
Answer
with don't cares .
K-map (rows , columns in Gray order; x = don't care):
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 0 | x () | 1 () | 0 |
| 01 | 1 () | 0 | 1 () | x () |
| 11 | 0 | x () | 0 | 1 () |
| 10 | 1 () | x () | 0 | 0 |
Grouping (each 1 must be covered; don't cares are used only when useful):
- :
- (using don't care ):
- (using ): , which covers
- (using ):
No group contains a 0, and all of are covered. This is the minimum SOP.
NAND implementation (two-level NAND-NAND)
- Four 3-input NAND gates form , , and .
- One 4-input NAND gate combines them to give .
- The complemented inputs are made with three NAND gates connected as inverters (inputs tied together).
P',R,S --[NAND3]--\
P',Q,S' --[NAND3]---\
Q,R,S' --[NAND3]----[NAND4]--> f
P,Q',R' --[NAND3]---/
Total: 8 NAND gates (4 + 1 + 3 inverters); if the complemented inputs are available, only 5 gates are needed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What is the drawback of RS Flipflop? Explain D Flip Flop in detail with a logic diagram, characteristics table, and characteristics equation.
Answer
Drawback of the RS flip-flop
In an RS flip-flop, the input combination is invalid (forbidden). In a NOR-based latch it forces both outputs , which contradicts the complementary nature of the outputs. When both inputs return to 0 together, the final state depends on which gate is faster, so the next state is unpredictable (a race condition). The condition must therefore always be ensured by the user. The D flip-flop is derived to remove this drawback.
D flip-flop (Data / Delay flip-flop)
A D flip-flop has a single data input and a clock. It is made from a clocked SR flip-flop by connecting and through an inverter, so and can never be 1 together.
Logic diagram:
+------[AND]---- S -->+----------+
D -------+ ^ | SR latch |--- Q
| CLK | (NOR / |
+--[NOT]--[AND]-- R ->| NAND) |--- Q'
^ +----------+
CLK
(D feeds the upper gate directly and the lower gate through an inverter; both gates are enabled by CLK.)
Characteristic table:
| Operation | |||
|---|---|---|---|
| 0 | 0 | 0 | Reset |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | 1 | Set |
Simplified:
| 0 | 0 |
| 1 | 1 |
Characteristic equation: from , and the SR equation , we get :
The output after the clock edge simply equals the input before it, so the flip-flop stores one bit and delays it by one clock period. It has no invalid state. D flip-flops are used in registers, shift registers, counters and memory (IC 7474).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Design a full subtractor with necessary tables and logic diagram.
Answer
A full subtractor subtracts two bits (minuend) and (subtrahend) and also the borrow from the previous lower stage. It gives the difference and the borrow-out .
Truth table ()
| 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 |
Boolean expressions
Difference ( for minterms ):
Borrow ( for minterms ), from the K-map:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
Equivalently, .
Logic diagram (two half subtractors and an OR gate)
A --\
XOR1 -- X --\
B --/ | XOR2 ------------- D
| Bin/
|
A' ---\ +--[NOT]--\
AND1 -- A'B AND2 -- X'Bin
B ----/ | |
+-- OR --+---------- Bout
Implementation: the first half subtractor computes and ; the second half subtractor takes and , gives and the borrow . An OR gate combines the two borrows to give .
Check: (where ): , . Result: gives difference 0 with borrow 1. Correct.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What is shift register? Explain 4 bit SISO and PIPO with timing diagram.
Answer
Shift register
A shift register is a group of flip-flops connected in cascade, with a common clock, that can store a binary word and shift it left or right by one position on each clock pulse. Each flip-flop output is connected to the input of the next. According to how data enters and leaves, there are four types: SISO, SIPO, PISO and PIPO.
4-bit Serial-In Serial-Out (SISO) right shift register
Four D flip-flops are cascaded: serial input, , , , and the serial output is . All flip-flops share the clock.
Serial in --> [FF0]->[FF1]->[FF2]->[FF3] --> Serial out
Q0 Q1 Q2 Q3
^------ common CLK ------^
On each clock edge, every bit moves one place to the right, and a new bit enters at . A 4-bit word needs 4 clock pulses to load and 4 more to come out serially (a total of 8 pulses for in-and-out).
Timing table for input bits (first bit 1), with the register initially 0000:
| Clock | Serial in | Serial out | |
|---|---|---|---|
| 0 | - | 0000 | 0 |
| 1 | 1 | 1000 | 0 |
| 2 | 0 | 0100 | 0 |
| 3 | 1 | 1010 | 0 |
| 4 | 1 | 1101 | 1 |
| 5 | 0 | 0110 | 0 |
| 6 | 0 | 0011 | 1 |
| 7 | 0 | 0001 | 1 |
The word comes out at as after the fourth clock, in the same order as it was entered (the time diagram shows delayed by one clock, by two, and so on).
4-bit Parallel-In Parallel-Out (PIPO) register
Four D flip-flops with a common clock; each input is connected to its own flip-flop and all four outputs are available at once.
D0 D1 D2 D3 (parallel inputs)
| | | |
[FF0][FF1][FF2][FF3] <-- CLK
| | | |
Q0 Q1 Q2 Q3 (parallel outputs)
Timing: at the first active clock edge the input word, e.g. , is loaded, and from that moment and stays unchanged until the next clock edge. The whole word is loaded and read in one clock pulse, so PIPO is the fastest type, while SISO needs only one data line.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Design an asynchronous mod 11 up counter using T flip flop.
Answer
A mod-11 counter counts and then returns to 0. It needs flip-flops with , so .
Design
- Use four T flip-flops (with , toggle mode) connected as a ripple (asynchronous) up counter, triggered by the falling edge: the external clock drives , clocks , clocks and clocks .
- A natural 4-bit counter would continue to 11 (1011) and up to 15. To make the count stop at 10, the counter must be cleared when it reaches the first unwanted state, which is .
- A 3-input NAND gate with inputs detects the state 1011. It is the first state in the count sequence in which . The NAND output goes to the active-low asynchronous CLEAR inputs of all four flip-flops.
CLK --> [T0] --Q0--> [T1] --Q1--> [T2] --Q2--> [T3] --Q3
^ CLR ^ CLR ^ CLR ^ CLR
+-------------+-------------+-------------+--- NAND(Q3, Q1, Q0)
All T inputs are tied to logic 1.
Count sequence
| Clock | Clock | ||
|---|---|---|---|
| 0 | 0000 | 6 | 0110 |
| 1 | 0001 | 7 | 0111 |
| 2 | 0010 | 8 | 1000 |
| 3 | 0011 | 9 | 1001 |
| 4 | 0100 | 10 | 1010 |
| 5 | 0101 | 11 | 1011, momentarily, then cleared to 0000 |
At the 11th clock pulse the counter momentarily reaches 1011, the NAND output goes low, and all flip-flops are reset to 0000, so the stable states are to . The state 1011 lasts only a very short time (a few nanoseconds) and is not counted as a valid state.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
How race condition in JK flipflop can be resolved? Explain.
Answer
Race-around condition in a JK flip-flop
When , a JK flip-flop should toggle once per clock pulse. In a level-triggered JK flip-flop, the output changes during the time the clock is high. If the clock pulse width is longer than the propagation delay of the flip-flop, the changed output is fed back to the inputs while the clock is still high, and the flip-flop toggles again, and again. The output oscillates between 0 and 1 several times in one pulse, and its final value at the end of the pulse is unpredictable. This is the race-around condition.
It occurs only when and .
Methods to resolve it
-
Make the clock pulse narrower than the propagation delay: (clock period). In practice, this is hard to control and the pulse becomes too short to be reliable.
-
Edge triggering: use a positive- or negative-edge-triggered JK flip-flop. The inputs are sampled only at the moment of the clock transition, so the output changes once per clock edge and the feedback during the level has no effect.
-
Master-slave JK flip-flop (standard solution): two flip-flops are cascaded, a master and a slave. The slave clock is the inverse of the master clock (through an inverter).
J --[Master JK]--Qm--[Slave SR]-- Q
K --[ ]--Qm'-[ ]-- Q'
CLK ----------- NOT ----->(slave clock)
- When CLK = 1: the master is enabled and accepts and , while the slave is disabled, so the output does not change.
- When CLK = 0: the master is disabled, and the slave is enabled and copies the master output to .
The output therefore changes only once, at the falling edge of the clock. The new output cannot reach the master while the master is enabled, because the slave is disconnected at that time. For , the flip-flop toggles exactly once per clock pulse and there is no race-around.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What is decoder circuit? Design 3 to 8 decoder circuit.
Answer
Decoder
A decoder is a combinational circuit that converts an -bit binary code on its input lines into a maximum of unique output lines, where only the one output corresponding to the input code is active at a time. A decoder with inputs and outputs is called an -to- decoder. Decoders are used for address decoding, memory chip select, code conversion, and for implementing Boolean functions (each output is a minterm).
Design of a 3-to-8 decoder
Inputs: ( = MSB). Outputs: to .
Truth table:
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Each output is a minterm of the inputs:
Logic diagram: three inverters produce , and eight 3-input AND gates, one for each output, are connected to the proper true or complemented inputs.
A,B,C --> [3 NOT gates] --> A',B',C'
D0 = AND(A',B',C') D4 = AND(A ,B',C')
D1 = AND(A',B',C ) D5 = AND(A ,B',C )
D2 = AND(A',B ,C') D6 = AND(A ,B ,C')
D3 = AND(A',B ,C ) D7 = AND(A ,B ,C )
An enable input can be added by making the AND gates 4-input, so that all outputs stay 0 when . This allows two 3-to-8 decoders to be combined into a 4-to-16 decoder.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Write short notes on:
- State Diagram
- Encoder
- Parallel Adder
Answer
State diagram
A state diagram is a graphical representation of a sequential circuit. Each state is shown as a circle (labelled with its binary code), and the transitions between the states are shown as directed arrows labelled with the input/output pair that causes the transition. In a Mealy machine the label is (input/output on the arrow), while in a Moore machine the output is written inside the circle.
Example: a 1-bit parity or a 2-bit counter has states , with each arrow taken on a clock pulse. The state diagram is equivalent to the state table, and is the starting point for sequential circuit design: state diagram, state table, state reduction, state assignment, excitation table, flip-flop input equations, and logic diagram.
Encoder
An encoder is a combinational circuit that does the opposite of a decoder: it has (or fewer) input lines, of which only one is active at a time, and it produces an -bit binary code corresponding to the active input.
For an octal-to-binary (8-to-3) encoder:
It is implemented with three OR gates. The simple encoder has the problem that two inputs active at once give a wrong output, and gives the same output (000) as no input. A priority encoder solves this by encoding the highest-priority active input and adding a valid output bit (e.g. IC 74148).
Parallel adder
A parallel adder adds two -bit binary numbers simultaneously. It is built from full adders, one for each bit position; the carry-out of each full adder is connected to the carry-in of the next higher stage (ripple-carry adder).
For a 4-bit adder, gives and a final carry , with as input carry (0 for addition).
A0 B0 -> [FA0] -> S0
| C1
A1 B1 -> [FA1] -> S1
| C2
A2 B2 -> [FA2] -> S2
| C3
A3 B3 -> [FA3] -> S3 , C4
Each stage: and . The carry must ripple through all stages, so the delay is proportional to . To make it faster, a look-ahead carry generator (IC 7483 and 74283) is used, with where and . With XOR gates on the inputs controlled by a mode line , the same circuit works as an adder/subtractor.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Differentiate between synchronous and asynchronous counter. Design a 3-bit synchronous binary counter using T Flip Flop. Draw its timing diagram.
Similar questions: Digital Logic: Design a 2 bit asynchronous binary counter (2081)
Answer
Difference between synchronous and asynchronous counters
| Synchronous counter | Asynchronous (ripple) counter |
|---|---|
| A common clock is applied to all flip-flops at the same time | The clock is applied to the first flip-flop only; the output of each stage clocks the next |
| All flip-flops change state simultaneously | Flip-flops change state one after another (ripple) |
| Total delay is that of one flip-flop (plus gates), so it is faster | Total delay is , so it is slower |
| Needs extra logic gates, so the design is complex | Simple, with little extra hardware |
| No glitches in the count; suitable for high speed | Possible glitches in intermediate states; limited operating frequency |
Design of a 3-bit synchronous binary counter using T flip-flops
A 3-bit counter has states, counting . Let the state be ( = MSB). With T flip-flops, .
| Present | Next | |||
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 1 |
| 010 | 011 | 0 | 0 | 1 |
| 011 | 100 | 1 | 1 | 1 |
| 100 | 101 | 0 | 0 | 1 |
| 101 | 110 | 0 | 1 | 1 |
| 110 | 111 | 0 | 0 | 1 |
| 111 | 000 | 1 | 1 | 1 |
From K-maps (or by inspection of the table):
- in every row: .
- for , i.e. whenever : .
- for , i.e. whenever : .
Circuit
+------------------+-------------------+
| | |
1 --> [T0 FF0] --Q0--+--> [T1 FF1] --Q1--+--[AND]--> [T2 FF2] --Q2
^ CLK | ^ CLK | ^ CLK
CLK ---+--------------+-----+-------------+-----+
+--------------------(AND of Q1 and Q0)
All three flip-flops receive the same CLK. is tied to 1, is connected to , and is driven by a 2-input AND gate of and .
Timing diagram (negative edge triggering, one column per clock pulse)
Clock: 1 2 3 4 5 6 7 8 9
Q0 : 1 0 1 0 1 0 1 0 1 (toggles every pulse)
Q1 : 0 1 1 0 0 1 1 0 0 (toggles when Q0 = 1)
Q2 : 0 0 0 1 1 1 1 0 0 (toggles when Q1Q0 = 11)
State: 001 010 011 100 101 110 111 000 001
CLK : _|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|
Q0 : _|‾‾|__|‾‾|__|‾‾|__|‾‾|__|‾‾|_
Q1 : ___|‾‾‾‾‾‾|______|‾‾‾‾‾‾|______
Q2 : ____________|‾‾‾‾‾‾‾‾‾‾‾‾|______
The frequency of is , is and is . All outputs change at the same instant after each clock edge, with no ripple delay.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Explain De-Morgan’s Law. Simplify the Boolean function F(P,Q,R,S) =Π(0,1,4,5,11,14,15) and d(P,Q,R,S) =Σ(2,3,7,8,9,13) using K-Map in both SOP and POS form.
Answer
De Morgan's law. De Morgan's theorems relate the AND, OR and NOT operations:
The complement of a sum is the product of the complements, and the complement of a product is the sum of the complements. In general and . Hence a NOR gate equals a bubbled-input AND gate and a NAND gate equals a bubbled-input OR gate; this is used to convert circuits to NAND-only or NOR-only form.
Simplification. means for minterms 0, 1, 4, 5, 11, 14, 15. The don't cares are , so for the remaining minterms 6, 10 and 12.
K-map (rows , columns ):
| PQ \ RS | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | X | X |
| 01 | 0 | 0 | X | 1 |
| 11 | 1 | X | 0 | 0 |
| 10 | X | X | 0 | 1 |
(a) SOP form (group the 1s, using X where helpful)
- Quad () gives . It covers .
- Quad () gives . It covers .
- Pair () gives . It covers .
(b) POS form (group the 0s, using X where helpful)
- Quad () gives the sum term .
- Quad () gives . It covers .
- Pair () gives . It covers and .
Check. For , and every factor of the POS is 1, so . For each of the minterms 0, 1, 4, 5, 11, 14, 15 at least one factor is 0, so . The SOP likewise gives 1 only on the required minterms and the chosen don't cares.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Given A=46 and B=35 represent them in binary and perform A-B using 1’s complement method.
Answer
Binary representation (6 bits are enough for both numbers):
A − B by 1's complement
- Take the 1's complement of (invert every bit): .
- Add it to :
1 0 1 1 1 0 (A = 46)
+ 0 1 1 1 0 0 (1's complement of B = 28)
-------------
1 0 0 1 0 1 0
The sum is with a carry-out of 1.
- A carry-out means the result is positive. Add the end-around carry to the sum:
So , which agrees with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
What is Multiplexer. Design 8 to 1 Multiplexer with low level Multiplexers.
Answer
Multiplexer. A multiplexer (MUX or data selector) is a combinational circuit that selects one of data inputs and routes it to a single output. The choice is made by select lines. It is a many-to-one switch.
For a 2:1 MUX with select :
Design of an 8:1 MUX from lower-level MUXes
An 8:1 MUX has 8 data inputs to , three select lines and one output :
It can be built from two 4:1 MUXes and one 2:1 MUX:
I0 -| |
I1 -| 4:1 |--- Y0 --|
I2 -| MUX-1 | | 2:1
I3 -| | | MUX --- Y
S1 S0 |
I4 -| |--- Y1 ---|
I5 -| 4:1 | S2
I6 -| MUX-2 |
I7 -| |
S1 S0
- are connected to the select inputs of both 4:1 MUXes. MUX-1 selects among to and MUX-2 selects among to .
- drives the select input of the final 2:1 MUX. passes and passes .
Check: for MUX-2 outputs and the 2:1 MUX passes it, so .
Equivalently, seven 2:1 MUXes can be used: four in the first stage (select ), two in the second (select ) and one in the last (select ).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Write about D flip flop with necessary circuit, block diagram, characteristic table and equation.
Answer
D flip-flop. The D (data or delay) flip-flop has one data input and a clock input. On the active clock edge it stores the value of , so the output follows the input one clock later. It is obtained from an SR flip-flop by connecting and , which removes the invalid state .
Block diagram
+--------+
D ---| D Q |--- Q
| |
CLK ---|> Q'|--- Q'
+--------+
Circuit (gated NAND form). Inputs and CLK feed NAND gate 1 (). and CLK feed NAND gate 2 (). The outputs of these two gates drive a cross-coupled NAND latch whose outputs are and . When CLK = 1 the latch is set or reset according to ; when CLK = 0 the latch holds. An edge-triggered version uses a master-slave pair of such latches.
Characteristic table
| D | Q(t) | Q(t+1) | Operation |
|---|---|---|---|
| 0 | 0 | 0 | Reset |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | 1 | Set |
Compact form: and .
Characteristic equation
Excitation: to get a required next state , apply . D flip-flops are used in registers, counters and as one-bit memory cells.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Simplify F(A, B, C, D) = Σ(1,3,4,6,9,11,12,14) and realize the equation using NOR gates only.
Answer
K-map simplification of (rows , columns ):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 1 | 1 | 0 |
| 01 | 1 | 0 | 0 | 1 |
| 11 | 1 | 0 | 0 | 1 |
| 10 | 0 | 1 | 1 | 0 |
- Quad (, ) gives .
- Quad (, ) gives .
NOR-only realization. Write as a product of sums:
Complementing twice and applying De Morgan's law:
This needs five 2-input NOR gates:
- (NOR as inverter).
- .
- .
- .
- .
Check: gives , , so . gives , , so . gives , so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Mention different types of shift registers. Explain SIPO with timing diagram.
Answer
Shift register. A shift register is a group of flip-flops, usually D flip-flops sharing one clock, that stores binary data and shifts it one position per clock pulse.
Types of shift registers
- Serial-In Serial-Out (SISO)
- Serial-In Parallel-Out (SIPO)
- Parallel-In Serial-Out (PISO)
- Parallel-In Parallel-Out (PIPO)
- Bidirectional (left/right) and universal shift registers
- Ring counter and Johnson (twisted-ring) counter, which are shift registers with feedback
SIPO (Serial-In Parallel-Out). Data enters bit by bit at the first flip-flop. After clock pulses all bits are available at the same time at the outputs to . It converts serial data to parallel data (for example, in a receiver).
Structure for 4 bits: the serial input goes to of FF0; goes to of FF1; goes to of FF2; goes to of FF3; all flip-flops share the clock, and the outputs are read in parallel.
Operation. Let the serial data be (first bit first) and the register start cleared:
| Clock | Serial in | ||||
|---|---|---|---|---|---|
| initial | - | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 |
| 2 | 0 | 0 | 1 | 0 | 0 |
| 3 | 1 | 1 | 0 | 1 | 0 |
| 4 | 1 | 1 | 1 | 0 | 1 |
After the 4th pulse, , the data that was applied serially, is available in parallel.
Timing diagram (outputs change on the rising clock edge):
CLK : _|-|_|-|_|-|_|-|_|-|_
DIN : ___|‾‾‾|___|‾‾‾‾‾‾‾|__ (1 0 1 1)
Q0 : ____|‾‾‾|___|‾‾‾‾‾‾‾‾‾
Q1 : ________|‾‾‾|___|‾‾‾‾‾‾
Q2 : ____________|‾‾‾|___|‾‾
Q3 : ________________|‾‾‾‾‾‾
Each output is the previous one delayed by one clock period, so the first bit travels from to in four clocks.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
What is decoder? Describe the 3 to 8 line decoder circuit.
Answer
Decoder. A decoder is a combinational circuit that converts an -bit binary code into up to unique output lines, exactly one of which is active for each input combination. It is used for address decoding, memory selection, and driving displays.
3-to-8 line decoder. It has 3 inputs (with the MSB), 8 outputs to , and normally an enable input .
Truth table (with ):
| 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 |
Each output is a minterm of the inputs:
Circuit. Three NOT gates produce . Eight 3-input AND gates, one per output, receive the appropriate true or complemented inputs. With an enable, a fourth input is added to each AND gate so that all outputs are 0 when . Using NAND gates gives active-low outputs.
Two 3-to-8 decoders with enable can be combined to form a 4-to-16 decoder.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Explain state diagram, state table, state reduction and state assignment with suitable example.
Answer
Sequential circuits are described and designed through state diagrams and tables.
State diagram. A graph in which each circle is a state and each directed arc is a transition, labelled with the input value that causes it and the output ("input/output" for a Mealy machine).
State table. The tabular form of the diagram. It lists the present state, the next state for each input and the output for each input.
State reduction. Two states are equivalent if, for every input sequence, they give identical outputs and equivalent next states. An equivalent state can be removed, and its references replaced by the surviving state. This reduces the number of flip-flops and gates.
State assignment. Giving a unique binary code to each state of the reduced table. With states we need flip-flops where . The assignment affects the logic complexity.
Example.
| Present | Next (x=0) | Next (x=1) | Output (x=0) | Output (x=1) |
|---|---|---|---|---|
| a | a | b | 0 | 0 |
| b | c | d | 0 | 0 |
| c | a | d | 0 | 0 |
| d | e | f | 0 | 1 |
| e | a | f | 0 | 1 |
| f | g | f | 0 | 1 |
| g | a | f | 0 | 1 |
Reduction:
- and have the same next states (, ) and the same outputs, so they are equivalent. Remove and replace it by .
- Then has next states (, ) and outputs (0, 1), the same as (, ; 0, 1). Remove and replace it by .
The reduced table has five states:
| Present | x=0 | x=1 | Output (x=0) | Output (x=1) |
|---|---|---|---|---|
| a | a | b | 0 | 0 |
| b | c | d | 0 | 0 |
| c | a | d | 0 | 0 |
| d | e | d | 0 | 1 |
| e | a | d | 0 | 1 |
State assignment (3 flip-flops needed since ): , , , , . The coded state table is then used with the flip-flop excitation tables to derive the input equations. The states 101, 110 and 111 are unused and can be treated as don't cares.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Design a 2 bit asynchronous binary counter using T flip flop. Draw its timing diagram.
Similar questions: Digital Logic: Differentiate between synchronous and asynchronous counter. Design (2081)
Answer
2-bit asynchronous (ripple) up counter using T flip-flops
A 2-bit counter has states, counting . It needs two T flip-flops. In an asynchronous counter only the first flip-flop receives the external clock; each later flip-flop is clocked by the output of the previous one.
Design.
- Both T inputs are tied to logic 1 (), so each flip-flop toggles () on every active clock edge.
- FF0 (LSB, output ) is clocked by the external clock CLK.
- FF1 (MSB, output ) is clocked by .
- The flip-flops are negative-edge triggered, so FF1 toggles when goes from 1 to 0, which happens exactly when the count goes from to and from to .
+------+ +------+
1 -----| T Q0|---+----| T Q1|----- Q1
CLK ---|>o | | +-|>o |
+------+ +--+ +------+
FF0 (Q0 clocks FF1)
Count sequence
| Clock pulse | ||
|---|---|---|
| 0 | 0 | 0 |
| 1 | 0 | 1 |
| 2 | 1 | 0 |
| 3 | 1 | 1 |
| 4 | 0 | 0 |
Timing diagram (negative-edge triggered):
CLK : ‾|_|‾|_|‾|_|‾|_|‾|_
Q0 : __|‾‾‾|___|‾‾‾|___ (toggles on every falling CLK edge, f/2)
Q1 : ______|‾‾‾‾‾‾‾|______ (toggles on every falling Q0 edge, f/4)
has half the clock frequency and one quarter, so the circuit is also a divide-by-4 frequency divider. Because changes slightly after (propagation delay), the counter is not fully synchronous.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Write short notes on:
- Encoder
- Error detection codes
Answer
Encoder
An encoder is a combinational circuit with (or fewer) input lines and output lines. It converts the active input into its binary code, the inverse of a decoder. Only one input should be active at a time.
Octal-to-binary (8-to-3) encoder: inputs to , outputs :
Each output is realized by a 4-input OR gate. The problems are that the output is 000 both for and for "no input", and that the output is wrong when two inputs are active together. A priority encoder solves the second problem by giving priority to the highest-numbered active input and adds a valid output to flag "no input active". Applications include keyboard encoding and interrupt controllers.
Error detection codes
Errors can occur when data is transmitted or stored. Redundant bits are added to detect them.
- Parity bit. One extra bit makes the total number of 1s even (even parity) or odd (odd parity). It detects any single-bit error (any odd number of bit errors) but cannot correct it or detect two errors. Example: data 1011001 has four 1s, so the even-parity bit is 0, giving 10110010.
- Checksum. The sum of data words is sent with the data; the receiver recomputes it.
- CRC (cyclic redundancy check). The data is divided by a generator polynomial and the remainder is appended. It detects burst errors.
- Hamming code. Several parity bits placed at positions allow detection of two-bit errors and correction of a single-bit error. The number of parity bits satisfies for data bits.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from Frequency of each character (Semester 1 · C Programming), Graphics mode initialization (Semester 1 · C Programming), File opening modes (Semester 1 · C Programming), Sort 10 integers descending (Semester 1 · C Programming), Pointers and modularity (Semester 1 · C Programming), Trace the output (Semester 1 · C Programming), Recursion sum of first n (Semester 1 · C Programming), Smallest element of each column (BSc CSIT, Semester 1 · C Programming), Parameters and call by value/reference (Semester 1 · C Programming), TU BSc CSIT 2074 First Semester C Programming (TU IOST board exam, 2074), TU BSc CSIT 2075 First Semester C Programming (TU IOST board exam, 2075), TU BSc CSIT 2077 First Semester C Programming (TU IOST board exam, 2077), TU BSc CSIT 2078 First Semester C Programming (TU IOST board exam, 2078), TU BSc CSIT 2079 First Semester C Programming (TU IOST board exam, 2079), TU BSc CSIT 2080 First Semester C Programming (TU IOST board exam, 2080), TU BSc CSIT 2081 First Semester C Programming (TU IOST board exam, 2081), TU BSc CSIT 2082 First Semester C Programming (TU IOST board exam, 2082), TU BSc CSIT 2074 First Semester Digital Logic (TU IOST board exam, 2074), TU BSc CSIT 2075 First Semester Digital Logic (TU IOST board exam, 2075), TU BSc CSIT 2077 First Semester Digital Logic (TU IOST board exam, 2077), TU BSc CSIT 2078 First Semester Digital Logic (TU IOST board exam, 2078), TU BSc CSIT 2080 First Semester Digital Logic (TU IOST board exam, 2080), TU BSc CSIT 2081 First Semester Digital Logic (TU IOST board exam, 2081), TU BSc CSIT 2074 First Semester Introduction to Information Technology (TU IOST board exam, 2074), TU BSc CSIT 2075 First Semester Introduction to Information Technology (TU IOST board exam, 2075), TU BSc CSIT 2077 First Semester Introduction to Information Technology (TU IOST board exam, 2077), TU BSc CSIT 2078 First Semester Introduction to Information Technology (TU IOST board exam, 2078), TU BSc CSIT 2080 First Semester Introduction to Information Technology (TU IOST board exam, 2080), TU BSc CSIT 2081 First Semester Introduction to Information Technology (TU IOST board exam, 2081), TU BSc CSIT 2074 First Semester Mathematics I (TU IOST board exam, 2074), TU BSc CSIT 2075 First Semester Mathematics I (TU IOST board exam, 2075), TU BSc CSIT 2077 First Semester Mathematics I (TU IOST board exam, 2077), TU BSc CSIT 2078 First Semester Mathematics I (TU IOST board exam, 2078), TU BSc CSIT 2079 First Semester Mathematics I (TU IOST board exam, 2079), TU BSc CSIT 2080 First Semester Mathematics I (TU IOST board exam, 2080), TU BSc CSIT 2081 First Semester Mathematics I (TU IOST board exam, 2081), TU BSc CSIT 2082 First Semester Mathematics I (TU IOST board exam, 2082), TU BSc CSIT 2074 First Semester Physics (TU IOST board exam, 2074), TU BSc CSIT 2075 First Semester Physics (TU IOST board exam, 2075), TU BSc CSIT 2077 First Semester Physics (TU IOST board exam, 2077), TU BSc CSIT 2078 First Semester Physics (TU IOST board exam, 2078), TU BSc CSIT 2079 First Semester Physics (TU IOST board exam, 2079), TU BSc CSIT 2080 First Semester Physics (TU IOST board exam, 2080), TU BSc CSIT 2081 First Semester Physics (TU IOST board exam, 2081) and TU BSc CSIT 2082 First Semester Physics (TU IOST board exam, 2082). Answers are written for this site; check them against your class notes.