Chapter 3
Digital Logic
TU BIT past exam questions
Past questions and answers
72 questions set from this chapter, 1 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 6 exams
- 2081 · 5 marks
Convert into hexadecimal and decimal number system.
Similar questions: Convert 51966.57 decimal number system into (2078) · Convert $(110.101)_8$ into binary and decimal (2079)
Answer
Convert .
To hexadecimal: convert each octal digit to 3 bits, regroup into 4 bits.
Grouping in fours from the right: .
To decimal
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 · 5 marks
- 2079 · 5 marks
Define Half-subtractor with truth table and logic diagram.
Answer
Half-subtractor
A half-subtractor is a combinational circuit that subtracts two single bits, , and produces two outputs: the difference and the borrow (borrow needed from the next higher bit). It has no borrow input, which is why it is "half".
Truth table
| A | B | Difference D | Borrow |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
(For : the result is 1 with a borrow of 1.)
Boolean expressions
Logic diagram
A ---+-------------[XOR]------------> D = A xor B
| ^
B ---|---+-----------+
| |
+-[NOT]--+
| +--[AND]-------------> Bo = A'.B
B -------+----------^
That is: one XOR gate gives ; is inverted by a NOT gate and ANDed with to give .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Convert 51966.57 decimal number system into octal number system and hexadecimal number system.
Similar questions: Convert $(257)_8$ into hexadecimal and decimal (2081)
Answer
Convert to octal and hexadecimal.
Integer part 51966
Hexadecimal (divide by 16):
| Division | Quotient | Remainder |
|---|---|---|
| 51966 / 16 | 3247 | 14 (E) |
| 3247 / 16 | 202 | 15 (F) |
| 202 / 16 | 12 | 10 (A) |
| 12 / 16 | 0 | 12 (C) |
Reading upward: .
Octal (divide by 8):
| Division | Quotient | Remainder |
|---|---|---|
| 51966 / 8 | 6495 | 6 |
| 6495 / 8 | 811 | 7 |
| 811 / 8 | 101 | 3 |
| 101 / 8 | 12 | 5 |
| 12 / 8 | 1 | 4 |
| 1 / 8 | 0 | 1 |
Reading upward: .
Fraction part 0.57
Multiply by 16 repeatedly:
Hex fraction (it does not terminate).
Multiply by 8 repeatedly:
Octal fraction .
Result
Check: in binary is ; regrouping in threes gives .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Convert into binary and decimal number system.
Similar questions: Convert $(257)_8$ into hexadecimal and decimal (2081)
Answer
Convert .
To binary (each octal digit becomes 3 bits)
- Integer: giving .
- Fraction: giving .
To decimal
Integer part: .
Fraction part: .
Check from binary: and , which agrees.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
What is magnitude comparator? Design 2-bit magnitude comparator.
Similar questions: Define magnitude comparator? Design a 4-bit (2081)
Answer
Magnitude comparator
A magnitude comparator is a combinational circuit that compares two binary numbers and and gives three outputs: , and , exactly one of which is 1.
2-bit comparator design
Let and . There are 4 inputs, so 16 rows in the truth table:
| 00 | 00 | 0 | 1 | 0 |
| 00 | 01, 10, 11 | 0 | 0 | 1 |
| 01 | 00 | 1 | 0 | 0 |
| 01 | 01 | 0 | 1 | 0 |
| 01 | 10, 11 | 0 | 0 | 1 |
| 10 | 00, 01 | 1 | 0 | 0 |
| 10 | 10 | 0 | 1 | 0 |
| 10 | 11 | 0 | 0 | 1 |
| 11 | 00, 01, 10 | 1 | 0 | 0 |
| 11 | 11 | 0 | 1 | 0 |
Equations
when both bit pairs are equal. Let (XNOR).
when the MSB of is larger, or the MSBs are equal and the LSB of is larger:
similarly:
Circuit. Two XNOR gates give ; a 2-input AND gives . For : AND gates and feed an OR gate. For : AND gates and feed an OR gate. NOT gates provide the complements of the inputs.
Check: : , so ; so ; and so . Correct.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Explain the operation of a 4-bit parallel-in parallel-out shift register with data input 1010.
Similar questions: Define shift register. Explain the operation (2081)
Answer
A 4-bit PIPO shift register consists of four D flip-flops with a common clock. Each flip-flop has its own data input () and its own output ().
A=1 B=0 C=1 D=0 (data input 1010)
| | | |
[FF_A][FF_B][FF_C][FF_D] <- common CLK
| | | |
Q_A Q_B Q_C Q_D
Operation with data 1010
- Before the clock pulse, the register holds an old value (say 0000) and the parallel inputs are set to .
- At the active clock edge, each flip-flop copies its input: , , , .
- The register now holds 1010 and all four bits appear at the outputs at the same time, in a single clock pulse. The data stays stored until the next clock edge or until it is cleared.
| Clock pulse | |
|---|---|
| Before | 0000 |
| After 1st pulse | 1010 |
No shifting is involved between the stages. A clear input can reset all flip-flops to 0.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 2+8 marks
Define magnitude comparator? Design a 4-bit magnitude comparator circuit.
Similar questions: What is magnitude comparator? Design 2-bit (2079)
Answer
Magnitude comparator: a combinational circuit that compares two binary numbers and and indicates whether , or using three outputs.
4-bit comparator design: let and .
Step 1: bit equality (XNOR gates)
Step 2: outputs
Reasoning: comparison starts at the MSB. If then . If the MSBs are equal (), the next bits are compared, and so on. The numbers are equal only if all four bit pairs are equal.
Logic diagram
A3 B3 -> XNOR -> x3 --+
A2 B2 -> XNOR -> x2 --+--> AND4 ---------------------> A = B
A1 B1 -> XNOR -> x1 --+
A0 B0 -> XNOR -> x0 --+
A>B : 4 AND terms (with NOT on B_i) -> OR4 -> A > B
A<B : 4 AND terms (with NOT on A_i) -> OR4 -> A < B
The circuit needs 4 XNOR gates, a few NOT gates, AND gates (of 2, 3, 4, 5 inputs) and two 4-input OR gates. (The IC 7485 is a standard 4-bit comparator.) For example, , : , , , so through the term .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 1+4 marks
Define shift register. Explain the operation of 4-bit Serial-In Serial-Out Shift register with data input 1011.
Similar questions: Explain the operation of a 4-bit (2080)
Answer
Shift register: a sequential circuit made of a group of cascaded flip-flops, sharing a common clock, used to store binary data and shift it left or right by one position on each clock pulse.
4-bit SISO shift register (four D flip-flops)
Serial +----+ +----+ +----+ +----+
in ---->| FF3|-->| FF2|-->| FF1|-->| FF0|----> Serial out
+----+ +----+ +----+ +----+
CLK common to all
Operation with input 1011 (the bits are entered LSB first: 1, 1, 0, 1; the register initially holds 0000, outputs shown as )
| Clock pulse | Serial in | ||||
|---|---|---|---|---|---|
| Initial | - | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 |
| 2 | 1 | 1 | 1 | 0 | 0 |
| 3 | 0 | 0 | 1 | 1 | 0 |
| 4 | 1 | 1 | 0 | 1 | 1 |
After 4 clock pulses the register holds 1011 (the word is loaded). For serial output, four more pulses (with 0 input) shift the data out at in the order 1, 1, 0, 1 (first bit entered, first out).
| Clock pulse | Serial out () |
|---|---|
| 5 | 1 |
| 6 | 1 |
| 7 | 0 |
| 8 | 1 |
At each pulse every flip-flop takes the value of the one before it, so data moves one position per pulse.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
What is decoder? Design BCD to Decimal Decoder with truth table and logic diagram.
Answer
Decoder
A decoder is a combinational circuit that converts an -bit binary input code into up to unique output lines, activating exactly one output for each input combination.
BCD to decimal decoder (4-line to 10-line)
Inputs are the BCD digits ( = MSB); outputs are to . Input combinations 1010 to 1111 are invalid and produce no output (don't-care).
Truth table:
| A | B | C | D | Output high |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | |
| 0 | 0 | 0 | 1 | |
| 0 | 0 | 1 | 0 | |
| 0 | 0 | 1 | 1 | |
| 0 | 1 | 0 | 0 | |
| 0 | 1 | 0 | 1 | |
| 0 | 1 | 1 | 0 | |
| 0 | 1 | 1 | 1 | |
| 1 | 0 | 0 | 0 | |
| 1 | 0 | 0 | 1 |
Boolean expressions (using don't-cares to simplify):
(Without don't-cares, each output is the full 4-input AND of the minterm, e.g. .)
Logic diagram: four inputs and their complements feed ten AND gates, one per output. Each AND gate takes the literals shown in its expression above (4-input AND gates for , 3-input for to , 2-input for ); the output of the gate matching the input code goes to 1 and all others stay 0.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
Design a combinational circuit whose input is a four-bit number and output is 2's complement of the input number.
Answer
Let the input be and the output , where is the 2's complement of (invert all bits and add 1).
Truth table:
| 0000 | 0000 |
| 0001 | 1111 |
| 0010 | 1110 |
| 0011 | 1101 |
| 0100 | 1100 |
| 0101 | 1011 |
| 0110 | 1010 |
| 0111 | 1001 |
| 1000 | 1000 |
| 1001 | 0111 |
| 1010 | 0110 |
| 1011 | 0101 |
| 1100 | 0100 |
| 1101 | 0011 |
| 1110 | 0010 |
| 1111 | 0001 |
Simplifying with K-maps (or by the rule "copy bits up to and including the first 1 from the right, then invert the rest"):
Check: : , , , , so . Correct.
Logic diagram: is a direct wire from ; one XOR gate gives ; one OR gate plus one XOR gives ; a 3-input OR (or two 2-input ORs) plus one XOR gives .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 10 marks
What is ring counter? Explain ring counter with diagram, timing sequence and timing diagram.
Answer
Ring counter
A ring counter is a circular shift register in which the output of the last flip-flop is fed back to the input of the first. It is initialised so that a single 1 (the others 0) circulates around the register with each clock pulse. An -bit ring counter has states (modulus ) and uses flip-flops.
Diagram (4-bit, using D flip-flops)
+-----------------------------------------------+
| |
+--> D Q0 --> D Q1 --> D Q2 --> D Q3 ----------+
FF0 FF1 FF2 FF3
^ ^ ^ ^
CLK --+---------+---------+---------+
All four flip-flops share the same clock. The output of each flip-flop feeds the input of the next, and feeds back to . A preset pulse sets and clears the others, giving the initial state 1000.
Timing (state) sequence
| Clock pulse | ||||
|---|---|---|---|---|
| 0 (preset) | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 2 | 0 | 0 | 1 | 0 |
| 3 | 0 | 0 | 0 | 1 |
| 4 | 1 | 0 | 0 | 0 |
After 4 pulses the sequence repeats.
Timing diagram
CLK : _|-|_|-|_|-|_|-|_|-|_
Q0 : ---|_______|-------|__
Q1 : ___|-------|_______|--
Q2 : _______|-------|_______
Q3 : ___________|-------|___
Each output is high for exactly one clock period, and the high level moves from to in turn, so the outputs act as sequential timing pulses. Uses: sequence generators, control timing signals, and frequency division by .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Convert binary 1011.110 to decimal and hexadecimal.
Answer
Binary to decimal
So .
Binary to hexadecimal
Group in fours from the binary point: integer part , fractional part (pad with a zero on the right).
So .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Subtract 1011.11 from 1010.10 using 1's and 2's complement.
Answer
Compute (that is ).
Using 1's complement
1's complement of the subtrahend is .
There is no end-around carry, so the result is negative and is the 1's complement of the sum:
Using 2's complement
2's complement of = .
There is no carry out, so the result is negative; take the 2's complement of the sum: .
Result: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Express a given Boolean function as a sum of minterms.
Answer
A minterm is a product (AND) term containing every variable of the function once, in complemented or uncomplemented form. A function in sum-of-minterms form is the OR of the minterms for which the function equals 1, written as .
Method: make a truth table (or expand each product term by ANDing the missing variables with ) and list the rows where .
Example: Express as a sum of minterms.
Expand the first term: .
Expand the second term: .
Combining and removing the duplicate :
Check using the truth table: for = 001, 100, 101, 110, 111, which are exactly these minterms.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Simplify a Boolean function with don't-care conditions into SOP and POS forms.
Answer
Example: with don't-care conditions .
K-map (rows , columns ; X = don't care):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | 1 | 1 | X |
| 01 | 0 | X | 1 | 0 |
| 11 | 0 | 0 | 1 | 0 |
| 10 | 0 | 0 | 1 | 0 |
SOP (group the 1s, using X where useful)
- Quad (top row) gives .
- Quad (column ) gives .
POS (group the 0s, using X where useful)
Zeros are .
- gives .
- gives .
- gives .
Complementing with De Morgan's theorem:
Both forms realise the same function on the required minterms (they may differ only on the don't-care entries).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Implement a full subtractor using two half subtractors and one OR gate.
Answer
Half subtractor (HS)
Inputs ; outputs Difference and Borrow .
Full subtractor
Inputs , and borrow-in :
Implementation using two half subtractors and an OR gate
- HS1 takes and : gives and .
- HS2 takes and : gives (final difference) and .
- An OR gate combines the two borrows: .
x --+--[ HS1 ]-- D1 --[ HS2 ]-- D (difference)
y --+ | | ^
B1 B2 |
Bin ----------------------+
\ /
+-- OR ----+--> Bout
Verification: , which is the full-subtractor borrow expression, so the circuit is correct.
Truth table check (x y Bin -> D Bout): 000->00, 001->11, 010->11, 011->10, 100->10, 101->01, 110->00, 111->11.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Define an SR latch with its logic diagram and truth table.
Answer
SR latch
An SR (Set-Reset) latch is a basic 1-bit memory element with two inputs, S (set) and R (reset), and two complementary outputs and . It can be built from two cross-coupled NOR gates (active-high inputs) or two cross-coupled NAND gates (active-low inputs).
Logic diagram (NOR latch)
R ----+----------|\\
| NOR1 | )o---- Q
| +---|//
| |
| +-------+
| |
| +-------+
| |
S ----+---------|\\
NOR2 | )o---- Q'
Q ----|//
The output of each NOR gate is fed back to an input of the other: and .
Truth table (NOR latch)
| S | R | Q (next) | Q' (next) | Action |
|---|---|---|---|---|
| 0 | 0 | Q (no change) | Q' | Memory / hold |
| 0 | 1 | 0 | 1 | Reset |
| 1 | 0 | 1 | 0 | Set |
| 1 | 1 | 0 | 0 | Invalid (forbidden) |
With S = R = 1 both outputs are 0 and the final state is unpredictable when both inputs return to 0, so this input is avoided. For the NAND latch the inputs are active-low, so S = R = 0 is the invalid case.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Compare the logic of synchronous and ripple counters.
Answer
Both are binary counters built from flip-flops, but they differ in how the clock reaches the flip-flops.
Ripple (asynchronous) counter
Only the first flip-flop receives the external clock. The output of each flip-flop drives the clock input of the next one, so the change ripples through the chain. For a 3-bit up counter with T (or JK with ) flip-flops:
CLK --> [FF0] Q0 --> [FF1] Q1 --> [FF2] Q2
Synchronous counter
All flip-flops receive the same clock at the same instant. Each flip-flop's J/K (or T) input is driven by combinational logic on the present outputs, so a flip-flop toggles only when the logic enables it. For a 3-bit up counter:
CLK --+----------+----------+
v v v
[FF0] [FF1] [FF2]
T0=1 T1=Q0 T2=Q1.Q0
Comparison
| Basis | Ripple (asynchronous) | Synchronous |
|---|---|---|
| Clock | Only FF0 clocked; others clocked by the previous output | Common clock to all flip-flops |
| Speed | Slow: total delay for flip-flops | Fast: delay of one flip-flop plus gate delay, independent of |
| Maximum frequency | Limited as grows | Much higher |
| Hardware | Simple, no extra gates | Extra combinational gates for the inputs |
| Design | Very easy | Needs excitation tables and K-maps |
| Glitches | Decoding gives false transient states because bits change one after another | Bits change together, so decoding is clean |
| Use | Low-speed, low-cost counting and frequency division | High-speed, accurate counting and arbitrary sequences |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Define shift register and describe its types.
Answer
Shift register
A shift register is a sequential circuit made of a cascade of flip-flops, usually D flip-flops, sharing a common clock. Each flip-flop output is connected to the input of the next, so on every clock pulse the stored binary word moves one position left or right. An -bit register stores bits. It is used for temporary storage, serial-to-parallel and parallel-to-serial conversion, delay, and in counters and arithmetic circuits (multiplication by 2 and division by 2).
Types (by the way data enters and leaves)
- Serial-In Serial-Out (SISO): Data enters one bit at a time at the first flip-flop and leaves one bit at a time from the last. A 4-bit word needs 4 clock pulses to load and 4 more to read. It acts as a delay line.
Din --> [D FF0] --> [D FF1] --> [D FF2] --> [D FF3] --> Dout
^ ^ ^ ^
+-----------+-----CLK---+-----------+
-
Serial-In Parallel-Out (SIPO): Data is loaded serially, and after clock pulses all flip-flop outputs are available together. Used for serial-to-parallel conversion.
-
Parallel-In Serial-Out (PISO): All bits are loaded at once through a SHIFT/LOAD control (a 2-to-1 selector in front of each flip-flop), then shifted out serially. Used for parallel-to-serial conversion (transmitters).
-
Parallel-In Parallel-Out (PIPO): All bits are loaded together and all are available together after one clock pulse. It is a simple storage register and is the fastest type.
Other types by direction and function
- Unidirectional: shifts only left or only right.
- Bidirectional: shifts left or right under a mode control.
- Universal shift register: has parallel load, shift left, shift right and hold modes (for example the IC 74194).
- Ring counter: the last output is fed back to the first input; a single 1 circulates, giving states.
- Johnson (twisted-ring) counter: the complement of the last output is fed back, giving states.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2077 · 5 marks
Short notes on: (a) Parity generator (b) State diagram.
Answer
(a) Parity generator
A parity generator is a combinational circuit that adds one extra bit (the parity bit) to a data word so that the total number of 1s becomes even (even parity) or odd (odd parity). The receiver uses a parity checker to detect any single-bit error during transmission.
For a 3-bit message with even parity bit , must make the number of 1s even, so when the message has an odd number of 1s:
| A | B | C | P (even) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
It is implemented with two XOR gates: . For odd parity the output is inverted, . The 4-bit even-parity checker at the receiver computes ; indicates an error.
(b) State diagram
A state diagram is a graphical description of a sequential circuit. Each state (the contents of the flip-flops) is drawn as a circle labelled with its binary code. A directed arrow from one circle to another shows a transition on a clock pulse and is labelled with the input that causes it (and, for a Mealy machine, the output as input/output; for a Moore machine the output is written inside the circle).
Example: a 2-bit up counter with one enable input :
x=1 x=1 x=1 x=1
(00) -------> (01) -------> (10) -------> (11) -------> (00)
^ |x=0 ^ |x=0 ^ |x=0 ^ |x=0
+-+ +-+ +-+ +-+
State diagrams are first converted to a state table, then to excitation tables for the chosen flip-flops, and finally simplified with K-maps to obtain the circuit.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Design a combinational circuit with four inputs and one output. The output is equal to 1 when (i) all the inputs are equal to 1 or (ii) none of the inputs are equal to 1 or (iii) an odd number of inputs are equal to 1.
Answer
Step 1: Truth table. Let the inputs be and the output .
- (i) all inputs 1: minterm 15 (1111)
- (ii) no input is 1: minterm 0 (0000)
- (iii) odd number of 1s: minterms 1, 2, 4, 7, 8, 11, 13, 14
| ABCD | F | ABCD | F |
|---|---|---|---|
| 0000 | 1 | 1000 | 1 |
| 0001 | 1 | 1001 | 0 |
| 0010 | 1 | 1010 | 0 |
| 0011 | 0 | 1011 | 1 |
| 0100 | 1 | 1100 | 0 |
| 0101 | 0 | 1101 | 1 |
| 0110 | 0 | 1110 | 1 |
| 0111 | 1 | 1111 | 1 |
Step 2: Simplification. The ten minterms contain the eight odd-parity minterms, which form a checkerboard pattern on the K-map. No two of them are adjacent, so they cannot be grouped into larger SOP terms. The function is therefore best expressed using the XOR (parity) function plus the two extra minterms:
K-map (rows , columns ):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 0 | 1 |
| 01 | 1 | 0 | 1 | 0 |
| 11 | 0 | 1 | 1 | 1 |
| 10 | 1 | 0 | 1 | 0 |
Step 3: Circuit.
- Three 2-input XOR gates: , , (odd parity detector).
- One 4-input AND gate for (all inputs 1).
- One 4-input NOR gate for (no input is 1).
- One 3-input OR gate combining , the AND output and the NOR output to give .
A --+--[XOR]--+
B --+ +--[XOR]--------+
C --+--[XOR]--+ |
D --+ +--[OR]--> F
A,B,C,D ---[AND4]--------------+
A,B,C,D ---[NOR4]--------------+
Check: gives NOR ; gives AND ; has three 1s so XOR ; has two 1s, XOR , AND , NOR so . All agree with the table.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 10 marks
Implement the following function: using (i) Decoder (ii) Multiplexer (iii) PLA
Answer
(i) Using a decoder
Use a decoder with as MSB and as LSB. Its outputs are the minterms. Connect the outputs to a 9-input OR gate:
(If the decoder has active-low outputs, use a 9-input NAND gate instead.)
A B C D --> [4x16 DECODER] --> m0,m1,m3,m4,m5,m8,m9,m10,m15 --> [OR] --> F
(ii) Using a multiplexer
Use an MUX with as select lines () and as the data variable. For each , look at the pair of minterms :
| ABC | minterms | Input | ||
|---|---|---|---|---|
| 000 | 0, 1 | 1 | 1 | |
| 001 | 2, 3 | 0 | 1 | |
| 010 | 4, 5 | 1 | 1 | |
| 011 | 6, 7 | 0 | 0 | |
| 100 | 8, 9 | 1 | 1 | |
| 101 | 10, 11 | 1 | 0 | |
| 110 | 12, 13 | 0 | 0 | |
| 111 | 14, 15 | 0 | 1 |
Connections: , , , (through a NOT gate); select lines ; output .
(iii) Using a PLA
First minimise with a K-map (rows , columns ):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 1 | 0 |
| 01 | 1 | 1 | 0 | 0 |
| 11 | 0 | 0 | 1 | 0 |
| 10 | 1 | 1 | 0 | 1 |
Groups: (0,1,8,9), (0,1,4,5), (1,3), (8,10), (15).
PLA program table (4 inputs, 5 product terms, 1 output; the AND plane is programmed with 1 = true input, 0 = complemented input, - = not connected):
| Product | A | B | C | D | F |
|---|---|---|---|---|---|
| - | 0 | 0 | - | 1 | |
| 0 | - | 0 | - | 1 | |
| 0 | 0 | - | 1 | 1 | |
| 1 | 0 | - | 0 | 1 | |
| 1 | 1 | 1 | 1 | 1 |
The AND plane generates the five product terms from the inputs and their complements; the OR plane connects all five products to the single output .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 3+7 marks
What do you mean by race condition in JK Flip Flop? Mention the methods to overcome race condition in JK Flip Flop. Explain Master Slave Flip-flop using JK flip flop with logic circuit, truth table and timing diagram.
Answer
Race condition in a JK flip-flop
In a level-triggered JK flip-flop with , the output toggles while the clock is high. If the clock pulse width is longer than the propagation delay of the gates, the toggled output is fed back to the inputs and the flip-flop toggles again and again during the same pulse. At the end of the pulse the output is unpredictable. This uncontrolled oscillation is the race-around condition.
Methods to overcome it
- Use edge triggering, so the flip-flop responds only at the rising or falling edge and the output changes once per clock.
- Use a master-slave configuration (described below).
- Make the clock pulse narrower than the propagation delay (), which is difficult to guarantee in practice.
Master-slave JK flip-flop
It consists of two JK (or SR) latches in cascade: the master and the slave. The master is clocked by CLK and the slave by the inverted clock . The outputs of the slave are fed back to the master's gates.
J --+ +-------------------+
| +---------+ Qm +---------+ | |
+-->| MASTER |--------->| SLAVE |---+--> Q |
K --+-->| (CLK) |--Qm'---->| (CLK') |------> Q' |
| +----^----+ +----^----+ |
| | | |
| CLK [NOT]<--CLK |
+-- feedback of Q and Q' to the master input gates --------+
Operation
- CLK = 1: the master is enabled and takes the values of , (using , ); the slave is disabled, so does not change.
- CLK goes 1 to 0: the master is disabled (its inputs are locked), and the slave is enabled and copies the master's output. changes only now.
- CLK = 0: the master is disabled, so new values have no effect.
Because the feedback to the master is blocked whenever the slave is open, the output changes only once per clock cycle and there is no race.
Truth table (output after the falling edge of CLK)
| J | K | Action | |
|---|---|---|---|
| 0 | 0 | No change | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Toggle |
Timing diagram (for , so the flip-flop toggles)
CLK __|""|__|""|__|""|__|""|__
Qm __|"""""|_____|"""""|_____ (master follows while CLK=1)
Q ____|"""""""""|_________| (changes only at falling edge of CLK)
The output toggles once at each falling clock edge, giving a frequency of half the clock.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Convert into decimal and hexadecimal.
Answer
Convert .
To decimal
Integer part: .
Fraction part: .
To hexadecimal
Group the bits in fours outward from the binary point, padding with zeros: integer ; fraction (a 0 is added on the right).
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Subtract using both 2's and 1's complement.
Answer
Subtract .
Check in decimal: , which is .
Let and .
(a) Using 2's complement
1's complement of : .
2's complement of : add 1 at the last place: .
Add to :
111000.110
+ 001011.011
------------
1000100.001
There is a carry out of the MSB, so the result is positive; discard the carry.
(b) Using 1's complement
1's complement of : .
Add to :
111000.110
+ 001011.010
------------
1000100.000
There is a carry out of the MSB (end-around carry). Add it to the least significant bit:
000100.000
+ 000000.001
------------
000100.001
Both methods give , which matches the decimal check.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
State and prove De-Morgan's Theorems.
Answer
De Morgan's theorems
Theorem 1: The complement of a sum equals the product of the complements.
Theorem 2: The complement of a product equals the sum of the complements.
(They extend to any number of variables: and .)
Proof by truth table
| A | B | ||||||
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
The columns and are identical, and the columns and are identical, so both theorems hold for all input combinations.
Algebraic proof (Theorem 1)
The complement of is the unique element satisfying and . Show that is the complement of .
Both conditions are satisfied, so .
Algebraic proof (Theorem 2)
Hence is the complement of , i.e. .
Applying the theorems turns an AND into an OR (and vice versa) with complemented inputs, so NAND and NOR gates can implement any logic function.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
What is decoder? Implement 8 x 1 MUX using 4 x 1 MUX.
Answer
Decoder
A decoder is a combinational circuit that converts an -bit binary code on its inputs into a unique active output among output lines. Exactly one output is 1 (active-high) for each input combination, so each output is a minterm of the inputs. Examples: , and decoders; each usually has an enable input. A decoder has outputs minterm of . Uses: address decoding, memory chip selection, code conversion, and implementing Boolean functions.
MUX using MUX
An MUX has 8 data inputs , three select lines and one output . Three MUXes are used in two stages:
- MUX1 takes with selects . Output .
- MUX2 takes with selects . Output .
- MUX3 takes on input 0 and on input 1 (inputs 2 and 3 are unused, connected to 0), with select lines and . Its output is .
I0..I3 --> [4x1 MUX1] --Y1--> in0 +------------+
S1 S0 | 4x1 MUX3 |--> Y
I4..I7 --> [4x1 MUX2] --Y2--> in1 | S0=S2,S1=0 |
S1 S0 +------------+
When MUX3 passes (one of -); when it passes (one of -). So as required.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
What is clocked RS flip-flop? Explain with logic diagram and characteristic table.
Answer
Clocked RS flip-flop
A clocked (gated) RS flip-flop is an SR latch with an enabling clock. The inputs and can change the output only while the clock pulse . When the outputs hold their previous state. This synchronises the changes of state with the clock.
Logic diagram (NAND implementation)
S ----[NAND1]--+ +--------------------> Q
CLK --[ ] \--[NAND3]-----|
[ ]<--+ (cross-coupled)
R ----[NAND2]--+ [NAND4]-----|
CLK --[ ] /--[ ] +--------------------> Q'
Two NAND gates (NAND1, NAND2) gate and with the clock; their outputs drive a cross-coupled NAND latch (NAND3, NAND4) giving and .
Characteristic (truth) table
| CLK | S | R | Action | |
|---|---|---|---|---|
| 0 | X | X | No change (disabled) | |
| 1 | 0 | 0 | No change | |
| 1 | 0 | 1 | 0 | Reset |
| 1 | 1 | 0 | 1 | Set |
| 1 | 1 | 1 | ? | Invalid (both outputs 1, then indeterminate) |
Characteristic equation
The combination must be avoided because it forces and the final state is unpredictable when the clock returns to 0.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Design Mod-3 synchronous counter.
Answer
Mod-3 synchronous counter (counts , using two JK flip-flops )
Number of flip-flops: . State is unused.
State table and excitation
JK excitation: : ; : ; : ; : .
| Present | Next | ||||
|---|---|---|---|---|---|
| 00 | 01 | 0 | X | 1 | X |
| 01 | 10 | 1 | X | X | 1 |
| 10 | 00 | X | 1 | 0 | X |
| 11 | XX | X | X | X | X |
K-map simplification
- : 1 at state 01, 0 at 00, X at 10 and 11, so .
- : 1 at 10, X elsewhere, so .
- : 1 at 00, 0 at 10, X at 01 and 11, so .
- : 1 at 01, X elsewhere, so .
Circuit
CLK ---------+------------------+
| |
+----v----+ +----v----+
Q0 ---->| J1 Q1 |--Q1'-->| J0 Q0 |--> Q0
1 --->| K1 | (+5V)| K0 |<-- 1
+---------+ +---------+
is connected to , to , and both inputs to logic 1; both flip-flops get the same clock.
Check: 00: ; : next 01. 01: ; : next 10. 10: ; : next 00. The unused state 11 goes to 00 ( toggles to 0, resets ), so the counter is self-starting.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Draw a Parallel-In Parallel-Out Shift register and explain it.
Answer
Parallel-In Parallel-Out (PIPO) shift register
In a PIPO register all bits of the data word are applied simultaneously to the flip-flop inputs and all bits are available simultaneously at the outputs. A 4-bit PIPO register uses four D flip-flops with a common clock.
Diagram
D0 D1 D2 D3 (parallel data inputs)
| | | |
+-v--+ +-v--+ +-v--+ +-v--+
| D | | D | | D | | D |
| FF0| | FF1| | FF2| | FF3|
+-^--+ +-^--+ +-^--+ +-^--+
| | | |
+--------+---CLK---+--------+
| | | |
Q0 Q1 Q2 Q3 (parallel data outputs)
Operation
- The 4-bit word is placed on the data inputs.
- On the active clock edge each flip-flop stores its own input: (because for a D flip-flop ).
- The stored word appears at once on and is held until the next clock pulse.
Loading and reading each need only one clock pulse, so it is the fastest type of register. No shifting between flip-flops takes place, and it is mainly used as a temporary storage (buffer) register. For example, loading gives after one pulse.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 · 5 marks
Write short notes on: (a) Binary parallel adder (b) Johnson counter.
Answer
(a) Binary parallel adder
A binary parallel adder adds two -bit binary numbers using full adders connected in cascade, one per bit position. The carry output of each full adder feeds the carry input of the next higher stage. All bits of both numbers are applied simultaneously, and the sum bits and the final carry are produced together.
A3 B3 A2 B2 A1 B1 A0 B0
| | | | | | | |
[ FA3 ]<-[ FA2 ]<-[ FA1 ]<-[ FA0 ]<-- C0 (carry in, 0 for addition)
| | | | | | | |
C4 S3 C3 S2 C2 S1 C1 S0
Each full adder gives and .
Because each carry must ripple through every stage, the total delay is about times the delay of one full adder (a ripple-carry adder). The delay is reduced by a carry look-ahead adder, which computes the carries directly from the generate and propagate terms. With driven by control, the same adder can also subtract (using XOR gates on ).
(b) Johnson counter
A Johnson (twisted-ring) counter is a shift register in which the complement of the last flip-flop output is fed back to the first flip-flop's input. An -flip-flop Johnson counter has states (mod-), compared with states for an ordinary ring counter.
For a 4-bit Johnson counter (D flip-flops, , ), starting from 0000:
| Clock | |
|---|---|
| 0 | 0000 |
| 1 | 1000 |
| 2 | 1100 |
| 3 | 1110 |
| 4 | 1111 |
| 5 | 0111 |
| 6 | 0011 |
| 7 | 0001 |
| 8 | 0000 |
It has 8 states, each of which can be decoded with a single 2-input AND gate, and the output frequency is . Advantages: simple decoding, no glitches, and twice the states of a ring counter. Disadvantage: unused states () mean it needs self-correcting logic to start properly.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
Design a BCD-to Seven-segment decoder to display decimal numbers 1, 2 and 4.
Answer
Seven-segment display
A seven-segment display has segments arranged as a figure 8; lighting a suitable set of them shows a digit. Assume a common-cathode display (a segment lights when its input is 1).
- Digit 1:
- Digit 2:
- Digit 4:
Truth table. BCD input ( = MSB). Only the BCD codes of 1, 2 and 4 light segments; the other valid codes (0, 3, 5-9) give a blank display; codes 10-15 never occur and are don't-cares.
| Digit | ABCD | a | b | c | d | e | f | g |
|---|---|---|---|---|---|---|---|---|
| 1 | 0001 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 2 | 0010 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| 4 | 0100 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 0, 3, 5-9 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 10-15 | - | X | X | X | X | X | X | X |
K-map simplification (using the don't-cares for 10-15)
- : only minterm 2 (0010). It pairs with 10 (1010): .
- and are 1 only for digit 2: .
- : only minterm 4 (0100). It pairs with 12 (1100): .
- : minterms 1 and 4. Minterm 1 (0001) has no adjacent don't-care, so it stays a full term; 4 pairs with 12: .
- : minterms 2 and 4: .
- : minterms 1, 2, 4: .
Define three common product terms:
Circuit. Four NOT gates give . Three AND gates (one 4-input, two 3-input) produce . Then: drives segments directly; drives ; OR gates give , , and a 3-input OR gives . Each output drives its segment through a current-limiting resistor.
Check: Input 0100 gives , so and : the display shows 4. Input 0010 gives so , : shows 2. Input 0001 gives so only: shows 1.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
What are the drawbacks of clocked RS flip flop? Explain the operation of a JK flip flop along with its characteristic table, characteristic equation, circuit diagram and timing diagram.
Answer
Drawbacks of the clocked RS flip-flop
- Invalid state: the input combination makes both outputs the same () and, when the clock returns to 0, the final state is unpredictable. The user must ensure .
- Level triggering: while the clock is high, any change of or (including noise) changes the output, so the flip-flop is not stable during the pulse.
- There is no toggle mode, so it cannot be used directly in counters.
The JK flip-flop removes the invalid state by feeding and back to the input gates.
JK flip-flop operation
Inputs (set) and (reset) with clock. The input gates are and , so and can never be 1 together.
- : no change.
- : reset, .
- : set, .
- : toggle, .
Circuit diagram
J ---[AND3]---> S --+
^ Q' ^CLK +--[ Clocked SR / NAND latch ]--> Q
K ---[AND3]---> R --+ --> Q'
^ Q ^CLK
Q and Q' are fed back to the input AND gates.
Characteristic table
| J | K | ||
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
Characteristic equation
Timing diagram (edge-triggered, active on the rising edge of CLK)
CLK _|"|_|"|_|"|_|"|_|"|_
J _|""""""|_____________
K ____________|"""""""""
Q ___|""""""""""|_______
The output sets at the first clock edge after , holds when , and resets at the first edge after . With it would toggle on every edge.
The race-around problem at with level triggering is avoided by using edge triggering or the master-slave arrangement.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 10 marks
Design a sequential circuit using JK flip-flop with the help of given state diagram.
Answer
The state diagram is taken as the following one (states , input , arrows labelled with ):
x=0 (loop) x=1 x=0
.--. .-------------. .--------.
v | v | v |
(00) ---x=1--> (01) <--x=1 loop (11) --x=0--> (10)
| x=0 -------->(11)
Transitions: .
Step 1: State table. Two flip-flops and (both JK).
| Present AB | x | Next AB |
|---|---|---|
| 00 | 0 | 00 |
| 00 | 1 | 01 |
| 01 | 0 | 11 |
| 01 | 1 | 01 |
| 10 | 0 | 10 |
| 10 | 1 | 00 |
| 11 | 0 | 10 |
| 11 | 1 | 11 |
Step 2: Excitation table. For JK: : ; : ; : ; : .
| A B x | |||||
|---|---|---|---|---|---|
| 000 | 00 | 0 | X | 0 | X |
| 001 | 01 | 0 | X | 1 | X |
| 010 | 11 | 1 | X | X | 0 |
| 011 | 01 | 0 | X | X | 0 |
| 100 | 10 | X | 0 | 0 | X |
| 101 | 00 | X | 1 | 0 | X |
| 110 | 10 | X | 0 | X | 1 |
| 111 | 11 | X | 0 | X | 0 |
Step 3: K-map simplification (minterm number )
- : 1 at m2; 0 at m0, m1, m3; X at m4-m7. So .
- : 1 at m5; 0 at m4, m6, m7; X at m0-m3. So .
- : 1 at m1; 0 at m0, m4, m5; X at m2, m3, m6, m7. So .
- : 1 at m6; 0 at m2, m3, m7; X at m0, m1, m4, m5. So .
Step 4: Circuit. Two JK flip-flops with a common clock; four AND gates and two NOT gates (, and the complements , taken from outputs): , , , .
Check: state 01 with : ; holds 1: next 11. State 11, : so ; so : next 10. Both match the diagram.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Subtract using both 10's and 9's complement.
Answer
Subtract using 10's and 9's complement.
The digits 7, 8, 3, 5 are not valid in binary, so the subtrahend is the decimal number . Expected result by direct subtraction: .
Write the subtrahend with the same number of digits as the minuend: .
(a) 10's complement
9's complement of : subtract each digit from 9, giving .
10's complement: add 1 at the last place: .
Add to the minuend:
There is a carry out of the leftmost digit, so the answer is positive; discard the carry.
(b) 9's complement
9's complement of is .
A carry is produced, so add it back at the least significant digit (end-around carry):
Both methods agree with the direct result .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
What is decoder? Implement 8 x 1 MUX using 2 x 1 MUX.
Answer
Decoder
A decoder is a combinational circuit with inputs and up to outputs that activates exactly one output line for each input code. Each output is a minterm of the inputs. For example, a decoder has outputs , and usually an enable input . It is used for address decoding, memory selection, and implementing Boolean functions.
MUX using MUX
An MUX needs three levels of MUXes, in total of them.
- Level 1 (select ): four MUXes M1 to M4 take the pairs and give outputs .
- Level 2 (select ): two MUXes M5 and M6 take and and give .
- Level 3 (select ): MUX M7 takes and gives the output .
I0 I1 --[M1]--+
I2 I3 --[M2]--+--[M5]--+
I4 I5 --[M3]--+ +--[M7]--> Y
I6 I7 --[M4]--+--[M6]--+
S0 -> M1..M4 S1 -> M5,M6 S2 -> M7
For example selects: M3 chooses (because ), M6 chooses (because ), M7 chooses (because ), so the output is as required.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Design and explain the operational characteristics of D-flip flop.
Answer
D flip-flop
A D (data/delay) flip-flop has one data input and a clock. On the active clock edge the output takes the value of . It is obtained from an SR/JK flip-flop by connecting , (or , ), which makes the invalid input combination impossible.
Circuit (clocked NAND implementation)
D ---+-------------[NAND1]---+
| CLK ------>[ ] +--[NAND3]---> Q
| | ^ |
+--[NOT]-----[NAND2]-----+--[NAND4]---> Q'
CLK ------>[ ]
drives the set side and its complement drives the reset side of a clocked SR latch.
Characteristic (truth) table
| CLK | D | Action | ||
|---|---|---|---|---|
| active edge | 0 | 0 | 0 | Reset |
| active edge | 0 | 1 | 0 | Reset |
| active edge | 1 | 0 | 1 | Set |
| active edge | 1 | 1 | 1 | Set |
| no edge | X | Hold |
Characteristic equation
Operational characteristics
- The next state depends only on and not on the present state, so the flip-flop just delays the input by one clock period (hence "delay" flip-flop).
- There is no invalid or no-change state: it either stores 0 or 1.
- A D flip-flop is used as a 1-bit memory cell and is the building block of registers, shift registers and counters.
Timing: if is 1 at the clock edge, becomes 1 and stays 1 until an edge where is seen, at which becomes 0; changes of between edges have no effect.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Design Mod-5 synchronous counter using T- flip flop.
Answer
Mod-5 synchronous counter using T flip-flops
A mod-5 counter has 5 states: 000, 001, 010, 011, 100, then back to 000. Number of flip-flops: , so (). States 101, 110, 111 are unused (don't-cares).
For a T flip-flop, (toggle when the bit must change).
State table and excitation
| Present | Next | |||
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 1 |
| 010 | 011 | 0 | 0 | 1 |
| 011 | 100 | 1 | 1 | 1 |
| 100 | 000 | 1 | 0 | 0 |
| 101 | XXX | X | X | X |
| 110 | XXX | X | X | X |
| 111 | XXX | X | X | X |
K-map simplification (minterms are the present states 0 to 7)
- : 1 for 0, 1, 2, 3; 0 for 4; X for 5, 6, 7. Grouping gives .
- : 1 for 1 and 3; 0 for 0, 2, 4; X for 5, 6, 7. Grouping 1, 3, 5, 7 gives .
- : 1 for 3 and 4; 0 for 0, 1, 2; X for 5, 6, 7. Group 4, 5, 6, 7 gives , group 3, 7 gives : .
Circuit. Three T flip-flops with a common clock. is driven by , by , and by an OR gate whose inputs are and the output of an AND gate with inputs .
Check of the sequence: 011: so all bits toggle: . 100: (), , , so only toggles: . 010: only: .
Self-starting check of the unused states: 101: gives 011; 110: gives 010; 111: gives 001. All return to valid states.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Draw a Serial-In Serial-Out Shift register and explain it.
Answer
A Serial-In Serial-Out (SISO) shift register accepts data one bit at a time at a single input and delivers it one bit at a time at a single output, after a number of clock pulses equal to the number of stages.
Diagram (4-bit, D flip-flops)
Serial +----+ +----+ +----+ +----+
in ----> | FF0|-->| FF1|-->| FF2|-->| FF3|----> Serial out
+----+ +----+ +----+ +----+
^ ^ ^ ^
CLK ----------+--------+--------+--------+
The output of each D flip-flop is connected to the D input of the next flip-flop, and all flip-flops share the same clock.
Operation
- At each clock pulse every flip-flop copies the value of the previous one, so the stored bits shift one place to the right.
- The new bit at the serial input enters the first flip-flop.
- A 4-bit word needs 4 clock pulses to be loaded completely and 4 more pulses (or 3 additional) to be taken out at the serial output; the first bit entered is the first to leave.
It is used for time delays and in serial data transmission. Its advantage is the use of the minimum number of connections, and its disadvantage is the slow speed compared with parallel registers.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 · 5 marks
Write short notes on (any two): (a) BCD code (b) Status Register (c) Ring Counter
Answer
(a) BCD code
Binary Coded Decimal represents each decimal digit by its own 4-bit binary equivalent (8421 weighted code). Digits 0 to 9 are 0000 to 1001; the combinations 1010 to 1111 are invalid. For example, in BCD. It is easy to convert to decimal and is used in calculators and digital displays, but needs more bits than pure binary.
(b) Status register
The status register (flag register) is a register of the CPU that holds single-bit flags showing the result of the last ALU operation. Common flags: Carry (C), Sign (S), Zero (Z), Overflow (V). For example, Z = 1 when the result is zero. The flags are used by conditional branch instructions.
(c) Ring counter
A ring counter is a circular shift register in which the output of the last flip-flop is connected to the input of the first. Only one flip-flop holds 1 (initial state 1000) and this single 1 circulates: 1000, 0100, 0010, 0001. An -bit ring counter has states (mod-) and is used for sequencing and timing signals.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Define BCD code. Design a BCD to Excess-3 code converter, with truth table and logic diagram.
Answer
BCD code: Binary Coded Decimal represents each decimal digit 0 to 9 by its 4-bit binary value (8421 code). The codes 1010 to 1111 are invalid.
Excess-3 code: each digit is represented by BCD + 3 (0011). The BCD-to-Excess-3 converter has inputs (BCD, = MSB) and outputs .
Truth table
| Digit | A B C D | |
|---|---|---|
| 0 | 0000 | 0011 |
| 1 | 0001 | 0100 |
| 2 | 0010 | 0101 |
| 3 | 0011 | 0110 |
| 4 | 0100 | 0111 |
| 5 | 0101 | 1000 |
| 6 | 0110 | 1001 |
| 7 | 0111 | 1010 |
| 8 | 1000 | 1011 |
| 9 | 1001 | 1100 |
| 10 to 15 | 1010 to 1111 | xxxx (don't care) |
K-map simplification (with don't cares)
Check (digit 4, 0100): , , , giving 0111 as required. Digit 9 (1001): , , , giving 1100.
Logic diagram
D --[NOT]-------------------------------------> E0
C,D --[XNOR]----------------------------------> E1
B',C ; B',D ; B,C',D' --[AND x3]--[OR]--------> E2
A ; B.C ; B.D --[AND x2]--[OR3]----------------> E3
needs a single NOT gate on ; needs one XNOR gate; needs three AND gates and one OR gate (with NOT gates on ); needs two AND gates and one 3-input OR gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Define a combinational logic circuit. Design one that takes a four-bit input and outputs its 1's complement.
Answer
Combinational logic circuit: a circuit whose outputs at any instant depend only on the present values of the inputs (no memory or feedback). It is made of logic gates, e.g., adders, multiplexers, decoders, code converters.
Design: 4-bit 1's complement generator
The 1's complement of a binary number is obtained by inverting each bit. Let the inputs be and outputs .
Truth table (selected rows)
| 0000 | 1111 |
| 0001 | 1110 |
| 0101 | 1010 |
| 1010 | 0101 |
| 1111 | 0000 |
In every row each output bit is the complement of the corresponding input bit.
Boolean equations
Logic diagram
A3 --[NOT]-- Y3
A2 --[NOT]-- Y2
A1 --[NOT]-- Y1
A0 --[NOT]-- Y0
Four inverters (NOT gates) are sufficient. A controllable version (complement only when a control ) uses with four XOR gates.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 10 marks
Define a parallel counter. Design a MOD-12 synchronous up counter, with state diagram, timing sequence, and timing diagram.
Answer
Parallel (synchronous) counter: a counter in which all flip-flops receive the same clock pulse at the same time, so all state changes occur simultaneously. It avoids the ripple delay of an asynchronous counter.
Design of MOD-12 synchronous up counter (T flip-flops, )
It counts 0 to 11 () then returns to 0000. States 12 to 15 are don't cares.
State diagram
0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11
^ |
+---------------------------------------------------------+
State table with T inputs ()
| Present | Next | ||||
|---|---|---|---|---|---|
| 0000 | 0001 | 0 | 0 | 0 | 1 |
| 0001 | 0010 | 0 | 0 | 1 | 1 |
| 0010 | 0011 | 0 | 0 | 0 | 1 |
| 0011 | 0100 | 0 | 1 | 1 | 1 |
| 0100 | 0101 | 0 | 0 | 0 | 1 |
| 0101 | 0110 | 0 | 0 | 1 | 1 |
| 0110 | 0111 | 0 | 0 | 0 | 1 |
| 0111 | 1000 | 1 | 1 | 1 | 1 |
| 1000 | 1001 | 0 | 0 | 0 | 1 |
| 1001 | 1010 | 0 | 0 | 1 | 1 |
| 1010 | 1011 | 0 | 0 | 0 | 1 |
| 1011 | 0000 | 1 | 0 | 1 | 1 |
K-map simplification
Timing sequence (output after each clock pulse)
| Clock | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Count | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 0 |
Timing diagram: toggles on every clock edge (frequency ); toggles when (period 4 clocks); is high during counts 4 to 7; is high during counts 8 to 11. After count 11 all outputs fall to 0 together, so the cycle repeats every 12 clock pulses.
CLK: _|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_
Q0 : toggles every pulse
Q1 : 0 0 1 1 0 0 1 1 0 0 1 1
Q2 : 0 0 0 0 1 1 1 1 0 0 0 0
Q3 : 0 0 0 0 0 0 0 0 1 1 1 1
(columns are counts 0 to 11)
Check of unused states: 1111 gives , , , , so bits 3, 1, 0 toggle and 1111 goes to 0100, a valid state. Similarly 1100 goes to 1101, 1101 to 1110 and 1110 to 1111. Hence the counter is self-correcting.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Explain why NAND and NOR gates are called universal gates, and realize NOR as a universal gate.
Answer
Why NAND and NOR are universal gates: a universal gate is one from which all other gates (NOT, AND, OR) and hence any Boolean function can be built using only that type of gate. NAND and NOR gates can each implement NOT, AND and OR operations, so they are called universal gates. They are also cheap and easy to fabricate in ICs.
Realization using NOR gate
- NOT: join both inputs of a NOR gate together.
- OR: a NOR gate followed by a NOR used as inverter.
- AND: invert each input with a NOR-as-NOT, then feed them to a NOR gate.
NOT : A --+--[NOR]-- A'
+--/
OR : A --\
[NOR]--[NOR as NOT]-- A+B
B --/
AND : A --[NOR as NOT]--\
[NOR]-- AB
B --[NOR as NOT]--/
Since NOT, AND and OR can all be built from NOR gates alone, NOR is a universal gate. (Similarly NAND: NOT = NAND with joined inputs, AND = NAND followed by NOT, OR = NAND of the inverted inputs.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Simplify using K-maps in both SOP and POS forms.
Answer
Minterms: (6), (4, 6), (2, 3), (2).
K-map (rows , columns in order 00, 01, 11, 10)
| X \ YZ | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
SOP form: group (a pair giving ) and (a pair giving ).
POS form: group the zeros .
- (, ):
- (, ):
Complement both sides:
Both forms give the same function.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Define PLDs. Implement and using a ROM.
Answer
PLDs (Programmable Logic Devices): integrated circuits containing an array of AND and OR gates (and sometimes flip-flops) whose connections can be programmed by the user to implement a desired logic function. Types: PROM/ROM, PLA, PAL, CPLD, FPGA.
ROM implementation: a ROM with address lines and output bits implements functions of variables. It has a fixed AND array (a decoder that generates all minterms) and a programmable OR array.
Here there are two variables (as includes minterms 0 to 3), so a ROM is needed.
ROM truth table (programming table)
| Address (A B) | ||
|---|---|---|
| 00 | 1 | 1 |
| 01 | 1 | 0 |
| 10 | 1 | 1 |
| 11 | 0 | 1 |
Implementation
A,B -> [2-to-4 decoder] -> m0 m1 m2 m3
F1 = OR(m0, m1, m2) (programmed connections at m0, m1, m2)
F2 = OR(m0, m2, m3) (programmed connections at m0, m2, m3)
The fuses are kept intact at the crosspoints where the table has 1, and blown where it has 0.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Describe the clocked master-slave J-K flip-flop, with its operation table.
Answer
The master-slave J-K flip-flop consists of two cascaded clocked J-K (RS) flip-flops: the master and the slave. The slave receives the inverted clock, and the outputs of the slave are fed back to the master inputs.
J ---[ Master ]--Qm-->[ Slave ]-- Q
K ---[ JK ] [ RS ]-- Q'
CLK ---+----------[NOT]--+
+-> master +-> slave (opposite phase)
Q and Q' feed back to the master inputs
Operation
- When CLK = 1: the master is enabled and accepts J and K, while the slave is disabled (isolated). The output does not change.
- When CLK goes to 0 (falling edge): the master is disabled and the slave is enabled, so the master's state is passed to the output Q.
Hence the output changes only once per clock cycle, at the clock's falling edge, and the race-around condition for is eliminated.
Operation table
| J | K | Operation | |
|---|---|---|---|
| 0 | 0 | No change | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Toggle |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
What is the forbidden state in an SR flip-flop? Convert an SR flip-flop to a J-K flip-flop.
Answer
Forbidden state in an SR flip-flop
The input combination is forbidden (invalid). In a NOR-latch it forces both and to 0 (in a NAND latch, to 1), so the outputs are not complementary. When the inputs return to together, the final state is unpredictable (it depends on the gate delays). Hence the condition must always be maintained.
Conversion of SR to JK flip-flop
We need the SR inputs as functions of and the present state .
| J | K | S | R | ||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | x |
| 0 | 0 | 1 | 1 | x | 0 |
| 0 | 1 | 0 | 0 | 0 | x |
| 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | x | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 |
By K-maps:
Circuit: two AND gates: one with inputs and gives , the other with inputs and gives . Their outputs go to the S and R inputs of the SR flip-flop, and the outputs and are fed back. Because and are never both 1, can never occur.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Differentiate between a ring counter and a Johnson counter.
Answer
| Ring counter | Johnson counter |
|---|---|
| Output of the last flip-flop () is fed back to the first flip-flop's input. | Complemented output () of the last flip-flop is fed back to the first input. |
| An -bit counter has states (mod-). | An -bit counter has states (mod-). |
| Needs to be preset to start with a single 1 (e.g., 1000). | Starts from all zeros (0000); no preset needed. |
| Sequence (4-bit): 1000, 0100, 0010, 0001. | Sequence (4-bit): 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001. |
| Decoding of a state needs only one bit (single 1) so no gate is needed. | Decoding of any state needs a 2-input gate. |
| Less efficient: uses flip-flops for states. | More efficient: same flip-flops give twice the states. |
| Uses: sequencing and timing pulses. | Uses: higher count with simple decoding, sequence generators. |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Write short notes on any two: (a) ASCII code (b) logic micro-operations (c) state table.
Answer
(a) ASCII code
ASCII (American Standard Code for Information Interchange) is a 7-bit alphanumeric code (128 characters), often stored in 8 bits (with a parity or extended bit). It represents the digits, upper and lower case letters, punctuation and control characters. Examples: 'A' = 65 (1000001), 'a' = 97 (1100001), '0' = 48 (0110000). It is the standard for data exchange between computers and peripherals.
(b) Logic micro-operations
Logic micro-operations treat each bit of the registers separately as binary variables. Examples with registers and :
- AND (mask): clears selected bits.
- OR (selective set): sets selected bits.
- XOR (selective complement): complements selected bits.
- NOT (complement): complements all bits.
They are used to manipulate bits of data in registers, e.g., masking, inserting or deleting bits.
(c) State table
A state table lists the present states and inputs of a sequential circuit with the corresponding next states and outputs. Each row is one combination of present state and input. It is used with the excitation table to derive flip-flop input equations.
| Present state Q | Input x | Next state | Output y |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2080 · 5 marks
Convert into hexadecimal and octal.
Answer
Convert .
To hexadecimal
Integer part (divide by 16):
- remainder (F)
- remainder
- remainder
So .
Fractional part (multiply by 16):
- E
- B
To octal
Integer part (divide by 8):
- remainder
- remainder
- remainder
- remainder
So .
Fractional part (multiply by 8):
(The fractions do not terminate, so they are given approximately.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 10 marks
Design a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.
Answer
Problem: a combinational circuit with three inputs ( = MSB, = LSB) whose output is 1 when the binary value of the input is odd.
Truth table
| A | B | C | Decimal | F |
|---|---|---|---|---|
| 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
| A \ BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 |
All four 1s form a single quad (the column where ), in which and both change, so only remains.
Logic diagram: no gates are needed; the output is connected directly to input . The inputs and do not affect the output. (As a check, a number is odd exactly when its least significant bit is 1.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 2+8 marks
What is counter? Design a 3-bit synchronous up-down counter along with state diagram and timing sequence.
Answer
Counter: a sequential circuit made of flip-flops that goes through a prescribed sequence of states on the application of clock pulses; it is used to count pulses, divide frequency and generate timing.
Design of 3-bit synchronous up-down counter (T flip-flops, )
A control input selects the direction: up count, down count.
State diagram
Up (M=1): 000 -> 001 -> 010 -> 011 -> 100 -> 101 -> 110 -> 111 -> 000
Down (M=0): 000 -> 111 -> 110 -> 101 -> 100 -> 011 -> 010 -> 001 -> 000
Toggle conditions
- toggles on every clock pulse for both directions.
- toggles when (up) or (down).
- toggles when (up) or (down).
Excitation equations
Partial state table
| M | Present | Next | |
|---|---|---|---|
| 1 | 011 | 100 | 111 |
| 1 | 101 | 110 | 011 |
| 0 | 100 | 011 | 111 |
| 0 | 010 | 001 | 011 |
Timing sequence
| Clock | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Up count | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 | 000 |
| Down count | 000 | 111 | 110 | 101 | 100 | 011 | 010 | 001 | 000 |
Circuit: three T flip-flops with a common clock; is tied to logic 1; is driven by an XNOR gate with inputs and ; is driven by an OR gate of two 3-input AND gates, and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Perform following arithmetic operation:
(a) 101101 + 011011
(b) 101111 - 010101
Answer
(a)
1 0 1 1 0 1 (45)
+ 0 1 1 0 1 1 (27)
-------------
1 0 0 1 0 0 0 (72)
Bit by bit from the right: carry 1; carry 1; carry 1; carry 1; carry 1; carry 1; final carry 1.
(b)
Using 2's complement: 1's complement of is , add 1 to get .
1 0 1 1 1 1 (47)
+ 1 0 1 0 1 1
-------------
1 0 1 1 0 1 0
The carry-out (leftmost 1) is discarded, since the result is positive.
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Simplify (using K-map):
Answer
Each sum term is a maxterm (the output is 0 there). Writing the variable as 0 if uncomplemented:
- : 0001,
- : 0010,
- : 0110,
- : 0111,
- : 1001,
- : 1010,
- : 1110,
K-map (rows , columns in order 00, 01, 11, 10; zeros shown)
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 1 | 0 |
| 01 | 1 | 1 | 0 | 0 |
| 11 | 1 | 1 | 1 | 0 |
| 10 | 1 | 0 | 1 | 0 |
Grouping the zeros
- Quad (column ): , , giving the sum term
- Pair (, , ):
- Pair (, , ):
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 1+4 marks
Define multiplexer. Implement 8 x 1 multiplexer using 2 x 1 multiplexer.
Answer
Multiplexer (MUX): a combinational circuit that selects one of many data inputs and passes it to a single output, using select lines. A -to-1 MUX has inputs and select lines.
8 x 1 MUX using 2 x 1 MUXes: seven 2 x 1 MUXes in three levels are required.
- Level 1 (select ): M1 takes , M2 takes , M3 takes , M4 takes .
- Level 2 (select ): M5 takes outputs of (M1, M2), M6 takes outputs of (M3, M4).
- Level 3 (select ): M7 takes outputs of (M5, M6) and gives .
I0,I1 -> M1 --\
M5 --\
I2,I3 -> M2 --/ \
(S0) (S1) M7 --> Y
I4,I5 -> M3 --\ / (S2)
M6 --/
I6,I7 -> M4 --/
Check: for : M2 (select ) passes ; M5 (select ) passes the output of M2; M7 (select ) passes the output of M5. Hence .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 2+3 marks
What is Flip Flop? Differentiate between Combinational circuit and Sequential Circuit.
Answer
Flip-flop: a flip-flop is a bistable sequential circuit having two stable states (0 and 1) that can store one bit of information. Its output changes state only on a clock edge or pulse, depending on the inputs, and remains until the next change. Types: SR, JK, D, T.
Combinational vs sequential circuit
| Combinational circuit | Sequential circuit |
|---|---|
| Output depends only on the present inputs. | Output depends on present inputs and past outputs (stored state). |
| Has no memory element. | Has memory elements (flip-flops). |
| No feedback path. | Has feedback from output to input. |
| Does not need a clock. | Usually needs a clock (synchronous). |
| Faster and simpler. | Slower and more complex. |
| Examples: adder, multiplexer, decoder. | Examples: counter, register, flip-flop. |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Realize JK flip-flop from RS flip-flop.
Answer
We need to make a JK flip-flop using an RS flip-flop, so the S and R inputs must be derived from and the present output .
Excitation table of RS flip-flop
| S | R | |
|---|---|---|
| 0 → 0 | 0 | x |
| 0 → 1 | 1 | 0 |
| 1 → 0 | 0 | 1 |
| 1 → 1 | x | 0 |
Conversion table
| J | K | S | R | ||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | x |
| 0 | 0 | 1 | 1 | x | 0 |
| 0 | 1 | 0 | 0 | 0 | x |
| 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | x | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 |
K-maps (with the don't cares)
Circuit
J --\
AND -- S --[ RS ]-- Q ---+
Q' -/ [ flip- ] |
K --\ [ flop ]-- Q' --+--(fed back)
AND -- R --[ ]
Q --/
CLK -------------> CP
An AND gate (inputs and ) feeds S and another AND gate (inputs and ) feeds R, with fed back. When the circuit toggles, and never occurs.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 1+4 marks
Define shifter. Design a 4-bit shifter circuit.
Answer
Shifter: a combinational circuit that transfers the contents of a register shifted left or right (or unchanged) by one position without using a clock; it is a part of the processor's ALU/datapath, built using multiplexers.
Design of a 4-bit shifter: the input is and the output . Four 4 x 1 multiplexers with common select lines are used, one per output bit.
Function table
| Operation | Output | ||
|---|---|---|---|
| 0 | 0 | No shift (transfer) | |
| 0 | 1 | Shift right | |
| 1 | 0 | Shift left | |
| 1 | 1 | Clear | 0000 |
Here and are the serial inputs for the shift-right and shift-left cases.
Multiplexer inputs (inputs 0, 1, 2, 3 of each MUX)
| Output | Input 0 | Input 1 | Input 2 | Input 3 |
|---|---|---|---|---|
| 0 | ||||
| 0 | ||||
| 0 | ||||
| 0 |
A3 A2 A1 A0 -> [4 x 4:1 MUX, select S1 S0] -> H3 H2 H1 H0
IR -> MUX3 input 1 IL -> MUX0 input 2
Example: , (shift left) with gives ; (shift right) with gives .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081 · 5 marks
Write short notes on: (a) De-Multiplexer (b) Excitation table
Answer
(a) De-Multiplexer
A de-multiplexer (DEMUX) is a combinational circuit with one data input, select lines and outputs. It routes the single input to exactly one of the outputs, chosen by the binary value on the select lines. It is the reverse of a multiplexer ("one-to-many").
For a 1-to-4 DEMUX with input and selects :
| 0 | 0 | 0 | 0 | 0 | |
| 0 | 1 | 0 | 0 | 0 | |
| 1 | 0 | 0 | 0 | 0 | |
| 1 | 1 | 0 | 0 | 0 |
Each output is a 3-input AND gate, so the circuit needs four AND gates and two inverters. A decoder with enable input works as a DEMUX, the enable being used as the data input. Uses: serial-to-parallel conversion, routing data to one of several registers, and memory/address selection.
(b) Excitation table
An excitation table of a flip-flop lists the required flip-flop inputs for each desired transition from the present state to the next state . It is the inverse of the characteristic table and is used when designing sequential circuits (counters, state machines).
| SR: | JK: | D: | T: | ||
|---|---|---|---|---|---|
| 0 | 0 | 0 X | 0 X | 0 | 0 |
| 0 | 1 | 1 0 | 1 X | 1 | 1 |
| 1 | 0 | 0 1 | X 1 | 0 | 1 |
| 1 | 1 | X 0 | X 0 | 1 | 0 |
Here X is a don't-care. The don't-cares allow simpler input equations for the circuit being designed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 8+2 marks
Express the Boolean Function to sum of max terms with required truth tables. List two uses of sum of max terms.
Answer
Given .
Truth table
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
for minterms 1, 5, 6, 7 and for rows 0, 2, 3, 4.
Sum of maxterms (product of sums)
Each row with gives a maxterm, in which a variable is complemented if it is 1 in that row:
- Row 0 (000):
- Row 2 (010):
- Row 3 (011):
- Row 4 (100):
Check: , which is 1 exactly on the rows where .
Two uses of the maxterm (product-of-sums) form
- It can be implemented directly with two-level OR-AND logic (or NOR-NOR logic), which is useful when the function has fewer 0s than 1s.
- It is used to simplify a function by grouping the 0s in a K-map, which gives the complement in SOP form, and to find the complement of a function.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 3+7 marks
Differentiate between synchronous and asynchronous counter. Explain any one synchronous counter.
Answer
Difference between synchronous and asynchronous counters
| Asynchronous (ripple) counter | Synchronous counter |
|---|---|
| Clock is applied only to the first flip-flop; each later flip-flop is clocked by the output of the previous one | The same clock pulse is applied to all flip-flops at once |
| Propagation delays add up, so the counter is slow | All flip-flops change together, so the delay is that of one flip-flop, and it is faster |
| Simple circuit with little extra logic | Needs extra combinational gates for the flip-flop inputs |
| Can show wrong intermediate (glitch) states | No such transient states |
| Maximum clock frequency is limited by the number of stages | Maximum clock frequency is independent of the number of stages |
3-bit synchronous binary up counter (using JK flip-flops)
The counter has three flip-flops driven by a common clock and counts . A flip-flop toggles when all lower bits are 1.
| Present | Next | |||
|---|---|---|---|---|
| 000 | 001 | 0 X | 0 X | 1 X |
| 001 | 010 | 0 X | 1 X | X 1 |
| 010 | 011 | 0 X | X 0 | 1 X |
| 011 | 100 | 1 X | X 1 | X 1 |
| 100 | 101 | X 0 | 0 X | 1 X |
| 101 | 110 | X 0 | 1 X | X 1 |
| 110 | 111 | X 0 | X 0 | 1 X |
| 111 | 000 | X 1 | X 1 | X 1 |
Simplifying with K-maps:
Circuit: FF0 has so it toggles on every clock. FF1 has so it toggles when . FF2 gets from an AND gate with inputs , so it toggles when both lower bits are 1. All three clock inputs are tied to the same clock line. Because every flip-flop is clocked together, there is no ripple delay, and the counter can run at a higher clock frequency than a ripple counter.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 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 ( is the MSB) and the output be . Inputs 1010 to 1111 are invalid in BCD, so they are don't-cares.
| Digit | |||
|---|---|---|---|
| 0 | 0000 | 9 | 1001 |
| 1 | 0001 | 8 | 1000 |
| 2 | 0010 | 7 | 0111 |
| 3 | 0011 | 6 | 0110 |
| 4 | 0100 | 5 | 0101 |
| 5 | 0101 | 4 | 0100 |
| 6 | 0110 | 3 | 0011 |
| 7 | 0111 | 2 | 0010 |
| 8 | 1000 | 1 | 0001 |
| 9 | 1001 | 0 | 0000 |
Simplification (K-maps with don't-cares 10 to 15)
- for so .
- for so .
- for . Grouping with don't-cares gives .
- only for so . The 0s at need , and all present, and the don't-cares cannot reduce it further.
Circuit
- : one NOT gate on .
- : a wire straight from .
- : one XOR gate with inputs and .
- : one 3-input NOR gate with inputs , , (since ).
The whole circuit needs only one NOT, one XOR and one NOR gate. Check: (0100) gives , which is 0101 = 5 = 9 - 4. For (0000), gives 1001 = 9.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Perform A-B with the given binary numbers using 1's complement. A=1010100, B=1000100.
Answer
Given () and (). Compute using 1's complement.
Step 1: 1's complement of
Step 2: add to
Step 3: end-around carry
A carry of 1 is produced out of the MSB, so the result is positive. Remove the carry and add it to the LSB:
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Simplify the Boolean Function F in sum of products using the don't-care conditions d. , .
Answer
with .
Minterms and don't-cares (order )
- : 0000 and 1000, so
- : 0110 and 1110, so
- : (already included)
- : 0010 and 1010, so
- :
K-map (rows , columns )
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | X |
| 01 | 0 | X | 0 | 1 |
| 11 | 0 | 0 | 0 | 1 |
| 10 | 1 | 0 | 0 | X |
Grouping
- Quad of the corners (using ):
- Quad of the column : (using ):
Both prime implicants are essential: is needed for and for . The don't-care is not used.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Explain the concept of decoder with an example.
Answer
Decoder
A decoder is a combinational circuit that converts an -bit binary code on its inputs into a unique active output among output lines. Exactly one output is active (1, or 0 for active-low types) for each input combination. Many decoders also have an enable input . Each output is a minterm of the inputs, so a decoder can implement any Boolean function when OR gates are used on its outputs.
Example: 2-to-4 line decoder (inputs ; outputs to )
| 0 | X | X | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 1 |
The circuit uses two NOT gates and four 3-input AND gates. If and , only goes high.
Uses: memory address decoding, instruction decoding in a CPU, seven-segment display drivers, and implementing Boolean functions (for example a full adder from a 3-to-8 decoder with two OR gates: , ). Larger decoders can be built from smaller ones, e.g. a 3-to-8 decoder from two 2-to-4 decoders with enable inputs.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
List different memory types and explain basic memory operations.
Answer
Memory types
Memory can be classified as follows.
- Primary (main) memory
- RAM (random access, volatile, read/write): SRAM (flip-flop based, fast, used for cache) and DRAM (capacitor based, needs refresh, used for main memory).
- ROM (non-volatile, mostly read-only): masked ROM, PROM, EPROM (UV erasable), EEPROM (electrically erasable) and flash memory.
- Secondary memory: hard disk, SSD, optical disks and magnetic tape (non-volatile, large and slower).
- Cache memory: a small, very fast memory between the CPU and main memory.
- Registers: the fastest storage, inside the CPU.
Basic memory operations
A memory is a collection of storage cells organised as words, each having a unique address. It has an address bus (to select a word), a data bus, and control signals (Read/Write, Memory Enable).
- Write operation (store): the CPU places the address in the address register (MAR), the data in the data register (MDR), and activates the Write signal. The data is stored in the addressed word, which replaces its old contents.
- Read operation (load): the CPU places the address on the address lines and activates the Read signal. The addressed word is placed on the data lines and copied to the MDR. The contents of memory remain unchanged (non-destructive read).
A memory with address lines and data lines holds words of bits. For example, and gives bits, or 1 KB.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Explain JK flip flop with necessary diagram and truth table.
Answer
JK flip-flop
The JK flip-flop is a clocked flip-flop with two data inputs and . It removes the invalid state of the SR flip-flop: makes the output toggle. acts like Set and like Reset.
Circuit diagram (using NAND gates)
A clocked SR flip-flop is made of two cross-coupled NAND gates with two input NAND gates. is fed back to the gate for , and is fed back to the gate for :
Each steering gate also has the clock CLK as an input. The outputs are and .
Truth table
| CLK | Operation | |||
|---|---|---|---|---|
| 0 / not active | X | X | No change | |
| active | 0 | 0 | No change (hold) | |
| active | 0 | 1 | 0 | Reset |
| active | 1 | 0 | 1 | Set |
| active | 1 | 1 | Toggle |
Characteristic equation
With and a level-triggered clock, the output would oscillate (race-around condition) while the clock is high. This is avoided by using a master-slave or edge-triggered arrangement, so that the output changes only once per clock pulse.
Uses: counters, shift registers and frequency dividers (with it divides the clock frequency by 2).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 2.5+2.5 marks
Perform the following conversion: (a) to binary. (b) to decimal.
Answer
(a) to binary
Multiply the fraction repeatedly by 2 and record the integer parts:
Reading downwards: .
Check: .
(b) to decimal
So .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Explain processor registers and ALU connection through common buses with a suitable diagram.
Answer
Processor registers and ALU connection through common buses
A CPU has a number of registers (general-purpose registers R0 to Rn, the program counter PC, the instruction register IR, the memory address register MAR, the memory data register MDR, the accumulator, and the status register) and an ALU that performs arithmetic and logic operations. These are connected by internal buses.
Single-bus organisation
+--------- Internal CPU bus ----------------+
| | | | | |
PC IR R0..Rn MAR MDR Y
| | |
Address Data v
bus bus +---- ALU ----+
|
Z
|
(to bus)
Operation
- Each register's output is connected to the bus through a tri-state gate (or bus multiplexer), and its input is loaded from the bus. A control signal (such as or ) enables the transfer, and only one register may drive the bus at a time.
- The ALU has two inputs. One comes from the bus, and the other from a temporary register (Y) that holds the first operand. The ALU result is stored in a temporary register Z, because the bus is busy during the operation.
- For :
- , : copy R1 to Y.
- , ALU Add, : ALU adds Y and the bus value and loads Z.
- , : copy the result to R3.
- The control unit generates these control signals in sequence.
A multiple-bus organisation (two or three buses) lets two operands be read and a result written in the same clock cycle, so instructions execute faster. The cost is more hardware. Common buses reduce the number of connections, since each register needs only one connection to the bus instead of separate paths to every other unit.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 5 marks
Show that the dual of the exclusive-OR is equal to its complement.
Answer
To show: the dual of the exclusive-OR equals its complement
Exclusive-OR of and :
The dual of an expression is obtained by interchanging AND with OR (and 0 with 1), keeping the variables unchanged:
Expand the product:
Since and :
The complement of the XOR is the XNOR, which is equal to . We can check this using De Morgan's law:
Therefore
Hence the dual of the exclusive-OR is equal to its complement (the equivalence function). Truth table check: is 0,1,1,0 for = 00,01,10,11. The dual function is 1,0,0,1, which is the complement.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2081.2 · 2.5+2.5 marks
Write short notes on (a) Universal gate. (b) Status register.
Answer
(a) Universal gate
A universal gate is a logic gate that can be used alone to implement any Boolean function (NOT, AND and OR). NAND and NOR are universal gates.
NAND implementations:
- NOT: (inputs tied together)
- AND: (NAND followed by a NAND used as inverter)
- OR: (invert each input with a NAND, then NAND the results)
NOR implementations:
- NOT:
- OR:
- AND:
They are preferred in IC fabrication because using one gate type simplifies design and manufacturing, and the gates need fewer transistors and are faster.
(b) Status register
The status register (flag register or program status word, PSW) is a CPU register whose individual bits (flags) record the conditions produced by the last ALU operation. The control unit uses them for conditional branching, and they can also be tested by software.
Common flags:
- C (Carry): set if there is a carry out of the MSB.
- S (Sign): set if the MSB of the result is 1 (negative).
- Z (Zero): set if the result is zero.
- V (Overflow): set if signed overflow occurs, i.e. the carries into and out of the MSB differ.
Some processors also have parity, auxiliary-carry and interrupt-enable flags.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU BIT 2077 First Semester Introduction to Information Technology (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Introduction to Information Technology (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Introduction to Information Technology (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Introduction to Information Technology (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Introduction to Information Technology (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Introduction to Information Technology (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester C Programming (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester C Programming (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester C Programming (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester C Programming (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester C Programming (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester C Programming (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Digital Logic (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Digital Logic (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Digital Logic (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Digital Logic (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Digital Logic (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Digital Logic (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Basic Mathematics (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Basic Mathematics (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Basic Mathematics (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Basic Mathematics (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Basic Mathematics (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Basic Mathematics (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Sociology (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Sociology (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Sociology (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Sociology (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Sociology (TU IOST semester board exam, 2081 (BS), via StudyNp) and TU BIT 2081.2 First Semester Sociology (TU IOST semester board exam, 2081.2 (BS), via StudyNp). Answers are written for this site; check them against your class notes.