BIT103 ยท Exam intelligence
Digital Logic important questions
From 7 past TU papers: which questions keep coming back, how much they carry, and what is most likely to show up next. Every question links to a model answer.
Most likely in the next examStatistical
Ranked by how often a topic is asked, its marks weight, and whether it is due after skipping the 2081.2 paper. No guarantees; study the whole syllabus.
1asked 4xavg 10 marks ยท due (skipped 2081.2) ยท Combinational circuit design methodologyDesign a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.[10]
AnswerHide
Design a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.[10]
Design a combinational circuit with three inputs (A, B, C) where the output F = 1 when the binary value of the inputs is odd. --- Signal Description --------------------- A Most Significant Bit (MSB) B Middle Bit C Least Significant Bit (LSB) F Output (1 if binary value is odd) Key Observation: A...
2asked 4xavg 6 marks ยท due (skipped 2081.2) ยท Counter design using flip-flopsDefine parallel counter. Design MOD-12 synchronous up counter along with state diagram, timing sequence and timing diagram.[10]
AnswerHide
Define parallel counter. Design MOD-12 synchronous up counter along with state diagram, timing sequence and timing diagram.[10]
Parallel (Synchronous) Counter and MOD-12 Design
Definition of Parallel (Synchronous) Counter
A parallel counter (also called a synchronous counter) is a sequential digital circuit in which all flip-flops receive the clock pulse simultaneously. Unlike ripple (asynchronous) counters where each flip-flop triggers the next, in a synchronous counter the clock is applied in parallel to all flip-flops at the same time.
Key features:
- All flip-flops are clocked simultaneously
- No propagation delay accumulation (faster operation)
- Uses combinational logic (AND gates) to control flip-flop inputs
- Suitable for high-speed applications
MOD-12 Synchronous Up Counter Design
A MOD-12 counter counts from 0 to 11 (0000 to 1011 in binary) and then resets to 0. It requires 4 flip-flops (since 2^4 = 16 > 12).
Step 1: State Diagram
0000 โ 0001 โ 0010 โ 0011 โ 0100 โ 0101
โ โ
1011 โ 1010 โ 1001 โ 1000 โ 0111 โ 0110
States: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 โ back to 0
Step 2: State Table
We use JK Flip-Flops (Q3 = MSB, Q0 = LSB).
| State | Q3 | Q2 | Q1 | Q0 | Next Q3 | Next Q2 | Next Q1 | Next Q0 |
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 3 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 4 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
| 5 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| 6 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 |
| 7 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
| 8 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 9 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 10 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 |
| 11 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
Step 3: JK Flip-Flop Excitation Table
Recall JK excitation:
| Q(t) | Q(t+1) | J | K |
|---|---|---|---|
| 0 | 0 | 0 | X |
| 0 | 1 | 1 | X |
| 1 | 0 | X | 1 |
| 1 | 1 | X | 0 |
Step 4: JK Input Table
| State | Q3Q2Q1Q0 | J3 | K3 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0000 | 0 | X | 0 | X | 0 | X | 1 | X |
| 1 | 0001 | 0 | X | 0 | X | 1 | X | X | 1 |
| 2 | 0010 | 0 | X | 0 | X | X | 0 | 1 | X |
| 3 | 0011 | 0 | X | 1 | X | X | 1 | X | 1 |
| 4 | 0100 | 0 | X | X | 0 | 0 | X | 1 | X |
| 5 | 0101 | 0 | X | X | 0 | 1 | X | X | 1 |
| 6 | 0110 | 0 | X | X | 0 | X | 0 | 1 | X |
| 7 | 0111 | 1 | X | X | 1 | X | 1 | X | 1 |
| 8 | 1000 | X | 0 | 0 | X | 0 | X | 1 | X |
| 9 | 1001 | X | 0 | 0 | X | 1 | X | X | 1 |
| 10 | 1010 | X | 0 | 0 | X | X | 0 | 1 | X |
| 11 | 1011 | X | 1 | 0 | X | X | 1 | X | 1 |
States 1100 to 1111 never occur, so their entries are treated as don't-care conditions when the maps are simplified.
Simplified Flip-Flop Input Equations
Reading each column of the input table against the present state gives:
$$J_0 = K_0 = 1$$
$$J_1 = K_1 = Q_0$$
$$J_2 = \overline{Q_3} \cdot Q_1 \cdot Q_0 \qquad K_2 = Q_1 \cdot Q_0$$
$$J_3 = Q_2 \cdot Q_1 \cdot Q_0 \qquad K_3 = Q_1 \cdot Q_0$$
The least significant stage toggles on every pulse, so its inputs are tied to logic 1. Q1 toggles whenever Q0 is high. Q2 is set only at state 0011 and cleared only at state 0111, and the factor Qฬ3 is essential: without it the counter would set Q2 while leaving state 1011 and would run to MOD-16. Q3 is set on leaving 0111 and cleared on leaving 1011, which is what folds the count back to zero after 11 and makes the modulus 12.
Logic Circuit
+---+
| 1 |----> J0, K0
+---+
Q0 -------------------> J1, K1
Q1 ---+
+--[AND]--+------> K2 and K3
Q0 ---+ |
+--[AND with Q3']--> J2
|
+--[AND with Q2 ]--> J3
+-------+ +-------+ +-------+ +-------+
J0 ->| | | | | | | |
| FF0 | | FF1 | | FF2 | | FF3 |
K0 ->| | | | | | | |
+---+---+ +---+---+ +---+---+ +---+---+
| | | |
Q0 Q1 Q2 Q3
| | | |
CLK -----+-----------+-----------+-----------+
(one common clock to all four flip-flops)
All four flip-flops share one clock line, and only two AND gates plus one inverter are needed to build the input logic, since the term QโยทQโ is reused by Kโ and Kโ.
Timing Sequence
| Clock pulse | Qโ | Qโ | Qโ | Qโ | Count |
|---|---|---|---|---|---|
| initial | 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 | 0 | 0 | 0 | 0 | 0 (recycles) |
Timing Diagram
Pulse 1 2 3 4 5 6 7 8 9 10 11 12
__ __ __ __ __ __ __ __ __ __ __ __
CLK _| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_
Q0 โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____
Q1 _____โพโพโพโพโพโพโพโพโพโพ__________โพโพโพโพโพโพโพโพโพโพ__________โพโพโพโพโพโพโพโพโพโพ_____
Q2 _______________โพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพ_______________________
Q3 _______________________________________โพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพ_____
Qโ divides the clock by two, Qโ by four and Qโ by eight for as long as the count is below 8, while Qโ stays high through counts 8 to 11 and falls on the twelfth pulse. The Qโ waveform therefore has a period of twelve clock pulses, which confirms the modulus.
Conclusion
A parallel counter clocks all its flip-flops together, so its maximum speed is set by one flip-flop delay plus one gate delay rather than by the sum of the delays in the chain. The MOD-12 design above uses four JK flip-flops with $J_0 = K_0 = 1$, $J_1 = K_1 = Q_0$, $J_2 = \overline{Q_3}Q_1Q_0$, $K_2 = Q_1Q_0$, $J_3 = Q_2Q_1Q_0$ and $K_3 = Q_1Q_0$, which produces the repeating sequence 0 to 11 and returns to 0000 on the twelfth clock pulse.
3asked 4xavg 5 marks ยท due (skipped 2081.2) ยท Binary decimal octal hexadecimal conversionsConvert (257)โ into hexadecimal and decimal number system. [5]
AnswerHide
Convert (257)โ into hexadecimal and decimal number system. [5]
Convert (257)โ to Decimal and Hexadecimal
Given Data
- Number: $(257)_8$ (octal, base 8)
- Required: convert to hexadecimal (base 16) and decimal (base 10)
Part 1: Octal to Decimal
Multiply each digit by its positional weight (power of 8):
$$ (257)_8 = 2 \times 8^2 + 5 \times 8^1 + 7 \times 8^0 $$
$$ = 2 \times 64 + 5 \times 8 + 7 \times 1 $$
$$ = 128 + 40 + 7 = 175 $$
$$ \boxed{(257)8 = (175){10}} $$
Part 2: Octal to Hexadecimal (via Binary)
Step 1: Convert each octal digit to 3-bit binary
| Octal Digit | 3-bit Binary |
|---|---|
| 2 | 010 |
| 5 | 101 |
| 7 | 111 |
$$ (257)_8 = (010\ 101\ 111)_2 = (10101111)_2 $$
Step 2: Regroup binary into groups of 4 (from right)
$$ 10101111 \rightarrow 1010\ 1111 $$
(No padding needed here since 8 bits = two groups of 4.)
| 4-bit Group | Hexadecimal |
|---|---|
| 1010 | A |
| 1111 | F |
Answer
$$ \boxed{(257)8 = (AF){16}} $$
Verification (decimal check): $$ (AF){16} = 10 \times 16 + 15 = 160 + 15 = 175 = (175){10} \checkmark $$
Summary
| From | To | Result |
|---|---|---|
| $(257)_8$ | Decimal | $(175)_{10}$ |
| $(257)_8$ | Hexadecimal | $(AF)_{16}$ |
4asked 4xavg 5 marks ยท due (skipped 2081.2) ยท Multiplexer implementation using smaller multiplexersDefine multiplexer. Implement 8 ร 1 multiplexer using 2 ร 1 multiplexer. [1+4]
AnswerHide
Define multiplexer. Implement 8 ร 1 multiplexer using 2 ร 1 multiplexer. [1+4]
Multiplexer: Definition and Implementation
Definition of Multiplexer
A multiplexer (MUX) is a combinational circuit that selects one of many input lines and forwards it to a single output line based on select lines. It is also called a data selector.
- An n-input multiplexer has:
2^ndata input linesnselect lines1output line
Implementing 8ร1 MUX Using 2ร1 MUXes
Key Idea
- An 8ร1 MUX has: 8 data inputs (I0-I7), 3 select lines (S2, S1, S0), and 1 output
- A 2ร1 MUX has: 2 data inputs, 1 select line, 1 output
How Many 2ร1 MUXes Are Needed?
To build an 8ร1 MUX from 2ร1 MUXes:
| Stage | MUXes Required | Output Lines |
|---|---|---|
| Stage 1 (Level 1) | 4 ร (2ร1 MUX) | 4 outputs |
| Stage 2 (Level 2) | 2 ร (2ร1 MUX) | 2 outputs |
| Stage 3 (Level 3) | 1 ร (2ร1 MUX) | 1 output (final) |
Total = 4 + 2 + 1 = 7 two-input MUXes
Circuit Description
Data Inputs Stage 1 (S0) Stage 2 (S1) Stage 3 (S2)
----------- ------------ ------------ ------------
I0 โโ
โโ MUX1 โโโ
I1 โโ (S0) โ
โโ MUX5 โโโ
I2 โโ โ (S1) โ
โโ MUX2 โโโ โ
I3 โโ (S0) โโ MUX7 โโโโ Y (Output)
โ (S2)
I4 โโ โ
โโ MUX3 โโโ โ
I5 โโ (S0) โ โ
โโ MUX6 โโโ
I6 โโ โ (S1)
โโ MUX4 โโโ
I7 โโ (S0)
Operation (Truth Table of Selection)
| S2 | S1 | S0 | Selected Input |
|---|---|---|---|
| 0 | 0 | 0 | I0 |
| 0 | 0 | 1 | I1 |
| 0 | 1 | 0 | I2 |
| 0 | 1 | 1 | I3 |
| 1 | 0 | 0 | I4 |
| 1 | 0 | 1 | I5 |
| 1 | 1 | 0 | I6 |
| 1 | 1 | 1 | I7 |
Working Principle
-
Stage 1 (controlled by S0):
- MUX1 selects between I0 and I1
- MUX2 selects between I2 and I3
- MUX3 selects between I4 and I5
- MUX4 selects between I6 and I7
-
Stage 2 (controlled by S1):
- MUX5 selects between outputs of MUX1 and MUX2
- MUX6 selects between outputs of MUX3 and MUX4
-
Stage 3 (controlled by S2):
- MUX7 selects between outputs of MUX5 and MUX6 to give the final output Y
Summary
An 8ร1 MUX can be implemented using seven 2ร1 MUXes arranged in three stages, where each stage is controlled by one select line (S0, S1, S2 respectively), progressively narrowing 8 inputs down to 1 output.
5asked 3xavg 7 marks ยท due (skipped 2081.2) ยท Parity generator and checkerWrite short notes on: (Any two) a.) ASCII Code b.)Logic micro operation c.) State table [5]
AnswerHide
Write short notes on: (Any two) a.) ASCII Code b.)Logic micro operation c.) State table [5]
--- ASCII stands for American Standard Code for Information Interchange. - It is a 7-bit character encoding standard used to represent text in computers and communication devices. - A 7-bit ASCII code can represent 2โท = 128 different characters. - These characters include: - Uppercase letters (A-...
Most repeated questions
Topics asked at least twice, most-asked first.
asked 4xavg 10 marks ยท 2081, 2080, 2078, 2077Design a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.[10]
AnswerHide
Design a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.[10]
Design a combinational circuit with three inputs (A, B, C) where the output F = 1 when the binary value of the inputs is odd. --- Signal Description --------------------- A Most Significant Bit (MSB) B Middle Bit C Least Significant Bit (LSB) F Output (1 if binary value is odd) Key Observation: A...
asked 4xavg 6 marks ยท 2080, 2079, 2078, 0Define parallel counter. Design MOD-12 synchronous up counter along with state diagram, timing sequence and timing diagram.[10]
AnswerHide
Define parallel counter. Design MOD-12 synchronous up counter along with state diagram, timing sequence and timing diagram.[10]
Parallel (Synchronous) Counter and MOD-12 Design
Definition of Parallel (Synchronous) Counter
A parallel counter (also called a synchronous counter) is a sequential digital circuit in which all flip-flops receive the clock pulse simultaneously. Unlike ripple (asynchronous) counters where each flip-flop triggers the next, in a synchronous counter the clock is applied in parallel to all flip-flops at the same time.
Key features:
- All flip-flops are clocked simultaneously
- No propagation delay accumulation (faster operation)
- Uses combinational logic (AND gates) to control flip-flop inputs
- Suitable for high-speed applications
MOD-12 Synchronous Up Counter Design
A MOD-12 counter counts from 0 to 11 (0000 to 1011 in binary) and then resets to 0. It requires 4 flip-flops (since 2^4 = 16 > 12).
Step 1: State Diagram
0000 โ 0001 โ 0010 โ 0011 โ 0100 โ 0101
โ โ
1011 โ 1010 โ 1001 โ 1000 โ 0111 โ 0110
States: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 โ back to 0
Step 2: State Table
We use JK Flip-Flops (Q3 = MSB, Q0 = LSB).
| State | Q3 | Q2 | Q1 | Q0 | Next Q3 | Next Q2 | Next Q1 | Next Q0 |
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 3 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 4 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
| 5 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| 6 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 |
| 7 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
| 8 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 9 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 10 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 |
| 11 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
Step 3: JK Flip-Flop Excitation Table
Recall JK excitation:
| Q(t) | Q(t+1) | J | K |
|---|---|---|---|
| 0 | 0 | 0 | X |
| 0 | 1 | 1 | X |
| 1 | 0 | X | 1 |
| 1 | 1 | X | 0 |
Step 4: JK Input Table
| State | Q3Q2Q1Q0 | J3 | K3 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0000 | 0 | X | 0 | X | 0 | X | 1 | X |
| 1 | 0001 | 0 | X | 0 | X | 1 | X | X | 1 |
| 2 | 0010 | 0 | X | 0 | X | X | 0 | 1 | X |
| 3 | 0011 | 0 | X | 1 | X | X | 1 | X | 1 |
| 4 | 0100 | 0 | X | X | 0 | 0 | X | 1 | X |
| 5 | 0101 | 0 | X | X | 0 | 1 | X | X | 1 |
| 6 | 0110 | 0 | X | X | 0 | X | 0 | 1 | X |
| 7 | 0111 | 1 | X | X | 1 | X | 1 | X | 1 |
| 8 | 1000 | X | 0 | 0 | X | 0 | X | 1 | X |
| 9 | 1001 | X | 0 | 0 | X | 1 | X | X | 1 |
| 10 | 1010 | X | 0 | 0 | X | X | 0 | 1 | X |
| 11 | 1011 | X | 1 | 0 | X | X | 1 | X | 1 |
States 1100 to 1111 never occur, so their entries are treated as don't-care conditions when the maps are simplified.
Simplified Flip-Flop Input Equations
Reading each column of the input table against the present state gives:
$$J_0 = K_0 = 1$$
$$J_1 = K_1 = Q_0$$
$$J_2 = \overline{Q_3} \cdot Q_1 \cdot Q_0 \qquad K_2 = Q_1 \cdot Q_0$$
$$J_3 = Q_2 \cdot Q_1 \cdot Q_0 \qquad K_3 = Q_1 \cdot Q_0$$
The least significant stage toggles on every pulse, so its inputs are tied to logic 1. Q1 toggles whenever Q0 is high. Q2 is set only at state 0011 and cleared only at state 0111, and the factor Qฬ3 is essential: without it the counter would set Q2 while leaving state 1011 and would run to MOD-16. Q3 is set on leaving 0111 and cleared on leaving 1011, which is what folds the count back to zero after 11 and makes the modulus 12.
Logic Circuit
+---+
| 1 |----> J0, K0
+---+
Q0 -------------------> J1, K1
Q1 ---+
+--[AND]--+------> K2 and K3
Q0 ---+ |
+--[AND with Q3']--> J2
|
+--[AND with Q2 ]--> J3
+-------+ +-------+ +-------+ +-------+
J0 ->| | | | | | | |
| FF0 | | FF1 | | FF2 | | FF3 |
K0 ->| | | | | | | |
+---+---+ +---+---+ +---+---+ +---+---+
| | | |
Q0 Q1 Q2 Q3
| | | |
CLK -----+-----------+-----------+-----------+
(one common clock to all four flip-flops)
All four flip-flops share one clock line, and only two AND gates plus one inverter are needed to build the input logic, since the term QโยทQโ is reused by Kโ and Kโ.
Timing Sequence
| Clock pulse | Qโ | Qโ | Qโ | Qโ | Count |
|---|---|---|---|---|---|
| initial | 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 | 0 | 0 | 0 | 0 | 0 (recycles) |
Timing Diagram
Pulse 1 2 3 4 5 6 7 8 9 10 11 12
__ __ __ __ __ __ __ __ __ __ __ __
CLK _| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_
Q0 โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____โพโพโพโพโพ_____
Q1 _____โพโพโพโพโพโพโพโพโพโพ__________โพโพโพโพโพโพโพโพโพโพ__________โพโพโพโพโพโพโพโพโพโพ_____
Q2 _______________โพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพ_______________________
Q3 _______________________________________โพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพโพ_____
Qโ divides the clock by two, Qโ by four and Qโ by eight for as long as the count is below 8, while Qโ stays high through counts 8 to 11 and falls on the twelfth pulse. The Qโ waveform therefore has a period of twelve clock pulses, which confirms the modulus.
Conclusion
A parallel counter clocks all its flip-flops together, so its maximum speed is set by one flip-flop delay plus one gate delay rather than by the sum of the delays in the chain. The MOD-12 design above uses four JK flip-flops with $J_0 = K_0 = 1$, $J_1 = K_1 = Q_0$, $J_2 = \overline{Q_3}Q_1Q_0$, $K_2 = Q_1Q_0$, $J_3 = Q_2Q_1Q_0$ and $K_3 = Q_1Q_0$, which produces the repeating sequence 0 to 11 and returns to 0000 on the twelfth clock pulse.
asked 4xavg 5 marks ยท 2081, 2080, 2079, 2078Convert (257)โ into hexadecimal and decimal number system. [5]
AnswerHide
Convert (257)โ into hexadecimal and decimal number system. [5]
Convert (257)โ to Decimal and Hexadecimal
Given Data
- Number: $(257)_8$ (octal, base 8)
- Required: convert to hexadecimal (base 16) and decimal (base 10)
Part 1: Octal to Decimal
Multiply each digit by its positional weight (power of 8):
$$ (257)_8 = 2 \times 8^2 + 5 \times 8^1 + 7 \times 8^0 $$
$$ = 2 \times 64 + 5 \times 8 + 7 \times 1 $$
$$ = 128 + 40 + 7 = 175 $$
$$ \boxed{(257)8 = (175){10}} $$
Part 2: Octal to Hexadecimal (via Binary)
Step 1: Convert each octal digit to 3-bit binary
| Octal Digit | 3-bit Binary |
|---|---|
| 2 | 010 |
| 5 | 101 |
| 7 | 111 |
$$ (257)_8 = (010\ 101\ 111)_2 = (10101111)_2 $$
Step 2: Regroup binary into groups of 4 (from right)
$$ 10101111 \rightarrow 1010\ 1111 $$
(No padding needed here since 8 bits = two groups of 4.)
| 4-bit Group | Hexadecimal |
|---|---|
| 1010 | A |
| 1111 | F |
Answer
$$ \boxed{(257)8 = (AF){16}} $$
Verification (decimal check): $$ (AF){16} = 10 \times 16 + 15 = 160 + 15 = 175 = (175){10} \checkmark $$
Summary
| From | To | Result |
|---|---|---|
| $(257)_8$ | Decimal | $(175)_{10}$ |
| $(257)_8$ | Hexadecimal | $(AF)_{16}$ |
asked 4xavg 5 marks ยท 2081, 2079, 2078, 0Define multiplexer. Implement 8 ร 1 multiplexer using 2 ร 1 multiplexer. [1+4]
AnswerHide
Define multiplexer. Implement 8 ร 1 multiplexer using 2 ร 1 multiplexer. [1+4]
Multiplexer: Definition and Implementation
Definition of Multiplexer
A multiplexer (MUX) is a combinational circuit that selects one of many input lines and forwards it to a single output line based on select lines. It is also called a data selector.
- An n-input multiplexer has:
2^ndata input linesnselect lines1output line
Implementing 8ร1 MUX Using 2ร1 MUXes
Key Idea
- An 8ร1 MUX has: 8 data inputs (I0-I7), 3 select lines (S2, S1, S0), and 1 output
- A 2ร1 MUX has: 2 data inputs, 1 select line, 1 output
How Many 2ร1 MUXes Are Needed?
To build an 8ร1 MUX from 2ร1 MUXes:
| Stage | MUXes Required | Output Lines |
|---|---|---|
| Stage 1 (Level 1) | 4 ร (2ร1 MUX) | 4 outputs |
| Stage 2 (Level 2) | 2 ร (2ร1 MUX) | 2 outputs |
| Stage 3 (Level 3) | 1 ร (2ร1 MUX) | 1 output (final) |
Total = 4 + 2 + 1 = 7 two-input MUXes
Circuit Description
Data Inputs Stage 1 (S0) Stage 2 (S1) Stage 3 (S2)
----------- ------------ ------------ ------------
I0 โโ
โโ MUX1 โโโ
I1 โโ (S0) โ
โโ MUX5 โโโ
I2 โโ โ (S1) โ
โโ MUX2 โโโ โ
I3 โโ (S0) โโ MUX7 โโโโ Y (Output)
โ (S2)
I4 โโ โ
โโ MUX3 โโโ โ
I5 โโ (S0) โ โ
โโ MUX6 โโโ
I6 โโ โ (S1)
โโ MUX4 โโโ
I7 โโ (S0)
Operation (Truth Table of Selection)
| S2 | S1 | S0 | Selected Input |
|---|---|---|---|
| 0 | 0 | 0 | I0 |
| 0 | 0 | 1 | I1 |
| 0 | 1 | 0 | I2 |
| 0 | 1 | 1 | I3 |
| 1 | 0 | 0 | I4 |
| 1 | 0 | 1 | I5 |
| 1 | 1 | 0 | I6 |
| 1 | 1 | 1 | I7 |
Working Principle
-
Stage 1 (controlled by S0):
- MUX1 selects between I0 and I1
- MUX2 selects between I2 and I3
- MUX3 selects between I4 and I5
- MUX4 selects between I6 and I7
-
Stage 2 (controlled by S1):
- MUX5 selects between outputs of MUX1 and MUX2
- MUX6 selects between outputs of MUX3 and MUX4
-
Stage 3 (controlled by S2):
- MUX7 selects between outputs of MUX5 and MUX6 to give the final output Y
Summary
An 8ร1 MUX can be implemented using seven 2ร1 MUXes arranged in three stages, where each stage is controlled by one select line (S0, S1, S2 respectively), progressively narrowing 8 inputs down to 1 output.
asked 4xavg 5 marks ยท 2081.2, 2079, 2078, 2077Perform $A - B$ with the given binary numbers using 1โs complement. $A = 1010100$, $B = 1000100$. [5]
AnswerHide
Perform $A - B$ with the given binary numbers using 1โs complement. $A = 1010100$, $B = 1000100$. [5]
A โ B Using 1's Complement Method
Given
- $A = 1010100$
- $B = 1000100$
- Operation: $A - B$ using 1's complement
Decimal check of inputs:
- $A = 1010100_2 = 64+16+4 = 84$
- $B = 1000100_2 = 64+4 = 68$
Solution
Step 1: 1's Complement of B
Invert every bit of $B$:
B = 1000100
1's comp = 0111011
Step 2: Add A and 1's complement of B
1010100
+ 0111011
---------
10001111
Bit-by-bit (right to left):
- $0+1 = 1$
- $0+1 = 1$
- $1+0 = 1$
- $0+1 = 1$
- $1+1 = 0$, carry 1
- $0+1+1 = 0$, carry 1
- $1+0+1 = 0$, carry 1 (carry out)
Result = $1,0001111$ (a carry out of 1 is generated).
Step 3: End-around carry
Since a carry is produced, the result is positive. Add the carry back to the 7-bit sum:
0001111
+ 1
---------
0010000
Step 4: Final Result
$$A - B = 0010000_2$$
Verification
$$0010000_2 = 16_{10}, \quad 84 - 68 = 16 \checkmark$$
Conclusion
$$A - B = 0010000_2 = 16_{10}$$
asked 4xavg 4 marks ยท 2081.2, 2078, 0Explain the concept of decoder with an example. [5]
AnswerHide
Explain the concept of decoder with an example. [5]
A decoder is a combinational logic circuit that converts binary coded input into a set of outputs, where exactly one output is active (HIGH) for each unique combination of inputs. - It has n input lines and 2^n output lines - It "decodes" a binary code by activating the corresponding output line ...
asked 3xavg 7 marks ยท 2080, 2077, 0Write short notes on: (Any two) a.) ASCII Code b.)Logic micro operation c.) State table [5]
AnswerHide
Write short notes on: (Any two) a.) ASCII Code b.)Logic micro operation c.) State table [5]
--- ASCII stands for American Standard Code for Information Interchange. - It is a 7-bit character encoding standard used to represent text in computers and communication devices. - A 7-bit ASCII code can represent 2โท = 128 different characters. - These characters include: - Uppercase letters (A-...
asked 3xavg 5 marks ยท 2080, 2078, 2077What is forbidden state in SR flip flop? Convert SR to JK flip flop. [5]
AnswerHide
What is forbidden state in SR flip flop? Convert SR to JK flip flop. [5]
In an SR (Set-Reset) flip-flop, the inputs S and R must not be applied simultaneously as logic 1. When S = 1 and R = 1 at the same time, the output becomes indeterminate (unpredictable): both Q and Q' try to become 1 simultaneously, which is a logical contradiction. This condition S = 1, R = 1 is...
asked 3xavg 5 marks ยท 2079, 2078, 2077Define Half-subtractor with truth table and logic diagram. [5]
AnswerHide
Define Half-subtractor with truth table and logic diagram. [5]
A half-subtractor is a combinational logic circuit that performs subtraction of two single-bit binary numbers. It produces two outputs: the Difference (D) and the Borrow (B). - It subtracts the subtrahend (B) from the minuend (A) - It does not account for any borrow from a previous stage (hence "...
asked 3xavg 7 marks ยท 2081.2, 2081, 2079Explain JK flip flop with necessary diagram and truth table. [5]
AnswerHide
Explain JK flip flop with necessary diagram and truth table. [5]
A JK flip flop is an improved version of the SR flip flop that eliminates the invalid/indeterminate state. It has two inputs: J (Set) and K (Reset), along with a Clock input and outputs Q and Q'. --- Internal Gate Implementation: --- CLK J K Q(next) Operation ------------------------------- 0 X X...
asked 3xavg 7 marks ยท 2081.2, 2077, 0Express the Boolean Function F=AB+BโฒCF = AB + B'CF=AB+BโฒC to sum of max terms with required truth tables.List two uses of sum of max terms.[8+2]
AnswerHide
Express the Boolean Function F=AB+BโฒCF = AB + B'CF=AB+BโฒC to sum of max terms with required truth tables.List two uses of sum of max terms.[8+2]
Boolean Function F = AB + B'C: Sum of Maxterms
Given
- Boolean function: $F = AB + B'C$
- Variables: $A, B, C$ (3 variables, so $2^3 = 8$ combinations)
- Required: express as product (sum) of maxterms, with truth table; list two uses.
Solution
Truth Table
| Row | A | B | C | AB | B'C | F | Type |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | Mโ |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 | mโ |
| 2 | 0 | 1 | 0 | 0 | 0 | 0 | Mโ |
| 3 | 0 | 1 | 1 | 0 | 0 | 0 | Mโ |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | Mโ |
| 5 | 1 | 0 | 1 | 0 | 1 | 1 | mโ |
| 6 | 1 | 1 | 0 | 1 | 0 | 1 | mโ |
| 7 | 1 | 1 | 1 | 1 | 0 | 1 | mโ |
Check of B'C: when B=0, B'=1, so B'C = C. Rows 1 (C=1) and 5 (C=1) give 1. Rows where AB=1 are 6 and 7. All consistent.
Identifying Maxterms
Maxterms correspond to rows where F = 0: rows 0, 2, 3, 4.
Rule: variable appears uncomplemented if its bit = 0, complemented if its bit = 1.
| Row | A | B | C | Maxterm | Symbol |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | $(A+B+C)$ | Mโ |
| 2 | 0 | 1 | 0 | $(A+B'+C)$ | Mโ |
| 3 | 0 | 1 | 1 | $(A+B'+C')$ | Mโ |
| 4 | 1 | 0 | 0 | $(A'+B+C)$ | Mโ |
Product of Maxterms Form
$$F = \prod M(0, 2, 3, 4)$$
$$\boxed{F = (A+B+C)(A+B'+C)(A+B'+C')(A'+B+C)}$$
Verification
Minterms (F = 1) at rows 1, 5, 6, 7: $$F = \sum m(1,5,6,7)$$ The two sets ${0,2,3,4}$ and ${1,5,6,7}$ are complementary and together cover all 8 rows. Correct.
Two Uses of Sum (Product) of Maxterms
-
OR-AND (two-level) circuit implementation: The POS canonical form maps directly to an OR-AND gate structure, which is economical when there are fewer 0-outputs than 1-outputs.
-
Canonical/standard reference form: It provides a unique standardized representation of a function, useful as a starting point for minimization (K-map, Quine-McCluskey) and for comparing whether two Boolean expressions are equivalent.
asked 3xavg 5 marks ยท 2081.2, 2078, 2077Perform the following conversion:
(a) $(0.625)_{10}$ to binary.
(b) $(173)_8$ to decimal. [2.5+2.5]
AnswerHide
Perform the following conversion:
(a) $(0.625)_{10}$ to binary.
(b) $(173)_8$ to decimal. [2.5+2.5]
- (a) Convert $(0.625){10}$ to binary - (b) Convert $(173)8$ to decimal --- Method: Multiply the fractional part by 2 repeatedly, recording the integer part each time, reading top to bottom. Step Fraction ร 2 Result Bit ---------------------------------- 1 0.625 ร 2 1.250 1 2 0.250 ร 2 0.500 0 3 ...
asked 3xavg 5 marks ยท 2081.2, 2077, 0Simplify the Boolean Function $F$ in sum of products using the don't-care conditions $d$. $F = B'C'D' + BCD' + ABCD'$, $d = B'CD' + A'BC'D$. [5]
AnswerHide
Simplify the Boolean Function $F$ in sum of products using the don't-care conditions $d$. $F = B'C'D' + BCD' + ABCD'$, $d = B'CD' + A'BC'D$. [5]
Function (SOP): $$F = B'C'D' + BCD' + ABCD'$$ Don't-care conditions: $$d = B'CD' + A'BC'D$$ Variables: A, B, C, D (4 variables โ minterms 0 to 15) --- Order of bits: A B C D. - $B'C'D'$ โ B=0, C=0, D=0, A free โ A=0: 0000 = mโ, A=1: 1000 = mโ - $BCD'$ โ B=1, C=1, D=0, A free โ A=0: 0110 = mโ, A=1...
asked 2xavg 8 marks ยท 2081, 2079Define magnitude comparator?Design a 4-bit magnitude comparator circuit.[2+8]
AnswerHide
Define magnitude comparator?Design a 4-bit magnitude comparator circuit.[2+8]
Magnitude Comparator
Definition (2 marks)
A magnitude comparator is a combinational logic circuit that compares two binary numbers and determines their relative magnitudes. Given two n-bit numbers A and B, the comparator produces three output signals:
- A > B (output is HIGH when A is greater than B)
- A = B (output is HIGH when A equals B)
- A < B (output is HIGH when A is less than B)
Design of 4-bit Magnitude Comparator (8 marks)
Given
Two 4-bit numbers:
- A = AโAโAโAโ
- B = BโBโBโBโ
Step 1: Basic Bit Comparison
For each bit position i, define:
| Condition | Expression |
|---|---|
| Aแตข = Bแตข | xแตข = AแตขBแตข + ฤแตข Bฬแตข (XNOR) |
| Aแตข > Bแตข | AแตขBฬแตข |
| Aแตข < Bแตข | ฤแตขBแตข |
So define equality bits:
xโ = AโBโ + ฤโBฬโ
xโ = AโBโ + ฤโBฬโ
xโ = AโBโ + ฤโBฬโ
xโ = AโBโ + ฤโBฬโ
Step 2: Derive Output Expressions
Equality Output: (A = B)
All bit pairs must be equal:
(A = B) = xโ ยท xโ ยท xโ ยท xโ
Greater Than Output: (A > B)
A > B if the most significant differing bit of A is 1 and B is 0:
(A > B) = AโBฬโ
+ xโยทAโBฬโ
+ xโยทxโยทAโBฬโ
+ xโยทxโยทxโยทAโBฬโ
Less Than Output: (A < B)
A < B if the most significant differing bit of B is 1 and A is 0:
(A < B) = ฤโBโ
+ xโยทฤโBโ
+ xโยทxโยทฤโBโ
+ xโยทxโยทxโยทฤโBโ
Note: Alternatively, (A < B) = NOT(A > B) + NOT(A = B), i.e., (A < B) = (A > B)' ยท (A = B)'
Step 3: Logic Circuit Block Diagram
Aโ,Bโ โโโบ [XNOR]โโโบ xโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
Aโ,Bโ โโโบ [XNOR]โโโบ xโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ| AND โโโบ (A=B)
Aโ,Bโ โโโบ [XNOR]โโโบ xโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
Aโ,Bโ โโโบ [XNOR]โโโบ xโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
For (A > B):
AโBฬโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
xโยทAโBฬโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ| OR โโโบ (A>B)
xโยทxโยทAโBฬโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
xโยทxโยทxโยทAโBฬโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
For (A < B):
ฤโBโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
xโยทฤโBโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ| OR โโโบ (A<B)
xโยทxโยทฤโBโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
xโยทxโยทxโยทฤโBโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ|
Step 4: Verification Example
Let A = 1010 (10) and B = 0110 (6):
| Bit | A | B | xแตข |
|---|---|---|---|
| 3 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 |
| 0 | 0 | 0 | 1 |
- (A = B) = xโยทxโยทxโยทxโ = 0ยท0ยท1ยท1 = 0 โ
- (A > B) = AโBฬโ = 1ยท1 = 1 โ (since MSB of A is 1, MSB of B is 0)
- (A < B) = ฤโBโ = 0ยท0 = 0 โ
asked 2xavg 8 marks ยท 2080, 0Describe the clocked master-slave J-K flip-flop with its operation table. [5]
AnswerHide
Describe the clocked master-slave J-K flip-flop with its operation table. [5]
A Master-Slave J-K flip-flop is a cascaded combination of two clocked SR flip-flops (or J-K stages) connected in series, designed to eliminate the race-around condition (indeterminate state) that occurs in a simple clocked J-K flip-flop when J = K = 1. --- The master-slave J-K flip-flop consists ...
Keep studying
Study every one of these with model answers, flashcards, and MCQs.
Open BIT103 study modes