Skip to main content

Chapter 3

Digital Logic System

PU BCA past exam questions

Past questions and answers

78 questions set from this chapter, 8 of them more than once; 2 are most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 4 of 7 exams
  • Asked 4 times
  • 2025 Spring · 8 marks
  • 2024 Fall · 7 marks
  • 2024 Spring · 7 marks
  • 2023 Fall · 8 marks

What is flip flop? Explain about JK flip-flop with diagram.

Answer

Flip-flop. A flip-flop is a bistable sequential circuit. It has two stable states (0 and 1) and stores one bit of information. Its output depends on the present inputs and the previous state, and it changes state only when a clock pulse arrives. It is the basic memory element of registers and counters. Types are SR, JK, D and T.

JK flip-flop. The JK flip-flop removes the invalid condition of the SR flip-flop. Its inputs are JJ (set), KK (reset) and the clock CLKCLK. Its outputs are QQ and Q‾\overline{Q}.

Logic diagram (clocked SR latch built from NAND gates, with feedback from the outputs)

J ──────────[NAND1]──┐
Q' ─────────┘        [NAND3]──┬── Q
CLK ────────┘                 │ (cross-coupled)
CLK ────────┐                 │
Q ──────────[NAND2]──┐       [NAND4]── Q'
K ──────────┘        └───────┘

NAND1NAND_1 receives J,CLK,Q‾J, CLK, \overline{Q} and NAND2NAND_2 receives K,CLK,QK, CLK, Q. Their outputs feed the cross-coupled latch NAND3NAND_3, NAND4NAND_4.

Characteristic (truth) table

JJKKQn+1Q_{n+1}Operation
00QnQ_nNo change (hold)
010Reset
101Set
11Qn‾\overline{Q_n}Toggle

Characteristic equation

Qn+1=JQn‾+K‾QnQ_{n+1} = J\overline{Q_n} + \overline{K}Q_n

Operation

  • J=K=0J=K=0: both NAND gates output 1, so the latch holds its state.
  • J=0,K=1J=0,K=1: only NAND2NAND_2 is active when Q=1Q=1, so the flip-flop resets to Q=0Q=0.
  • J=1,K=0J=1,K=0: only NAND1NAND_1 is active when Q=0Q=0, so it sets to Q=1Q=1.
  • J=K=1J=K=1: the output toggles on each clock pulse. This is the feature that SR lacks.

Race-around condition. When J=K=1J=K=1 and the clock pulse is wider than the propagation delay, the output toggles repeatedly during one pulse. This is avoided by using a master-slave or edge-triggered JK flip-flop. Applications include counters, frequency dividers and shift registers.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 7 exams
  • Asked 3 times
  • 2025 Spring · 5 marks
  • 2024 Fall · 5 marks
  • 2024 Spring · 5 marks

Write short notes on: Don't Care Condition

Answer

Don't care condition. For some input combinations of a logic function, the output is not specified because those combinations never occur, or because the output has no effect on the system. Such conditions are called don't care conditions and are marked X (or d) in the truth table or K-map.

Use in simplification. Each X may be treated as 0 or 1, whichever helps to form larger groups in the K-map. This gives a simpler expression with fewer literals and gates. An X is included in a group only if it helps; it is never necessary to cover it.

Example. For F=Σ(1,3,5)+d(7)F = \Sigma(1,3,5) + d(7) with inputs A,B,CA,B,C, taking d(7)d(7) as 1 allows the group A,B,CA,B,C column with C=1C=1:

F=CF = C

Without the don't care, the best result would be A‾C+B‾C\overline{A}C + \overline{B}C.

Common applications. The unused codes in BCD (1010 to 1111), code converters such as BCD to excess-3, and seven-segment decoders.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2025 Spring · 8 marks
  • 2024 Fall · 7 marks

Simplify the given equation using K-map and implement using NOR gates only.
F=Σ(0,1,4,8,10,11,12)F = \Sigma(0,1,4,8,10,11,12) D=Σ(2,3,6,9,15)D = \Sigma(2,3,6,9,15)

Answer

Step 1: K-map (rows ABAB, columns CDCD; X = don't care)

AB\CDAB \backslash CD00011110
001 (m0)1 (m1)X (m3)X (m2)
011 (m4)0 (m5)0 (m7)X (m6)
111 (m12)0 (m13)X (m15)0 (m14)
101 (m8)X (m9)1 (m11)1 (m10)

Step 2: Grouping

  • Quad of m0, m1, m3, m2, m8, m9, m11, m10 (all cells with B=0B=0), using the don't cares m2, m3, m9. This gives B‾\overline{B}.
  • Quad of m0, m4, m12, m8 (column CD=00CD=00). This gives C‾ D‾\overline{C}\,\overline{D}.

All the 1s (0, 1, 4, 8, 10, 11, 12) are covered. The don't cares m6, m15 are left as 0.

F=B‾+C‾ D‾F = \overline{B} + \overline{C}\,\overline{D}

Step 3: NOR-only implementation

Using C‾ D‾=C+D‾\overline{C}\,\overline{D} = \overline{C + D}:

F=B‾+C+D‾F = \overline{B} + \overline{C+D}

An OR is a NOR followed by a NOR used as an inverter, so four 2-input NOR gates are enough:

  1. G1=NOR(B,B)=B‾G_1 = \text{NOR}(B,B) = \overline{B}
  2. G2=NOR(C,D)=C+D‾G_2 = \text{NOR}(C,D) = \overline{C+D}
  3. G3=NOR(G1,G2)=B‾+C+D‾‾G_3 = \text{NOR}(G_1,G_2) = \overline{\overline{B}+\overline{C+D}}
  4. G4=NOR(G3,G3)=B‾+C+D‾=FG_4 = \text{NOR}(G_3,G_3) = \overline{B} + \overline{C+D} = F
B ──[NOR]──┐
           [NOR]──[NOR as NOT]── F
C ──[NOR]──┘
D ──┘

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2025 Spring · 5 marks
  • 2024 Fall · 5 marks

Write short notes on: Status Register

Answer

Status register (flag register or condition code register). It is a register of the processor whose individual bits, called flags, record conditions produced by the most recent arithmetic or logic operation in the ALU. These flags are used by conditional branch instructions to decide the program flow.

Common flags (4-bit status register)

FlagNameSet (=1) when
CCarryThe operation produces a carry out of the most significant bit
SSignThe most significant bit of the result is 1 (negative)
ZZeroThe result is zero
VOverflowThe result of a signed operation exceeds the range

Working. After an ALU operation, the output carry, the sign bit, an 8-input NOR of the result bits (for zero) and the exclusive-OR of the last two carries (for overflow) are loaded into the flip-flops of the status register.

Uses. Conditional jumps (branch if zero, branch if carry), comparison of numbers, and checking for overflow in signed arithmetic. Larger processors add more flags such as parity, auxiliary carry, interrupt enable and trap.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2024 Fall · 8 marks
  • 2021 Fall · 7 marks

Implement a circuit for full adder using half adder and OR gate.

Answer

Half adder. It adds two bits xx and yy:

S=x⊕y,C=xyS = x\oplus y,\qquad C = xy

It is one XOR gate and one AND gate.

Full adder from two half adders and an OR gate

A full adder adds AA, BB and CinC_{in}:

S=A⊕B⊕Cin,Cout=AB+Cin(A⊕B)S = A\oplus B\oplus C_{in},\qquad C_{out} = AB + C_{in}(A\oplus B)

  1. Half adder 1 adds AA and BB: S1=A⊕BS_1 = A\oplus B, C1=ABC_1 = AB.
  2. Half adder 2 adds S1S_1 and CinC_{in}: S=S1⊕CinS = S_1\oplus C_{in}, C2=S1CinC_2 = S_1C_{in}.
  3. OR gate combines the two carries: Cout=C1+C2=AB+Cin(A⊕B)C_{out} = C_1 + C_2 = AB + C_{in}(A\oplus B).
A ──┐                  S1 ──┐
    [HA 1]── S1 ────────── [HA 2]── S (Sum)
B ──┘   └─ C1 ──┐   Cin ──┘   └─ C2 ──┐
                [   OR   ]────────────  Cout

Verification. For A=1,B=1,Cin=1A=1,B=1,C_{in}=1: S1=0S_1 = 0, C1=1C_1 = 1; S=0⊕1=1S = 0\oplus1 = 1, C2=0C_2 = 0; Cout=1+0=1C_{out} = 1+0 = 1. So 1+1+1=1121+1+1 = 11_2, which is correct. For A=1,B=0,Cin=1A=1,B=0,C_{in}=1: S1=1S_1=1, C1=0C_1=0, S=1⊕1=0S = 1\oplus1=0, C2=1C_2=1, Cout=1C_{out}=1, giving 10210_2, which is correct.

The carry equation matches the sum-of-products form AB+BCin+ACinAB+BC_{in}+AC_{in}, since Cin(A⊕B)+AB=ACin+BCin+ABC_{in}(A\oplus B)+AB = AC_{in}+BC_{in}+AB.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2024 Fall · 7 marks
  • 2021 Fall · 7 marks

Explain ALU with all operation.

Answer

ALU (Arithmetic Logic Unit). The ALU is the part of the CPU that performs all arithmetic and logic operations. It is a combinational circuit with two data inputs (AA, BB), function-select lines, a data output FF, and status outputs (flags).

 A ──┐                ┌──> F (result)
     [   ALU   ]──────┤
 B ──┘  ^            └──> Status flags (C, S, Z, V)
        |
 Function select (opcode)

Operations

  1. Arithmetic operations: addition (A+BA+B), subtraction (A−BA-B using 2's complement), increment (A+1A+1), decrement (A−1A-1), negation, and (in larger ALUs) multiplication and division.
  2. Logic operations: AND, OR, NOT (complement), XOR and NAND/NOR, done bit by bit on corresponding bits of AA and BB.
  3. Shift and rotate operations: logical shift left or right, arithmetic shift, rotate.
  4. Comparison: compare two numbers by subtracting them and checking the flags (zero, sign, carry), without storing the result.

Typical function table (select lines S1S0S_1S_0, mode MM)

MMS1S0S_1S_0Operation
000F=A+BF = A + B
001F=A−BF = A - B
010F=A+1F = A + 1
011F=A−1F = A - 1
100F=A⋅BF = A\cdot B (AND)
101F=A+BF = A+B (OR)
110F=A⊕BF = A\oplus B (XOR)
111F=A‾F = \overline{A} (NOT)

Structure. The arithmetic section uses full adders in a chain, with a MUX to pick BB, B‾\overline{B}, 0 or all 1s. The logic section uses an AND, OR, XOR and NOT gate on each bit with a MUX to pick one output. A final MUX controlled by the mode selects the arithmetic or logic result.

Status flags. Carry (C), Sign (S), Zero (Z) and Overflow (V) are set according to the result and stored in the status register.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2024 Spring · 8 marks
  • 2021 Fall · 8 marks

What is SR flipflop? Explain its operation with the help of logic circuit and truth table.

Answer

SR flip-flop. The SR (Set-Reset) flip-flop is the basic clocked flip-flop with two inputs, SS (set) and RR (reset), a clock input, and outputs QQ and Q‾\overline{Q}. It stores one bit.

Logic circuit (clocked, NAND based)

S ──┐
    [NAND1]──────┐
CLK ┤            [NAND3]──┬── Q
    [NAND2]──┐   │  ^     │
R ──┘        └── [NAND4]──┴── Q'

NAND1NAND_1 and NAND2NAND_2 gate SS and RR with the clock. Their outputs drive the cross-coupled NAND latch (NAND3NAND_3, NAND4NAND_4). When CLK=0CLK=0 the latch holds its value; when CLK=1CLK=1 the inputs S,RS,R act.

Truth (characteristic) table

SSRRQn+1Q_{n+1}Operation
00QnQ_nNo change (hold)
010Reset
101Set
11?Invalid (forbidden)

Operation

  • S=0,R=0S=0,R=0: both clocked gates output 1, so the latch keeps its previous state.
  • S=0,R=1S=0,R=1: the latch is reset, so Q=0Q=0 and Q‾=1\overline{Q}=1.
  • S=1,R=0S=1,R=0: the latch is set, so Q=1Q=1 and Q‾=0\overline{Q}=0.
  • S=1,R=1S=1,R=1: both outputs would be forced to the same value, and the final state after the clock returns to 0 is unpredictable. This combination must be avoided.

Characteristic equation

Qn+1=S+R‾Qn,with the constraint SR=0Q_{n+1} = S + \overline{R}Q_n,\quad\text{with the constraint } SR = 0

Limitation. The invalid condition S=R=1S=R=1 is removed in the JK flip-flop.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2024 Spring · 8 marks
  • 2023 Fall · 7 marks

Design a 4-bit ALU and explain its operation.

Answer

4-bit ALU design. A 4-bit ALU performs arithmetic and logic operations on two 4-bit operands A3A2A1A0A_3A_2A_1A_0 and B3B2B1B0B_3B_2B_1B_0 and produces a 4-bit result F3F2F1F0F_3F_2F_1F_0. It is built from four identical one-bit stages, each with an arithmetic section and a logic section, plus a mode select.

Arithmetic section. A full adder in each stage adds AiA_i to YiY_i and the carry. A 4:1 MUX chooses YiY_i from BiB_i, Bi‾\overline{B_i}, 0 or 1 using select lines S1S0S_1S_0. The first stage receives carry-in CinC_{in}; the carries ripple to CoutC_{out} of stage 3. The result is D=A+Y+CinD = A + Y + C_{in}.

S1S0S_1S_0YYCin=0C_{in}=0Cin=1C_{in}=1
00BBA+BA+BA+B+1A+B+1
01B‾\overline{B}A+B‾A+\overline{B}A−BA-B
100AAA+1A+1
11all 1sA−1A-1AA

Logic section. Each stage has AND, OR, XOR and NOT gates on AiA_i and BiB_i, feeding a 4:1 MUX selected by S1S0S_1S_0.

S1S0S_1S_0EiE_i
00AiBiA_i B_i (AND)
01Ai+BiA_i + B_i (OR)
10Ai⊕BiA_i\oplus B_i (XOR)
11Ai‾\overline{A_i} (NOT)

Complete stage. A mode line MM controls a 2:1 MUX at the output: Fi=DiF_i = D_i when M=0M=0 (arithmetic) and Fi=EiF_i = E_i when M=1M=1 (logic). So 3 control bits M,S1,S0M, S_1, S_0 (plus CinC_{in} for arithmetic) select among 8 logic/arithmetic basic functions, or 16 functions with CinC_{in}.

        S1 S0
         |
 A_i --> [Arithmetic: FA + Y-MUX] --D_i--\
 B_i -->                                   [2:1 MUX, M] --> F_i
 A_i --> [Logic: gates + MUX] ---E_i-----/

Operation example. With M=0M=0, S1S0=01S_1S_0=01, Cin=1C_{in}=1: F=A+B‾+1=A−BF = A + \overline{B} + 1 = A - B (2's complement subtraction). With M=1M=1, S1S0=00S_1S_0=00: F=A⋅BF = A\cdot B bit by bit. The carry-out and the result are used to set the status flags.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Implement A+BCA + BC using NOR and NAND gates.

Similar questions: XOR using NOR and NAND (2024 Fall)

Answer

(a) Using NAND gates only

Apply double complement and De Morgan's law:

A+BC=A+BC‾‾=A‾⋅BC‾‾A + BC = \overline{\overline{A + BC}} = \overline{\overline{A}\cdot\overline{BC}}

So the circuit needs three 2-input NAND gates:

  1. G1G_1: NAND with both inputs tied to AA, giving A‾\overline{A}.
  2. G2G_2: NAND of BB and CC, giving BC‾\overline{BC}.
  3. G3G_3: NAND of the outputs of G1G_1 and G2G_2, giving A‾⋅BC‾‾=A+BC\overline{\overline{A}\cdot\overline{BC}} = A + BC.
A ──┬──[NAND]── A' ──┐
    └──┘             [NAND]── F = A + BC
B ──[NAND]── (BC)' ──┘
C ──┘

(b) Using NOR gates only

Use the distributive law A+BC=(A+B)(A+C)A + BC = (A+B)(A+C) and De Morgan's law:

(A+B)(A+C)=(A+B)‾+(A+C)‾‾(A+B)(A+C) = \overline{\overline{(A+B)} + \overline{(A+C)}}

This needs three 2-input NOR gates:

  1. G1G_1: NOR of AA and BB, giving A+B‾\overline{A+B}.
  2. G2G_2: NOR of AA and CC, giving A+C‾\overline{A+C}.
  3. G3G_3: NOR of the outputs of G1G_1 and G2G_2, giving A+B‾+A+C‾‾=(A+B)(A+C)=A+BC\overline{\overline{A+B}+\overline{A+C}} = (A+B)(A+C) = A + BC.
A ──[NOR]── (A+B)' ──┐
B ──┘                 [NOR]── F = A + BC
A ──[NOR]── (A+C)' ──┘
C ──┘

Verification. For A=0,B=1,C=1A=0,B=1,C=1: F=0+1=1F = 0 + 1 = 1. In the NOR circuit, G1=0+1‾=0G_1=\overline{0+1}=0 and G2=0+1‾=0G_2=\overline{0+1}=0, so F=0+0‾=1F=\overline{0+0}=1. For A=0,B=1,C=0A=0,B=1,C=0: G1=0G_1=0, G2=0+0‾=1G_2=\overline{0+0}=1, so F=0+1‾=0F=\overline{0+1}=0, which agrees with A+BC=0A+BC=0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

What is combinational circuit? Design 2 4 2 1 to 8 4 -2 -1 code converter.

Similar questions: 8 4 -2 -1 to BCD converter (2024 Fall)

Answer

Combinational circuit. A combinational circuit is a logic circuit whose output depends only on the present values of its inputs, not on past inputs. It has no memory or feedback. It is built from gates, and examples are adders, multiplexers, decoders and code converters.

Design of the 2421 to 8 4 -2 -1 converter

Let the inputs be ABCDA B C D (2421 code) and the outputs WXYZW X Y Z (8 4 -2 -1 code). Input combinations 0101 to 1010 (m5 to m10) never occur in 2421, so they are don't cares.

DigitABCDABCD (2421)WXYZWXYZ (84-2-1)
000000000
100010111
200100110
300110101
401000100
510111011
611001010
711011001
811101000
911111111

K-map simplification (don't cares m5 to m10)

  • WW is 1 for m11 to m15, and the don't cares m8, m9, m10 let one group of the whole A=1A=1 half cover them: W=AW = A.
  • ZZ is 1 for m1, m3, m11, m13, m15, so Z=DZ = D.
  • YY follows C⊕DC \oplus D when A=0A=0 and the complement when A=1A=1, so Y=A⊕C⊕DY = A \oplus C \oplus D.
  • XX is 1 for m1, m2, m3, m4, m15. Using the don't cares, the groups are A‾D\overline{A}D (m1, m3, plus don't cares), A‾C\overline{A}C (m2, m3), A‾B\overline{A}B (m4) and the pair BCDBCD (m7 with m15).

W=A,X=A‾B+A‾C+A‾D+BCD,Y=A⊕C⊕D,Z=DW = A,\qquad X = \overline{A}B + \overline{A}C + \overline{A}D + BCD,\qquad Y = A \oplus C \oplus D,\qquad Z = D

Check. For digit 6, ABCD=1100ABCD=1100: W=1W=1; X=0+0+0+0=0X = 0+0+0+0 = 0; Y=1⊕0⊕0=1Y = 1\oplus0\oplus0 = 1; Z=0Z=0. This gives 1010, which is 6 in 8 4 -2 -1 code (8−2=68-2=6). For digit 9, ABCD=1111ABCD=1111: X=BCD=1X = BCD = 1, Y=1⊕1⊕1=1Y = 1\oplus1\oplus1 = 1, giving 1111, which is 8+4−2−1=98+4-2-1=9.

Implementation. Inputs AA and DD pass straight through to WW and ZZ. Two XOR gates give YY. Three AND gates, one 3-input AND and one OR give XX.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Define counter. Design 3-bit up counter using D-Flip Flop.

Similar questions: 3-bit up counter with S-R flip-flop (2024 Fall)

Answer

Counter. A counter is a sequential circuit made of flip-flops that goes through a prescribed sequence of states when clock pulses are applied. It is used to count pulses, divide frequency and generate timing. A nn-bit binary counter has 2n2^n states.

Design of a 3-bit synchronous up counter using D flip-flops (sequence 0 to 7, then back to 0)

For a D flip-flop, the next state equals the input: D=Q+D = Q^+.

Present Q2Q1Q0Q_2Q_1Q_0Next Q2+Q1+Q0+Q_2^+Q_1^+Q_0^+D2D_2D1D_1D0D_0
000001001
001010010
010011011
011100100
100101101
101110110
110111111
111000000

K-map simplification

  • D0=1D_0 = 1 for states 000, 010, 100, 110 (those with Q0=0Q_0=0), so D0=Q0‾D_0 = \overline{Q_0}.
  • D1=1D_1 = 1 for states 001, 010, 101, 110 (Q1≠Q0Q_1 \ne Q_0), so D1=Q1⊕Q0D_1 = Q_1 \oplus Q_0.
  • D2=1D_2 = 1 for states 011, 100, 101, 110, which gives D2=Q2Q1‾+Q2Q0‾+Q2‾Q1Q0=Q2⊕(Q1Q0)D_2 = Q_2\overline{Q_1} + Q_2\overline{Q_0} + \overline{Q_2}Q_1Q_0 = Q_2 \oplus (Q_1Q_0).

D0=Q0‾,D1=Q0⊕Q1,D2=Q2⊕(Q1Q0)D_0 = \overline{Q_0},\qquad D_1 = Q_0 \oplus Q_1,\qquad D_2 = Q_2 \oplus (Q_1Q_0)

Circuit. Three D flip-flops share a common clock. Q0Q_0 feeds back through a NOT gate to D0D_0. An XOR gate (inputs Q0,Q1Q_0, Q_1) feeds D1D_1. An AND gate (Q1Q0Q_1Q_0) and an XOR gate (with Q2Q_2) feed D2D_2. The outputs Q2Q1Q0Q_2Q_1Q_0 count 000, 001, ..., 111, 000, ... on successive clock pulses.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 8 marks

Implement X-OR gate using NOR and NAND gates.

Similar questions: A+BC with NOR and NAND (2025 Spring)

Answer

The XOR function is Y=A⊕B=AB‾+A‾BY = A\oplus B = A\overline{B} + \overline{A}B.

(a) Using NAND gates only (4 gates)

A⊕B=A⋅AB‾‾⋅B⋅AB‾‾‾A\oplus B = \overline{\overline{A\cdot\overline{AB}}\cdot\overline{B\cdot\overline{AB}}}

  1. G1=AB‾G_1 = \overline{AB}
  2. G2=A⋅G1‾=A AB‾‾=A‾+AB=A‾+BG_2 = \overline{A\cdot G_1} = \overline{A\,\overline{AB}} = \overline{A}+AB = \overline{A}+B
  3. G3=B⋅G1‾=B‾+AG_3 = \overline{B\cdot G_1} = \overline{B}+A
  4. G4=G2⋅G3‾=(A‾+B)(A+B‾)‾=AB‾+A‾BG_4 = \overline{G_2\cdot G_3} = \overline{(\overline{A}+B)(A+\overline{B})} = A\overline{B}+\overline{A}B

Simplified: (A‾+B)(A+B‾)=AB+A‾ B‾(\overline{A}+B)(A+\overline{B}) = AB + \overline{A}\,\overline{B}, whose complement is A⊕BA\oplus B.

A ─┬────────────[NAND2]──┐
   └─[NAND1]─┬───────────  [NAND4]── A⊕B
B ─┬─────────┘            │
   └────────────[NAND3]──┘

(b) Using NOR gates only (5 gates)

A⊕B=(A+B)⋅AB‾=A+B‾+AB‾A\oplus B = (A+B)\cdot\overline{AB} = \overline{\overline{A+B} + AB}

  1. G1=A+B‾G_1 = \overline{A+B} (NOR)
  2. G2=A+A‾=A‾G_2 = \overline{A+A} = \overline{A}, G3=B+B‾=B‾G_3 = \overline{B+B} = \overline{B} (NOR inverters)
  3. G4=G2+G3‾=ABG_4 = \overline{G_2+G_3} = AB (NOR)
  4. G5=G1+G4‾=A+B‾+AB‾=(A+B)AB‾=A⊕BG_5 = \overline{G_1+G_4} = \overline{\overline{A+B}+AB} = (A+B)\overline{AB} = A\oplus B

Check for A=1,B=1A=1,B=1: NAND version gives G1=0G_1=0, G2=1G_2=1, G3=1G_3=1, G4=1⋅1‾=0G_4=\overline{1\cdot1}=0. NOR version gives G1=0G_1=0, G4=1G_4=1, G5=0+1‾=0G_5=\overline{0+1}=0. Both are correct for XOR. For A=1,B=0A=1,B=0: NAND gives G1=1G_1=1, G2=1⋅1‾=0G_2=\overline{1\cdot1}=0, G3=1G_3=1, G4=1G_4=1.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 8 marks

What is combinational circuit? Design 8 4 -2 -1 to BCD code converter.

Similar questions: 2421 to 8 4 -2 -1 converter (2025 Spring)

Answer

Combinational circuit. A combinational circuit is a logic circuit whose outputs depend only on the present inputs, with no memory or feedback. Examples are adders, multiplexers, decoders and code converters.

Design of the 8 4 -2 -1 to BCD converter

Inputs ABCDABCD (8 4 -2 -1 code) and outputs wxyzwxyz (BCD). The combinations 0001, 0010, 0011, 1100, 1101, 1110 never occur and are don't cares.

DigitABCDABCDwxyzwxyz
000000000
101110001
201100010
301010011
401000100
510110101
610100110
710010111
810001000
911111001

K-map simplification

  • w=Σ(8,15)w = \Sigma(8,15) with don't cares 12, 13, 14: groups m12 to m15 give ABAB; m8 with m12 gives AC‾ D‾A\overline{C}\,\overline{D}. So w=AB+AC‾ D‾w = AB + A\overline{C}\,\overline{D}.
  • x=Σ(4,9,10,11)x = \Sigma(4,9,10,11): m1, m3, m9, m11 gives B‾D\overline{B}D; m2, m3, m10, m11 gives B‾C\overline{B}C; m4 with m12 gives BC‾ D‾B\overline{C}\,\overline{D}. So x=B‾C+B‾D+BC‾ D‾x = \overline{B}C + \overline{B}D + B\overline{C}\,\overline{D}.
  • y=Σ(5,6,9,10)y = \Sigma(5,6,9,10): m1, m5, m9, m13 gives C‾D\overline{C}D; m2, m6, m10, m14 gives CD‾C\overline{D}. So y=C⊕Dy = C\oplus D.
  • z=Σ(5,7,9,11,15)z = \Sigma(5,7,9,11,15) (the 1s of BCD): all have D=1D=1, so z=Dz = D.

w=AB+AC‾ D‾,x=B‾C+B‾D+BC‾ D‾,y=C⊕D,z=Dw = AB + A\overline{C}\,\overline{D},\quad x = \overline{B}C + \overline{B}D + B\overline{C}\,\overline{D},\quad y = C\oplus D,\quad z = D

Check. Digit 9, ABCD=1111ABCD=1111: w=AB=1w = AB = 1; x=0+0+0=0x = 0+0+0 = 0; y=0y = 0; z=1z = 1, giving 1001. Digit 5, ABCD=1011ABCD=1011: w=0w=0; x=B‾C=1x = \overline{B}C = 1; y=1⊕1=0y = 1\oplus1=0; z=1z=1, giving 0101.

Implementation. zz is a direct wire from DD, yy is one XOR gate, and ww and xx use AND-OR logic.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 8 marks

What is counter? Briefly explain 3-bit up counter using S-R Flip Flop.

Similar questions: 3-bit up counter with D flip-flop (2025 Spring)

Answer

Counter. A counter is a sequential circuit built from flip-flops that goes through a fixed sequence of states when clock pulses arrive. It counts pulses and is used for timing, frequency division and addressing.

3-bit synchronous up counter using SR flip-flops (count 000 to 111, then back to 000)

SR excitation table

Qn→Qn+1Q_n\to Q_{n+1}SSRR
0 to 00X
0 to 110
1 to 001
1 to 1X0

State table

Present Q2Q1Q0Q_2Q_1Q_0NextS2R2S_2R_2S1R1S_1R_1S0R0S_0R_0
0000010X0X10
0010100X1001
0100110XX010
011100100101
100101X00X10
101110X01001
110111X0X010
111000010101

Simplification by K-map

  • S0=1S_0 = 1 when Q0=0Q_0 = 0, so S0=Q0‾S_0 = \overline{Q_0}; R0=1R_0 = 1 when Q0=1Q_0=1, so R0=Q0R_0 = Q_0.
  • S1=1S_1 = 1 at 001 and 101, so S1=Q1‾Q0S_1 = \overline{Q_1}Q_0; R1=1R_1 = 1 at 011 and 111, so R1=Q1Q0R_1 = Q_1Q_0.
  • S2=1S_2 = 1 only at 011, so S2=Q2‾Q1Q0S_2 = \overline{Q_2}Q_1Q_0; R2=1R_2 = 1 only at 111, so R2=Q2Q1Q0R_2 = Q_2Q_1Q_0.

S0=Q0‾, R0=Q0;S1=Q1‾Q0, R1=Q1Q0;S2=Q2‾Q1Q0, R2=Q2Q1Q0S_0=\overline{Q_0},\ R_0=Q_0;\quad S_1=\overline{Q_1}Q_0,\ R_1=Q_1Q_0;\quad S_2=\overline{Q_2}Q_1Q_0,\ R_2=Q_2Q_1Q_0

In no state are SS and RR both 1, so the forbidden input never occurs.

Circuit. Three SR flip-flops share a clock. Q0Q_0 and Q0‾\overline{Q_0} drive R0R_0 and S0S_0 directly. Two-input AND gates give S1S_1 and R1R_1, and three-input AND gates give S2S_2 and R2R_2. The outputs count 0 to 7 and repeat.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 10 marks

Perform the following conversions:
(i) (56B)16=(?)10(56B)_{16} = (?)_{10} (ii) (324)8=(?)10(324)_8 = (?)_{10} (iii) (11010)gray=(?)2(11010)_{gray} = (?)_2 (iv) (9480)10=(?)2(9480)_{10} = (?)_2 (v) (110)2=(?)16(110)_2 = (?)_{16}

Similar questions: Number conversions (2023 Fall)

Answer

(i) (56B)16=(?)10(56B)_{16} = (?)_{10}

5⋅162+6⋅16+11=1280+96+11=13875\cdot16^2 + 6\cdot16 + 11 = 1280 + 96 + 11 = 1387

(56B)16=(1387)10(56B)_{16} = (1387)_{10}

(ii) (324)8=(?)10(324)_8 = (?)_{10}

3⋅64+2⋅8+4=192+16+4=2123\cdot64 + 2\cdot8 + 4 = 192 + 16 + 4 = 212

(324)8=(212)10(324)_8 = (212)_{10}

(iii) (11010)Gray=(?)2(11010)_{Gray} = (?)_2

The MSB is copied; each following binary bit is the previous binary bit XOR the next Gray bit.

  • b1=1b_1 = 1
  • b2=1⊕1=0b_2 = 1\oplus1 = 0
  • b3=0⊕0=0b_3 = 0\oplus0 = 0
  • b4=0⊕1=1b_4 = 0\oplus1 = 1
  • b5=1⊕0=1b_5 = 1\oplus0 = 1

(11010)Gray=(10011)2(11010)_{Gray} = (10011)_2

(iv) (9480)10=(?)2(9480)_{10} = (?)_2

9480=8192+1024+256+8=213+210+28+239480 = 8192 + 1024 + 256 + 8 = 2^{13} + 2^{10} + 2^{8} + 2^{3}.

Division method (remainders from the last upward): 9480/2=47409480/2 = 4740 r 0; 4740/2=23704740/2 = 2370 r 0; 2370/2=11852370/2 = 1185 r 0; 1185/2=5921185/2 = 592 r 1; 592/2=296592/2 = 296 r 0; 296/2=148296/2 = 148 r 0; 148/2=74148/2 = 74 r 0; 74/2=3774/2 = 37 r 0; 37/2=1837/2 = 18 r 1; 18/2=918/2 = 9 r 0; 9/2=49/2 = 4 r 1; 4/2=24/2 = 2 r 0; 2/2=12/2 = 1 r 0; 1/2=01/2 = 0 r 1.

(9480)10=(10010100001000)2(9480)_{10} = (10010100001000)_2

(v) (110)2=(?)16(110)_2 = (?)_{16}

Pad to 4 bits: 0110=60110 = 6.

(110)2=(6)16(110)_2 = (6)_{16}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 8 marks

Perform the following conversions:
(i) (E1B.AC5)16=(?)8(E1B.AC5)_{16} = (?)_8 (ii) (237)8=(?)2(237)_8 = (?)_2 (iii) (100110101)grey=(?)2(100110101)_{grey} = (?)_2 (iv) (1110)2=(?)10(1110)_2 = (?)_{10}

Similar questions: Number conversions (2024 Spring)

Answer

(i) (E1B.AC5)16=(?)8(E1B.AC5)_{16} = (?)_8

Hex to binary: E=1110E=1110, 1=00011=0001, B=1011B=1011 . A=1010A=1010, C=1100C=1100, 5=01015=0101.

1110 0001 1011.1010 1100 01011110\ 0001\ 1011 . 1010\ 1100\ 0101

Regroup in 3 bits from the point: integer part 111 000 011 011111\ 000\ 011\ 011 gives 7,0,3,37,0,3,3; fraction part 101 011 000 101101\ 011\ 000\ 101 gives 5,3,0,55,3,0,5.

(E1B.AC5)16=(7033.5305)8(E1B.AC5)_{16} = (7033.5305)_8

(ii) (237)8=(?)2(237)_8 = (?)_2

Replace each octal digit by 3 bits: 2=0102=010, 3=0113=011, 7=1117=111.

(237)8=(010011111)2=(10011111)2(237)_8 = (010011111)_2 = (10011111)_2

(iii) (100110101)Gray=(?)2(100110101)_{Gray} = (?)_2

Copy the MSB; then bi=bi−1⊕gib_i = b_{i-1}\oplus g_i.

  • b1=1b_1 = 1
  • b2=1⊕0=1b_2 = 1\oplus0 = 1
  • b3=1⊕0=1b_3 = 1\oplus0 = 1
  • b4=1⊕1=0b_4 = 1\oplus1 = 0
  • b5=0⊕1=1b_5 = 0\oplus1 = 1
  • b6=1⊕0=1b_6 = 1\oplus0 = 1
  • b7=1⊕1=0b_7 = 1\oplus1 = 0
  • b8=0⊕0=0b_8 = 0\oplus0 = 0
  • b9=0⊕1=1b_9 = 0\oplus1 = 1

(100110101)Gray=(111011001)2(100110101)_{Gray} = (111011001)_2

(iv) (1110)2=(?)10(1110)_2 = (?)_{10}

1⋅8+1⋅4+1⋅2+0⋅1=141\cdot8 + 1\cdot4 + 1\cdot2 + 0\cdot1 = 14

(1110)2=(14)10(1110)_2 = (14)_{10}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 8 marks

Design 3-bit up/down asynchronous counter.

Similar questions: 3-bit up/down counter (2021 Fall)

Answer

An asynchronous (ripple) counter applies the clock only to the first flip-flop; each later flip-flop is clocked by the output of the previous one. A 3-bit up/down counter counts 0→70\to7 in up mode and 7→07\to0 in down mode, selected by a control input MM.

Basic idea. Use three JK flip-flops with J=K=1J=K=1 (so each toggles on a clock edge), triggered on the falling (negative) edge.

  • Up counting: each flip-flop is clocked from the QQ output of the previous one. Q0Q_0 toggling from 1 to 0 gives a clock edge to the next stage.
  • Down counting: each flip-flop is clocked from the Q‾\overline{Q} output of the previous one.

Mode selection. A control input MM is used (M=1M=1 up, M=0M=0 down), and the clock of each stage is

CLK1=M Q0+M‾ Q0‾,CLK2=M Q1+M‾ Q1‾CLK_1 = M\,Q_0 + \overline{M}\,\overline{Q_0},\qquad CLK_2 = M\,Q_1 + \overline{M}\,\overline{Q_1}

CLK0CLK_0 is the external clock. These are implemented with two AND gates and an OR gate (a 2-to-1 multiplexer) between successive stages.

Count sequence

Up (M=1M=1) Q2Q1Q0Q_2Q_1Q_0Down (M=0M=0) Q2Q1Q0Q_2Q_1Q_0
000111
001110
010101
011100
100011
101010
110001
111000
000111

Circuit

  1. Three JK flip-flops FF0,FF1,FF2FF_0,FF_1,FF_2 with J=K=1J=K=1, falling-edge triggered.
  2. External clock to FF0FF_0.
  3. Multiplexer logic as above in front of CLK1CLK_1 and CLK2CLK_2.
  4. Outputs Q2Q1Q0Q_2Q_1Q_0.

Limitation. The propagation delay accumulates through the stages, so the counter is slower than a synchronous counter and can show brief false states.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 8 marks

Design 3-bit UP/Down Counter.

Similar questions: 3-bit up/down asynchronous counter (2021 Spring)

Answer

A 3-bit synchronous up/down counter counts 0→70\to7 when the control input M=1M=1 (up) and 7→07\to0 when M=0M=0 (down). The same clock is applied to all three flip-flops.

Using T-type behaviour (JK flip-flops with J=K=TJ=K=T): a flip-flop must toggle when

  • counting up: all lower bits are 1,
  • counting down: all lower bits are 0.

T0=1T_0 = 1 T1=M Q0+M′ Q0′T_1 = M\,Q_0 + M'\,Q_0' T2=M Q1Q0+M′ Q1′Q0′T_2 = M\,Q_1Q_0 + M'\,Q_1'Q_0'

Design (JK flip-flops)

J0=K0=1J_0 = K_0 = 1 J1=K1=MQ0+M′Q0′J_1 = K_1 = M Q_0 + M' Q_0' J2=K2=MQ1Q0+M′Q1′Q0′J_2 = K_2 = M Q_1 Q_0 + M' Q_1' Q_0'

State table (excerpt)

MMPresent Q2Q1Q0Q_2Q_1Q_0Next Q2Q1Q0Q_2Q_1Q_0Flip-flops that toggle
1000001Q0Q_0
1001010Q1,Q0Q_1,Q_0
1011100Q2,Q1,Q0Q_2,Q_1,Q_0
1111000Q2,Q1,Q0Q_2,Q_1,Q_0
0000111Q2,Q1,Q0Q_2,Q_1,Q_0
0100011Q2,Q1,Q0Q_2,Q_1,Q_0
0011010Q0Q_0
0001000Q0Q_0

Circuit

  1. Three JK flip-flops with a common clock.
  2. J0=K0=1J_0=K_0=1.
  3. For FF1FF_1: an XNOR (or AND-OR) circuit of MM and Q0Q_0 gives J1=K1J_1=K_1.
  4. For FF2FF_2: two AND gates MQ1Q0MQ_1Q_0 and M′Q1′Q0′M'Q_1'Q_0' with an OR gate give J2=K2J_2=K_2.

Check. Up, state 011011: J1=Q0=1J_1 = Q_0 = 1, J2=Q1Q0=1J_2 = Q_1Q_0 = 1, so all three toggle and the next state is 100100. Down, state 100100: J1=Q0′=1J_1=Q_0'=1 and J2=Q1′Q0′=1J_2=Q_1'Q_0'=1, so all three toggle, giving 011011.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

In modern day of communication why digital systems are preferred over analog system.

Answer

In modern communication, digital systems are preferred over analog systems for the following reasons.

  1. Noise immunity: A digital signal has only two levels (0 and 1), so a receiver can recover the original even with some noise; analog signals pick up noise that cannot be separated.
  2. Error detection and correction: Techniques such as parity, CRC and Hamming codes can detect and correct errors.
  3. Regeneration: Digital signals can be regenerated by repeaters with no accumulating noise over long distances, whereas amplification of analog also amplifies noise.
  4. Easy storage and processing: Data can be stored in memory and processed by computers and DSP, and compressed.
  5. Security: Encryption is simple, ensuring secure communication.
  6. Multiplexing and integration: Voice, data and video can be combined and transmitted over the same network (time-division multiplexing).
  7. Cost and size: Digital ICs are cheaper, smaller, more reliable and consume less power. They have higher accuracy and are easy to design with Boolean logic.
  8. Quality and flexibility: Faithful copies without degradation, and easy upgrade by software.

The drawback is the larger bandwidth needed and quantisation error, but the advantages outweigh these.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Perform the following conversion:
(i) (AB5.9C)16=( )8(AB5.9C)_{16} = (\ )_8 (ii) (4623)7=( )4(4623)_7 = (\ )_4 (iii) (101101)Gray=( )2(101101)_{Gray} = (\ )_2 (iv) (4356)10=( )2421(4356)_{10} = (\ )_{2421}

Answer

(i) (AB5.9C)16=( )8(AB5.9C)_{16} = (\ )_8

Convert each hex digit to 4 bits: A = 1010, B = 1011, 5 = 0101, 9 = 1001, C = 1100.

AB5.9C16=1010 1011 0101 . 1001 11002AB5.9C_{16} = 1010\,1011\,0101\,.\,1001\,1100_2

Group in 3 bits from the radix point: integer part 101 010 110 101101\,010\,110\,101 = 5 2 6 5; fractional part 100 111 00→100 111 000100\,111\,00\rightarrow 100\,111\,000 = 4 7 0.

(AB5.9C)16=(5265.47)8(AB5.9C)_{16} = (5265.47)_8

(ii) (4623)7=( )4(4623)_7 = (\ )_4

To decimal: 4×343+6×49+2×7+3=1372+294+14+3=16834\times343 + 6\times49 + 2\times7 + 3 = 1372+294+14+3 = 1683.

Divide by 4 repeatedly: 1683 = 420 r 3; 420 = 105 r 0; 105 = 26 r 1; 26 = 6 r 2; 6 = 1 r 2; 1 = 0 r 1.

Reading remainders upward:

(4623)7=(122103)4(4623)_7 = (122103)_4

Check: 1024+2(256)+2(64)+1(16)+0+3=16831024+2(256)+2(64)+1(16)+0+3 = 1683.

(iii) (101101)Gray=( )2(101101)_{Gray} = (\ )_2

MSB is copied: b1=1b_1 = 1. Next, bi=bi−1⊕gib_i = b_{i-1} \oplus g_i: b2=1⊕0=1b_2 = 1\oplus0 = 1, b3=1⊕1=0b_3 = 1\oplus1 = 0, b4=0⊕1=1b_4 = 0\oplus1 = 1, b5=1⊕0=1b_5 = 1\oplus0 = 1, b6=1⊕1=0b_6 = 1\oplus1 = 0.

(101101)Gray=(110110)2(101101)_{Gray} = (110110)_2

(iv) (4356)10=( )2421(4356)_{10} = (\ )_{2421}

Code each decimal digit in 2421: 4 = 0100, 3 = 0011, 5 = 1011, 6 = 1100.

(4356)10=(0100 0011 1011 1100)2421(4356)_{10} = (0100\,0011\,1011\,1100)_{2421}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Deduce the given expression in minimum literals using Boolean algebra and derive the truth table and implement in NAND logic.
A+B[AC+D{AC+(B+C′)D}]A + B[AC + D\{AC + (B + C')D\}]

Answer

Simplification

F=A+B[AC+D{AC+(B+C′)D}]F = A + B[AC + D\{AC + (B + C')D\}]

Inside the braces: D{AC+(B+C′)D}=ACD+(B+C′)D=D(AC+B+C′)D\{AC + (B+C')D\} = ACD + (B+C')D = D(AC + B + C').

Since AC+C′=A+C′AC + C' = A + C' (absorption form x+x′y=x+yx + x'y = x + y), this is D(A+B+C′)D(A + B + C').

So the bracket becomes AC+D(A+B+C′)=AC+AD+BD+C′D.AC + D(A+B+C') = AC + AD + BD + C'D.

Multiply by BB: B⋅AC+ABD+BD+BC′D=ABC+BD(A+1+C′)=ABC+BD.B\cdot AC + ABD + BD + BC'D = ABC + BD(A + 1 + C') = ABC + BD.

Then F=A+ABC+BD=A(1+BC)+BD=A+BD.F = A + ABC + BD = A(1+BC) + BD = A + BD.

Minimum expression: F=A+BDF = A + BD (3 literals; CC does not matter).

Truth table (C is a don't-care, so it is shown for A,B,DA,B,D)

ABDBDF = A + BD
00000
00100
01000
01111
10001
10101
11001
11111

NAND implementation

Using double complement and De Morgan: F=A+BD=A‾⋅BD‾‾=A‾⋅(B NAND D)‾F = A + BD = \overline{\overline{A}\cdot\overline{BD}} = \overline{\overline{A}\cdot(B\,\text{NAND}\,D)}

  • Gate 1: A′=NAND(A,A)A' = \text{NAND}(A,A)
  • Gate 2: X=NAND(B,D)=(BD)′X = \text{NAND}(B,D) = (BD)'
  • Gate 3: F=NAND(A′,X)=A+BDF = \text{NAND}(A', X) = A + BD

Total: 3 two-input NAND gates.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Design full adder with proper truth table and K-map.

Answer

A full adder adds three 1-bit inputs: AA, BB and the carry-in CinC_{in}. It produces a Sum SS and a Carry-out CoutC_{out}.

Truth table

AABBCinC_{in}SSCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111

S=Σ(1,2,4,7)S = \Sigma(1,2,4,7) and Cout=Σ(3,5,6,7)C_{out} = \Sigma(3,5,6,7).

K-map for Sum (rows AA, columns BCinBC_{in} in Gray order 00, 01, 11, 10)

A\BCinA \backslash BC_{in}00011110
00101
11010

The 1s form a checkerboard, so no two are adjacent and no grouping is possible:

S=A‾ B‾Cin+A‾BCin‾+AB‾ Cin‾+ABCin=A⊕B⊕CinS = \overline{A}\,\overline{B}C_{in} + \overline{A}B\overline{C_{in}} + A\overline{B}\,\overline{C_{in}} + ABC_{in} = A \oplus B \oplus C_{in}

K-map for Carry

A\BCinA \backslash BC_{in}00011110
00010
10111

Three pairs: m3 with m7 gives BCinBC_{in}; m5 with m7 gives ACinAC_{in}; m6 with m7 gives ABAB.

Cout=AB+BCin+ACin=AB+Cin(A⊕B)C_{out} = AB + BC_{in} + AC_{in} = AB + C_{in}(A \oplus B)

Circuit. Two XOR gates give SS (A⊕BA\oplus B, then XOR with CinC_{in}). Two AND gates and one OR gate give CoutC_{out}, either as AB+BCin+ACinAB + BC_{in} + AC_{in} or as AB+Cin(A⊕B)AB + C_{in}(A\oplus B).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Convert excess-3 code to BCD code.

Answer

Excess-3 code is the BCD digit plus 3. To convert back, subtract 3 from the code. Let the inputs be ABCDABCD (excess-3) and the outputs wxyzwxyz (BCD). Combinations 0000, 0001, 0010, 1101, 1110, 1111 do not occur, so they are don't cares (X).

DigitExcess-3 ABCDABCDBCD wxyzwxyz
000110000
101000001
201010010
301100011
401110100
510000101
610010110
710100111
810111000
911001001

K-map simplification (don't cares m0, m1, m2, m13, m14, m15)

  • w=Σ(11,12)w = \Sigma(11,12): group m12, m13, m14, m15 gives ABAB, and m11 with m15 gives ACDACD. So w=AB+ACDw = AB + ACD.
  • x=Σ(7,8,9,10)x = \Sigma(7,8,9,10): group m0, m1, m8, m9 gives B‾ C‾\overline{B}\,\overline{C}; group m0, m2, m8, m10 gives B‾ D‾\overline{B}\,\overline{D}; m7 with m15 gives BCDBCD. So x=B‾ C‾+B‾ D‾+BCDx = \overline{B}\,\overline{C} + \overline{B}\,\overline{D} + BCD.
  • y=Σ(5,6,9,10)y = \Sigma(5,6,9,10): the 1s sit at C≠DC \ne D, so y=C‾D+CD‾=C⊕Dy = \overline{C}D + C\overline{D} = C \oplus D.
  • z=Σ(4,6,8,10,12)z = \Sigma(4,6,8,10,12): all 1s have D=0D=0, so z=D‾z = \overline{D}.

w=AB+ACD,x=B‾ C‾+B‾ D‾+BCD,y=C⊕D,z=D‾w = AB + ACD,\quad x = \overline{B}\,\overline{C} + \overline{B}\,\overline{D} + BCD,\quad y = C\oplus D,\quad z = \overline{D}

Check. Excess-3 for 7 is ABCD=1010ABCD=1010. Then w=AB+ACD=0w = AB + ACD = 0; x=B‾ D‾=1x = \overline{B}\,\overline{D} = 1; y=C⊕D=1y = C\oplus D = 1; z=D‾=1z = \overline{D} = 1. This gives wxyz=0111wxyz = 0111, which is 7.

Implementation. One NOT gate for zz, one XOR for yy, and AND-OR logic for ww and xx.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Define multiplexer. Design 8:1 multiplexer.

Answer

Multiplexer (MUX). A multiplexer is a combinational circuit with 2n2^n data inputs, nn select lines and a single output. It passes one selected input to the output, so it works as a digital data selector. It is also called a many-to-one switch.

Design of an 8:1 multiplexer

An 8:1 MUX has 8 data inputs I0…I7I_0 \ldots I_7, 3 select lines S2S1S0S_2 S_1 S_0 and one output YY.

S2S_2S1S_1S0S_0YY
000I0I_0
001I1I_1
010I2I_2
011I3I_3
100I4I_4
101I5I_5
110I6I_6
111I7I_7

Boolean expression

Y=S2‾ S1‾ S0‾I0+S2‾ S1‾S0I1+S2‾S1S0‾I2+S2‾S1S0I3+S2S1‾ S0‾I4+S2S1‾S0I5+S2S1S0‾I6+S2S1S0I7Y = \overline{S_2}\,\overline{S_1}\,\overline{S_0}I_0 + \overline{S_2}\,\overline{S_1}S_0I_1 + \overline{S_2}S_1\overline{S_0}I_2 + \overline{S_2}S_1S_0I_3 + S_2\overline{S_1}\,\overline{S_0}I_4 + S_2\overline{S_1}S_0I_5 + S_2S_1\overline{S_0}I_6 + S_2S_1S_0I_7

Circuit. The circuit has:

  • three NOT gates to produce S2‾,S1‾,S0‾\overline{S_2}, \overline{S_1}, \overline{S_0}
  • eight 4-input AND gates, each taking one data input and one combination of select lines (a 3-to-8 decoder merged with the data inputs)
  • one 8-input OR gate that gives YY
I0 ─[AND]┐
I1 ─[AND]┤
 ...     ├─[8-input OR]── Y
I7 ─[AND]┘
  ^ each AND is also fed by a decoded combination of S2 S1 S0

Alternative. An 8:1 MUX can be built from two 4:1 MUXes (selected by S1S0S_1S_0) and one 2:1 MUX (selected by S2S_2) that picks between their outputs.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Draw a 4 bit PISO shift register and explain the operation along the timing waveform with the 1101 data load in input.

Answer

PISO (Parallel-In Serial-Out) register. The register loads all four bits at once through parallel inputs and shifts them out one bit at a time through a single output.

Circuit. It consists of four D flip-flops FF3…FF0FF_3 \ldots FF_0 with a common clock. A control line SHIFT/LOAD‾SHIFT/\overline{LOAD} drives a 2:1 selector at the input of each flip-flop (built from AND-OR gates).

          D3        D2        D1        D0     (parallel inputs)
           |         |         |         |
   0 -->[MUX]    [MUX]<--Q3  [MUX]<--Q2  [MUX]<--Q1
           |         |         |         |
        [FF3]---->[FF2]---->[FF1]---->[FF0]---> Serial out (Q0)
           ^         ^         ^         ^
          CLK ------ common clock to all flip-flops
 Each MUX: SHIFT/LOAD' = 0 selects the parallel bit, 1 selects the previous Q

Operation with data 1101 (D3D2D1D0=1101D_3D_2D_1D_0 = 1101)

  1. Load mode (SHIFT/LOAD‾=0SHIFT/\overline{LOAD}=0): on a clock pulse the data enters in parallel, so Q3Q2Q1Q0=1101Q_3Q_2Q_1Q_0 = 1101. The serial output is Q0=1Q_0 = 1.
  2. Shift mode (SHIFT/LOAD‾=1SHIFT/\overline{LOAD}=1): each clock pulse moves the contents one place to the right and shifts a 0 into Q3Q_3.
Clock pulseQ3Q2Q1Q0Q_3Q_2Q_1Q_0Serial out Q0Q_0
Load11011
101100
200111
300011
400000

The serial output stream is therefore 1, 0, 1, 1 (the first bit is D0=1D_0=1, then D1=0D_1=0, D2=1D_2=1, D3=1D_3=1). It is read in the sequence 1 0 1 1 over the first four clock cycles after loading.

Timing waveform. The clock is a continuous pulse train. Q0Q_0 is 1 after loading, goes low at the first shift, high at the second and third, then low. Q1Q_1, Q2Q_2, Q3Q_3 show the same pattern delayed by one clock each. The 1101 pattern appears bit by bit at the output, and after four shifts the register is empty.

Total time to send 4 bits is 4 clock periods, against one period for a parallel transfer.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Design 4 bit of arithmetic and logic operation with the necessary circuit and logic table.

Answer

A 4-bit arithmetic-logic circuit has four identical stages, one for each bit. It performs arithmetic operations on A3A2A1A0A_3A_2A_1A_0 and B3B2B1B0B_3B_2B_1B_0 and also logic operations, selected by control lines.

Arithmetic circuit. Each stage is a full adder. Its inputs are AiA_i, a modified YiY_i and the carry. A 4:1 multiplexer on each BiB_i line, controlled by S1S0S_1S_0, chooses YiY_i from BiB_i, Bi‾\overline{B_i}, 0 or 1. The input carry CinC_{in} goes to the first stage. Output D=A+Y+CinD = A + Y + C_{in}.

S1S_1S0S_0YYCin=0C_{in}=0Cin=1C_{in}=1
00BBD=A+BD=A+B (add)D=A+B+1D=A+B+1
01B‾\overline{B}D=A+B‾D=A+\overline{B}D=A−BD=A-B (subtract)
100D=AD=A (transfer)D=A+1D=A+1 (increment)
11all 1sD=A−1D=A-1 (decrement)D=AD=A (transfer)

(All-1s equals −1-1 in 2's complement, so A+(−1)+1=AA + (-1) + 1 = A.)

Logic circuit. For each bit, a 4:1 MUX with select lines S1S0S_1S_0 chooses among four gates fed by AiA_i and BiB_i:

S1S_1S0S_0Output EiE_iOperation
00Ai⋅BiA_i \cdot B_iAND
01Ai+BiA_i + B_iOR
10Ai⊕BiA_i \oplus B_iXOR
11Ai‾\overline{A_i}NOT

Combining. A mode select MM drives a final 2:1 MUX per bit: M=0M=0 outputs the arithmetic result DiD_i and M=1M=1 outputs the logic result EiE_i. The carry-out CoutC_{out} of the last adder stage is the arithmetic status flag.

A_i B_i --> [Arithmetic stage: FA + Y-select] --D_i--\
                                                      [2:1 MUX, M] --> F_i
A_i B_i --> [Logic stage: AND/OR/XOR/NOT MUX] --E_i--/

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 5 marks

Write short notes on: Universal Gate

Answer

Universal gate. A universal gate is a gate from which every other basic gate (NOT, AND, OR) and hence any Boolean function can be built. NAND and NOR are universal gates.

Using NAND

  • NOT: A⋅A‾=A‾\overline{A\cdot A} = \overline{A}
  • AND: A⋅B=A⋅B‾‾A\cdot B = \overline{\overline{A\cdot B}} (a NAND followed by a NAND inverter)
  • OR: A+B=A‾⋅B‾‾A + B = \overline{\overline{A}\cdot\overline{B}} (invert both inputs, then NAND)

Using NOR

  • NOT: A+A‾=A‾\overline{A+A} = \overline{A}
  • OR: A+B=A+B‾‾A+B = \overline{\overline{A+B}}
  • AND: A⋅B=A‾+B‾‾A\cdot B = \overline{\overline{A}+\overline{B}}

Why they are important. Using only one gate type reduces the number of IC types needed, makes fabrication cheaper and simpler, and lets whole circuits be designed in NAND-NAND or NOR-NOR form.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 8 marks

Explain the Digital Computer System. Write the advantage of Digital System over the Analog System.

Answer

Digital computer system. A digital computer is an electronic machine that processes data represented as discrete binary values (0 and 1). It accepts data and instructions, stores them, processes them according to a stored program and gives results. The data is represented by two voltage levels (for example 0 V and 5 V).

Main units

Input unit --> [ CPU: ALU + Control unit + Registers ] --> Output unit
                         ^        |
                         |        v
                       Memory (primary / secondary)
  • Input unit: keyboard, mouse, scanner; converts data into binary.
  • Memory unit: holds data and programs. Primary memory (RAM, ROM) is fast; secondary memory (disk) is large and permanent.
  • ALU: performs arithmetic and logic operations.
  • Control unit: fetches, decodes and executes instructions and coordinates all units.
  • Output unit: monitor, printer; converts binary results to human form.

Advantages of digital systems over analog systems

  1. Noise immunity: only two levels exist, so small noise does not change the value. Analog signals are distorted by noise.
  2. Accuracy and precision: more bits give higher precision; analog accuracy is limited by component tolerances.
  3. Easy storage: data can be stored for long periods in memory without degradation.
  4. Programmability: behaviour can be changed by software without changing the hardware.
  5. Error detection and correction: parity and Hamming codes can find and fix errors.
  6. Easy design and integration: logic gates can be integrated on ICs in very large numbers, with low cost and power.
  7. Reproducible, easy to transmit and process: copies are exact; digital signals can be compressed, encrypted and regenerated.

Disadvantage. Real-world signals are analog, so ADC and DAC are needed, and digital systems have a finite resolution.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 7 marks

What is the weighted code and non-weighted code? Perform the conversions indicated:
(i) (E1BC.AB)16=(?)8(E1BC.AB)_{16} = (?)_8 (ii) (1235)4=(?)BCD(1235)_4 = (?)_{BCD} (iii) (1011011)gray=(?)2(1011011)_{gray} = (?)_2 (iv) (11010)2−(10000)2(11010)_2 - (10000)_2 using 2's complement.

Answer

Weighted code. Each digit position has a fixed weight, and the value is the sum of the weights of the 1 bits. Examples: BCD (8421), 2421, 84-2-1.

Non-weighted code. The positions have no fixed weights. Examples: Gray code, excess-3 code.

(i) (E1BC.AB)16=(?)8(E1BC.AB)_{16} = (?)_8

Convert each hex digit to 4 bits: E=1110E=1110, 1=00011=0001, B=1011B=1011, C=1100C=1100, A=1010A=1010, B=1011B=1011.

1110 0001 1011 1100.1010 10111110\ 0001\ 1011\ 1100 . 1010\ 1011

Regroup in 3s from the point: integer 1 110 000 110 111 1001\ 110\ 000\ 110\ 111\ 100 gives 1,6,0,6,7,41,6,0,6,7,4; fraction 101 010 110101\ 010\ 110 gives 5,2,65,2,6.

(E1BC.AB)16=(160674.526)8(E1BC.AB)_{16} = (160674.526)_8

(ii) (1235)4=(?)BCD(1235)_4 = (?)_{BCD}

The digit 5 is not valid in base 4 (digits are 0 to 3), so (1235)4(1235)_4 is not a valid number. If the intended number is (1233)4(1233)_4:

1⋅43+2⋅42+3⋅4+3=64+32+12+3=1111\cdot4^3 + 2\cdot4^2 + 3\cdot4 + 3 = 64 + 32 + 12 + 3 = 111

(111)10=(0001 0001 0001)BCD(111)_{10} = (0001\ 0001\ 0001)_{BCD}

(If the base were 6, (1235)6=216+72+18+5=311=(0011 0001 0001)BCD(1235)_6 = 216+72+18+5 = 311 = (0011\ 0001\ 0001)_{BCD}.)

(iii) (1011011)Gray=(?)2(1011011)_{Gray} = (?)_2

The MSB is copied; each next bit is the previous binary bit XOR the next Gray bit.

  • b1=1b_1 = 1
  • b2=1⊕0=1b_2 = 1\oplus0 = 1
  • b3=1⊕1=0b_3 = 1\oplus1 = 0
  • b4=0⊕1=1b_4 = 0\oplus1 = 1
  • b5=1⊕0=1b_5 = 1\oplus0 = 1
  • b6=1⊕1=0b_6 = 1\oplus1 = 0
  • b7=0⊕1=1b_7 = 0\oplus1 = 1

(1011011)Gray=(1101101)2(1011011)_{Gray} = (1101101)_2

(iv) (11010)2−(10000)2(11010)_2 - (10000)_2 using 2's complement

110102=2611010_2 = 26 and 100002=1610000_2 = 16. The 2's complement of 1000010000 (5 bits) is 01111+1=1000001111 + 1 = 10000.

11010+10000=1 0101011010 + 10000 = 1\,01010

The carry out is discarded, so the answer is 010102=101001010_2 = 10_{10} (check: 26−16=1026-16=10).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 8 marks

Design combinational circuit that has four input and two outputs, one of the output is high when majority of inputs are high. The second output is high only when all inputs are same type.

Answer

Let the inputs be A,B,C,DA,B,C,D and the outputs Y1Y_1 (majority high) and Y2Y_2 (all inputs the same). Majority means more than half of the four inputs are high, which is at least three 1s.

Truth table (rows with output 1 only are shown in full; all other rows have Y1=Y2=0Y_1=Y_2=0)

ABCDABCDY1Y_1Y2Y_2
000001
011110
101110
110110
111010
111111
other 10 rows00

Y1=Σ(7,11,13,14,15)Y_1 = \Sigma(7,11,13,14,15) and Y2=Σ(0,15)Y_2 = \Sigma(0,15).

K-map for Y1Y_1 (rows ABAB, columns CDCD)

AB\CDAB\backslash CD00011110
000000
010010
110111
100010

Four pairs, each containing m15: m7 and m15 give BCDBCD; m11 and m15 give ACDACD; m13 and m15 give ABDABD; m14 and m15 give ABCABC.

Y1=ABC+ABD+ACD+BCDY_1 = ABC + ABD + ACD + BCD

Y2Y_2. m0 and m15 are not adjacent, so there is no simplification:

Y2=ABCD+A‾ B‾ C‾ D‾Y_2 = ABCD + \overline{A}\,\overline{B}\,\overline{C}\,\overline{D}

Circuit. For Y1Y_1: four 3-input AND gates feeding a 4-input OR gate. For Y2Y_2: one 4-input AND on A,B,C,DA,B,C,D and one 4-input AND on the complemented inputs (four NOT gates), feeding a 2-input OR gate.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 7 marks

Define Mux and De-Mux. Implement F(A,B,C,D)=Σ(0,1,3,4,8,9,15)F(A,B,C,D) = \Sigma(0,1,3,4,8,9,15) using Mux.

Answer

Multiplexer (MUX). A combinational circuit with 2n2^n data inputs, nn select lines and one output. It selects one of the inputs and passes it to the output (many-to-one).

Demultiplexer (DEMUX). A combinational circuit with one data input, nn select lines and 2n2^n outputs. It routes the single input to one of the outputs chosen by the select lines (one-to-many). A 1:4 DEMUX has Y0=DS1‾ S0‾Y_0 = D\overline{S_1}\,\overline{S_0}, Y1=DS1‾S0Y_1 = D\overline{S_1}S_0, Y2=DS1S0‾Y_2 = DS_1\overline{S_0}, Y3=DS1S0Y_3 = DS_1S_0.

Implementation of F(A,B,C,D)=Σ(0,1,3,4,8,9,15)F(A,B,C,D)=\Sigma(0,1,3,4,8,9,15) using an 8:1 MUX

Use A,B,CA,B,C as select lines (S2S1S0S_2S_1S_0) and DD as the data variable. Each select combination covers two minterms, m2im_{2i} (with D=0D=0) and m2i+1m_{2i+1} (with D=1D=1).

Select ABCABCMintermsFF for D=0D=0FF for D=1D=1Input
0000, 111I0=1I_0 = 1
0012, 301I1=DI_1 = D
0104, 510I2=D‾I_2 = \overline{D}
0116, 700I3=0I_3 = 0
1008, 911I4=1I_4 = 1
10110, 1100I5=0I_5 = 0
11012, 1300I6=0I_6 = 0
11114, 1501I7=DI_7 = D

Connections

I0 = 1
I1 = D
I2 = D'  (via NOT gate)
I3 = 0
I4 = 1       8:1 MUX --> F
I5 = 0       S2 = A, S1 = B, S0 = C
I6 = 0
I7 = D

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 7 marks

What do you mean by Serial register? Explain the Serial In Serial Out register with the timing diagram.

Answer

Serial register. A shift register in which data is entered or taken out one bit at a time, in sequence, through a single line. The bits move through the flip-flops, one position for each clock pulse.

Serial In Serial Out (SISO) shift register. It consists of nn D flip-flops connected in cascade: the output QQ of each flip-flop feeds the DD input of the next, and all share one clock. Data enters at the first flip-flop and leaves from the last.

Serial in --> [D FF0] --> [D FF1] --> [D FF2] --> [D FF3] --> Serial out
                ^            ^            ^            ^
                +------------+---- CLK ----+------------+

Operation (4-bit register, initially 0000; the bits 1, 0, 1, 1 are applied in that order on successive clock pulses, then 0s)

ClockSerial inQ0Q1Q2Q3Q_0Q_1Q_2Q_3Serial out (Q3Q_3)
Initial-00000
1110000
2001000
3110100
4111011 (the first bit entered)
5001100
6000111
7000011
8000000

Each bit takes 4 clock pulses to travel from input to output. The first bit entered appears at the output on the 4th pulse and the following bits appear one per pulse (1, 0, 1, 1 at Q3Q_3 from pulse 4 to pulse 7).

Timing diagram. On each rising clock edge every flip-flop copies the value of the previous one, so the waveform at Q0Q_0 is the input delayed by one clock, Q1Q_1 by two, Q2Q_2 by three and Q3Q_3 by four clocks. The same data pattern appears on all four outputs, each shifted by one clock period.

Features. It needs only one input and one output pin, so it is used for serial data transmission and for delays. Its drawback is that it is slow: nn clock pulses are needed to load or read nn bits.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 7 marks

Draw a PIPO register. Explain in brief.

Answer

PIPO (Parallel-In Parallel-Out) register. All bits of the data word are loaded at the same time through parallel inputs, and all bits are available at the same time at the parallel outputs. It is built from D flip-flops with a common clock and needs no shifting.

Diagram (4-bit)

 D3     D2     D1     D0      (parallel data inputs)
  |      |      |      |
[D FF] [D FF] [D FF] [D FF]  <---- common CLK
  |      |      |      |
 Q3     Q2     Q1     Q0      (parallel data outputs)

Operation

  1. The 4-bit word D3D2D1D0D_3D_2D_1D_0 is applied to the inputs.
  2. On the active clock edge, each flip-flop stores its own input bit, so Q3Q2Q1Q0=D3D2D1D0Q_3Q_2Q_1Q_0 = D_3D_2D_1D_0.
  3. The outputs hold the data until the next clock edge, even if the inputs change.

For example, the input 1010 appears at the outputs as Q3Q2Q1Q0=1010Q_3Q_2Q_1Q_0 = 1010 after one clock pulse.

Features. It is the fastest register, needing only one clock pulse to load and to read. It is used as a temporary storage (buffer) register, for example in CPUs and interface circuits. It uses a flip-flop for each bit, so the wiring is more complex than a serial register.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Fall · 5 marks

Write short notes on: Duality principle

Answer

Duality principle. In Boolean algebra, every identity remains valid if we interchange the AND and OR operators and interchange the identity elements 0 and 1 throughout the expression. The new expression obtained is the dual of the original.

Rules to form the dual

  • Replace ++ by ⋅\cdot and ⋅\cdot by ++.
  • Replace 0 by 1 and 1 by 0.
  • Variables and complements are left unchanged.

Examples

OriginalDual
A+0=AA + 0 = AA⋅1=AA\cdot1 = A
A+A‾=1A + \overline{A} = 1A⋅A‾=0A\cdot\overline{A} = 0
A+AB=AA + AB = AA(A+B)=AA(A+B) = A
A+BC=(A+B)(A+C)A + BC = (A+B)(A+C)A(B+C)=AB+ACA(B+C) = AB + AC
De Morgan: A+B‾=A‾ B‾\overline{A+B} = \overline{A}\,\overline{B}AB‾=A‾+B‾\overline{AB} = \overline{A}+\overline{B}

Importance. Every theorem has a dual, so proving one theorem proves the other, which halves the work. The postulates and theorems of Boolean algebra are listed in dual pairs. Duality is also the basis for converting between NAND and NOR designs, and for switching between sum-of-products and product-of-sums forms.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

What are basic theorem and properties of Boolean Algebra.

Answer

Basic postulates and properties

PropertyAND formOR form
IdentityA⋅1=AA\cdot1 = AA+0=AA+0 = A
Null (domination)A⋅0=0A\cdot0 = 0A+1=1A+1 = 1
IdempotentA⋅A=AA\cdot A = AA+A=AA+A = A
ComplementA⋅A‾=0A\cdot\overline{A} = 0A+A‾=1A+\overline{A} = 1
InvolutionA‾‾=A\overline{\overline{A}} = A
CommutativeAB=BAAB = BAA+B=B+AA+B = B+A
Associative(AB)C=A(BC)(AB)C = A(BC)(A+B)+C=A+(B+C)(A+B)+C = A+(B+C)
DistributiveA(B+C)=AB+ACA(B+C) = AB+ACA+BC=(A+B)(A+C)A+BC = (A+B)(A+C)

Basic theorems

TheoremAND formOR form
AbsorptionA(A+B)=AA(A+B) = AA+AB=AA + AB = A
SimplificationA(A‾+B)=ABA(\overline{A}+B) = ABA+A‾B=A+BA + \overline{A}B = A+B
Consensus(A+B)(A‾+C)(B+C)=(A+B)(A‾+C)(A+B)(\overline{A}+C)(B+C) = (A+B)(\overline{A}+C)AB+A‾C+BC=AB+A‾CAB + \overline{A}C + BC = AB + \overline{A}C
De Morgan'sA+B‾=A‾ B‾\overline{A+B} = \overline{A}\,\overline{B}AB‾=A‾+B‾\overline{AB} = \overline{A}+\overline{B}

Every identity has a dual obtained by swapping AND with OR and 0 with 1 (duality principle). These laws are used to simplify Boolean expressions and reduce the number of gates in a circuit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

What is the Involution law? Define logic gates and truth tables.

Answer

Involution law. Complementing a variable twice gives back the original variable:

A‾‾=A\overline{\overline{A}} = A

It is verified by a truth table: if A=0A=0, A‾=1\overline{A}=1 and A‾‾=0\overline{\overline{A}}=0; if A=1A=1, A‾=0\overline{A}=0 and A‾‾=1\overline{\overline{A}}=1. In circuits, two NOT gates in series cancel.

Logic gates. A logic gate is an electronic circuit with one or more inputs and one output, which performs a basic logical operation on binary inputs. The relation between inputs and output is shown by a truth table, which lists the output for every combination of inputs.

GateSymbol / expressionOutput
NOTY=A‾Y=\overline{A}complement of input
ANDY=A⋅BY=A\cdot B1 only if all inputs are 1
ORY=A+BY=A+B1 if any input is 1
NANDY=AB‾Y=\overline{AB}0 only if all inputs are 1
NORY=A+B‾Y=\overline{A+B}1 only if all inputs are 0
XORY=A⊕BY=A\oplus B1 if inputs differ
XNORY=A⊕B‾Y=\overline{A\oplus B}1 if inputs are equal

Truth tables (two inputs)

AABBANDORNANDNORXORXNOR
00001101
01011010
10011010
11110001

NOT: A=0A=0 gives Y=1Y=1; A=1A=1 gives Y=0Y=0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Explain about De-Morgan's law of 3 input variables.

Answer

De Morgan's laws relate AND, OR and complement. For three variables A,B,CA,B,C:

First law. The complement of a sum equals the product of the complements:

A+B+C‾=A‾⋅B‾⋅C‾\overline{A+B+C} = \overline{A}\cdot\overline{B}\cdot\overline{C}

Second law. The complement of a product equals the sum of the complements:

A⋅B⋅C‾=A‾+B‾+C‾\overline{A\cdot B\cdot C} = \overline{A}+\overline{B}+\overline{C}

Proof by truth table

AABBCCA+B+C‾\overline{A+B+C}A‾ B‾ C‾\overline{A}\,\overline{B}\,\overline{C}ABC‾\overline{ABC}A‾+B‾+C‾\overline{A}+\overline{B}+\overline{C}
0001111
0010011
0100011
0110011
1000011
1010011
1100011
1110000

The columns are identical in pairs, so both laws hold.

Algebraic proof. Apply the two-variable law twice: A+B+C‾=(A+B)+C‾=A+B‾⋅C‾=A‾ B‾ C‾\overline{A+B+C} = \overline{(A+B)+C} = \overline{A+B}\cdot\overline{C} = \overline{A}\,\overline{B}\,\overline{C}. Similarly, ABC‾=(AB)C‾=AB‾+C‾=A‾+B‾+C‾\overline{ABC} = \overline{(AB)C} = \overline{AB}+\overline{C} = \overline{A}+\overline{B}+\overline{C}.

Gate equivalents. A 3-input NOR gate equals a 3-input AND gate with all inputs inverted; a 3-input NAND gate equals a 3-input OR gate with all inputs inverted. The laws extend to any number of variables and are the basis of NAND/NOR-only designs.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

Explain full adder circuit with required diagrams.

Answer

Full adder. A combinational circuit that adds three 1-bit numbers: two input bits AA and BB and a carry-in CinC_{in} from the previous stage. It has two outputs, the sum SS and the carry-out CoutC_{out}. Cascading full adders gives a multi-bit adder.

Truth table

AABBCinC_{in}SSCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111

Boolean expressions (from K-maps)

S=A‾ B‾Cin+A‾BCin‾+AB‾ Cin‾+ABCin=A⊕B⊕CinS = \overline{A}\,\overline{B}C_{in} + \overline{A}B\overline{C_{in}} + A\overline{B}\,\overline{C_{in}} + ABC_{in} = A\oplus B\oplus C_{in}

Cout=AB+BCin+ACin=AB+Cin(A⊕B)C_{out} = AB + BC_{in} + AC_{in} = AB + C_{in}(A\oplus B)

Logic diagram (two XORs, two ANDs, one OR)

A ──┬──[XOR1]──┬──────────[XOR2]── S
B ──┤          │   Cin ───┘  │
    │          └─────────[AND2]─┐
    └────────────────[AND1]─────[OR]── Cout

XOR1XOR_1 gives A⊕BA\oplus B; XOR2XOR_2 gives (A⊕B)⊕Cin=S(A\oplus B)\oplus C_{in} = S. AND1AND_1 gives ABAB; AND2AND_2 gives Cin(A⊕B)C_{in}(A\oplus B). The OR gate gives CoutC_{out}.

Alternative. It can also be drawn using two half adders and an OR gate (the first half adder adds AA and BB, the second adds the sum to CinC_{in}, and the OR combines the two carries).

Check: 1+1+01+1+0: S=0S = 0, Cout=1⋅1+0=1C_{out} = 1\cdot1 + 0 = 1, giving 102=210_2 = 2.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Design a code converter to convert 8 4 -2 -1 code to 2421.

Answer

Design of the 8 4 -2 -1 to 2421 code converter

Inputs ABCDABCD (8 4 -2 -1) and outputs WXYZWXYZ (2421). The combinations 0001, 0010, 0011, 1100, 1101, 1110 do not occur and are don't cares.

DigitABCDABCD (84-2-1)WXYZWXYZ (2421)
000000000
101110001
201100010
301010011
401000100
510111011
610101100
710011101
810001110
911111111

K-map simplification

  • W=1W = 1 for A=1A=1 (digits 5 to 9) and 0 for A=0A=0, so W=AW = A.
  • Z=1Z = 1 for 0111, 0101, 1011, 1001, 1111, all with D=1D=1, so Z=DZ = D.
  • X=1X = 1 at m4, m8, m9, m10, m15. Groups: m8, m9, m12, m13 give AC‾A\overline{C}; m8, m10, m12, m14 give AD‾A\overline{D}; m12 to m15 give ABAB; m4 with m12 gives BC‾ D‾B\overline{C}\,\overline{D}. So X=AB+AC‾+AD‾+BC‾ D‾X = AB + A\overline{C} + A\overline{D} + B\overline{C}\,\overline{D}.
  • Y=1Y = 1 at m5, m6, m8, m11, m15. The term B(C⊕D)B(C\oplus D) covers m5 and m6; the term A (C⊕D)‾A\,\overline{(C\oplus D)} covers m8 and m11 (and m15); ABAB covers m15 and the don't cares m12 to m14. So Y=AB+A (C⊕D)‾+B(C⊕D)Y = AB + A\,\overline{(C\oplus D)} + B(C\oplus D).

W=A,X=AB+AC‾+AD‾+BC‾ D‾,Y=AB+A (C⊕D)‾+B(C⊕D),Z=DW = A,\quad X = AB + A\overline{C} + A\overline{D} + B\overline{C}\,\overline{D},\quad Y = AB + A\,\overline{(C\oplus D)} + B(C\oplus D),\quad Z = D

Check. Digit 8, ABCD=1000ABCD=1000: W=1W=1; X=AC‾=1X = A\overline{C} = 1; Y=A (0⊕0)‾=1Y = A\,\overline{(0\oplus0)} = 1; Z=0Z=0, giving 1110. Digit 3, ABCD=0101ABCD = 0101: W=0W=0; X=0X = 0; Y=B(C⊕D)=1Y = B(C\oplus D) = 1; Z=1Z = 1, giving 0011.

Circuit. WW and ZZ are straight connections of AA and DD. An XOR on C,DC,D is shared by the YY logic, which uses AND-OR gates; XX uses AND-OR logic.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Design a synchronous 4-bit up counter.

Answer

Synchronous counter. All flip-flops receive the same clock pulse at the same time, so there is no ripple delay and it is faster than an asynchronous counter. A 4-bit up counter counts 0000 to 1111 (0 to 15) and then returns to 0000.

Design using JK flip-flops

For a JK flip-flop in toggle form, a flip-flop must toggle (J=K=1J=K=1) when all lower bits are 1, and hold (J=K=0J=K=0) otherwise. This follows from the excitation table:

Qn→Qn+1Q_n\to Q_{n+1}JJKK
0 to 00X
0 to 11X
1 to 0X1
1 to 1X0

State sequence (binary up count): 0000, 0001, 0010, 0011, 0100, ..., 1110, 1111, 0000.

  • Q0Q_0 toggles on every clock: J0=K0=1J_0 = K_0 = 1.
  • Q1Q_1 toggles when Q0=1Q_0 = 1: J1=K1=Q0J_1 = K_1 = Q_0.
  • Q2Q_2 toggles when Q1Q0=11Q_1Q_0 = 11: J2=K2=Q1Q0J_2 = K_2 = Q_1Q_0.
  • Q3Q_3 toggles when Q2Q1Q0=111Q_2Q_1Q_0 = 111: J3=K3=Q2Q1Q0J_3 = K_3 = Q_2Q_1Q_0.

J0=K0=1,J1=K1=Q0,J2=K2=Q0Q1,J3=K3=Q0Q1Q2J_0=K_0=1,\quad J_1=K_1=Q_0,\quad J_2=K_2=Q_0Q_1,\quad J_3=K_3=Q_0Q_1Q_2

Circuit. Four JK flip-flops share the clock. J0,K0J_0,K_0 are tied to logic 1. J1,K1J_1,K_1 are connected to Q0Q_0. A 2-input AND gate (Q0Q1Q_0Q_1) feeds J2,K2J_2,K_2, and a 3-input AND gate (Q0Q1Q2Q_0Q_1Q_2) feeds J3,K3J_3,K_3.

Check. At 0111: J3=Q2Q1Q0=1J_3 = Q_2Q_1Q_0 = 1, so Q3Q_3 toggles to 1; Q2Q_2 (J2=Q1Q0=1J_2=Q_1Q_0=1), Q1Q_1 and Q0Q_0 also toggle to 0, so the next state is 1000. At 1111 all four toggle, giving 0000.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

Explain the operation of PIPO shift register with the help of necessary diagram.

Answer

PIPO shift register. In a Parallel-In Parallel-Out register the bits are loaded into all flip-flops at the same time, and the outputs of all flip-flops are available at the same time. It is the register used for temporary storage of a data word.

Diagram (4-bit, D flip-flops)

 D3     D2     D1     D0     (parallel inputs)
  |      |      |      |
[D FF3][D FF2][D FF1][D FF0] <--- CLK (common)
  |      |      |      |
 Q3     Q2     Q1     Q0     (parallel outputs)

Operation

  1. The 4-bit data word is placed on the inputs D3D2D1D0D_3D_2D_1D_0.
  2. When the clock pulse arrives, every flip-flop captures its input at the same instant (D flip-flop: Qn+1=DQ_{n+1} = D).
  3. The outputs Q3Q2Q1Q0Q_3Q_2Q_1Q_0 immediately show the stored word and hold it until the next clock pulse, regardless of later changes at the inputs.

Example: with D3D2D1D0=1011D_3D_2D_1D_0 = 1011, after one clock pulse Q3Q2Q1Q0=1011Q_3Q_2Q_1Q_0 = 1011.

Because loading and reading take one clock pulse each, it is the fastest type of register. A clear (reset) input can be added to set all outputs to 0. It is used in CPUs as general-purpose registers, and in buffers and latches.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

Write short notes on: Multiplexer

Answer

Multiplexer (MUX). A multiplexer is a combinational circuit that selects one of 2n2^n data inputs and sends it to a single output, under the control of nn select lines. It is also called a data selector.

Example: 4:1 MUX (inputs I0…I3I_0\ldots I_3, selects S1S0S_1S_0)

S1S_1S0S_0YY
00I0I_0
01I1I_1
10I2I_2
11I3I_3

Y=S1‾ S0‾I0+S1‾S0I1+S1S0‾I2+S1S0I3Y = \overline{S_1}\,\overline{S_0}I_0 + \overline{S_1}S_0I_1 + S_1\overline{S_0}I_2 + S_1S_0I_3

It consists of NOT gates, AND gates (one per input) and one OR gate.

Uses

  • Data routing and parallel-to-serial conversion.
  • Implementing Boolean functions: a 2n:12^n:1 MUX can realise any function of n+1n+1 variables.
  • Selecting registers or sources in a CPU, and in ALU designs.
  • Communication systems for time-division multiplexing.

Larger multiplexers can be built from smaller ones (for example, an 8:1 MUX from two 4:1 MUXes and one 2:1 MUX).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

Write short notes on: Processor bus organization

Answer

Processor bus organization. The processor bus is the set of lines that carry data and addresses between the registers, the ALU and memory inside the CPU. It determines how many register transfers can occur in one clock cycle.

Types

  1. Single-bus organization: all registers, the ALU and the memory interface share one common bus. Only one data transfer can take place at a time, so an ALU operation takes several steps. The ALU inputs need temporary registers (such as YY and ZZ). It is simple and cheap but slow.
  2. Two-bus organization: two buses let two operands be read in the same cycle, or one operand and a result to be moved together. This reduces the number of steps.
  3. Three-bus organization: one bus carries the first operand, the second carries the other operand, and the third carries the result back to the register file. The ALU computes R3←R1+R2R_3 \leftarrow R_1 + R_2 in a single clock cycle. It is faster but needs more hardware and wires.

Control. Each register has input-enable and output-enable signals (tri-state gates connect register outputs to the bus). The control unit activates these in the proper sequence to move data.

Example (single bus, add R3=R1+R2R_3 = R_1 + R_2)

  1. R1R_1 out, YY in
  2. R2R_2 out, ALU add, ZZ in
  3. ZZ out, R3R_3 in

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 7 marks

Show NAND and NOR gates as universal gates.

Answer

A universal gate can realise all basic gates (NOT, AND, OR), and therefore any logic function. NAND and NOR are universal gates.

NAND as a universal gate

GateConstructionProof
NOTTie both inputs of a NAND togetherA⋅A‾=A‾\overline{A\cdot A} = \overline{A}
ANDNAND followed by a NAND used as NOTAB‾‾=AB\overline{\overline{AB}} = AB
ORNOT each input, then NAND themA‾⋅B‾‾=A+B\overline{\overline{A}\cdot\overline{B}} = A+B

NOR as a universal gate

GateConstructionProof
NOTTie both inputs of a NOR togetherA+A‾=A‾\overline{A+A} = \overline{A}
ORNOR followed by a NOR used as NOTA+B‾‾=A+B\overline{\overline{A+B}} = A+B
ANDNOT each input, then NOR themA‾+B‾‾=AB\overline{\overline{A}+\overline{B}} = AB
NAND-based:
 NOT:  A ─┬─[NAND]── A'
          └─┘
 AND:  A,B ─[NAND]─[NAND as NOT]── AB
 OR:   A ─[NAND as NOT]─┐
       B ─[NAND as NOT]─┴─[NAND]── A+B

Since NOT, AND and OR can form any Boolean function, NAND alone, or NOR alone, is enough to build any digital circuit. Using one type of gate also simplifies IC manufacturing.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 7 marks

What is the dual of a function. Explain involution law.

Answer

Dual of a function. The dual of a Boolean expression is obtained by replacing each AND by OR, each OR by AND, each 0 by 1 and each 1 by 0, while the variables and their complements stay unchanged.

Examples:

  • Dual of F=A+BCF = A + BC is FD=A(B+C)F_D = A(B+C).
  • Dual of F=AB‾+0F = A\overline{B} + 0 is FD=(A+B‾)⋅1F_D = (A+\overline{B})\cdot1.
  • Dual of F=(A+B)(A‾+C)F = (A+B)(\overline{A}+C) is FD=AB+A‾CF_D = AB + \overline{A}C.

The dual should not be confused with the complement: the complement also complements the variables. By the principle of duality, if an identity is true, its dual identity is also true (for example, A+AB=AA+AB=A and A(A+B)=AA(A+B)=A).

Involution law. Complementing a variable twice gives back the variable:

A‾‾=A\overline{\overline{A}} = A

Proof by truth table:

AAA‾\overline{A}A‾‾\overline{\overline{A}}
010
101

In hardware, two NOT gates connected in series give the original signal. The same applies to longer expressions, so A+B‾‾=A+B\overline{\overline{A+B}} = A+B. This law is used when applying De Morgan's laws and when converting a circuit to NAND-only or NOR-only form.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 8 marks

Simplify the following Boolean function with don't care condition.
F(A,B,C,D)=∑m(0,1,3,4,5,6,7,11)F(A,B,C,D) = \sum m(0,1,3,4,5,6,7,11) d(A,B,C,D)=∑m(8,10,12,15)d(A,B,C,D) = \sum m(8,10,12,15)
Draw the logic circuit using NOR gates only.

Answer

K-map (rows ABAB, columns CDCD; X = don't care)

AB\CDAB \backslash CD00011110
001 (0)1 (1)1 (3)0 (2)
011 (4)1 (5)1 (7)1 (6)
11X (12)0 (13)X (15)0 (14)
10X (8)0 (9)1 (11)X (10)

Simplified SOP. Groups of 1s (using don't cares where useful):

  • m4,m5,m6,m7m_4,m_5,m_6,m_7 gives A′BA'B
  • m0,m1,m4,m5m_0,m_1,m_4,m_5 gives A′C′A'C'
  • m3,m7,m11,m15m_3,m_7,m_{11},m_{15} (with d15d_{15}) gives CDCD

F=A′B+A′C′+CDF = A'B + A'C' + CD

NOR-only realisation. NOR gates give a product-of-sums form, so group the 0s instead. The zeros are m2,m9,m13,m14m_2,m_9,m_{13},m_{14}, and the don't cares d8,d10,d12,d15d_8,d_{10},d_{12},d_{15} help to enlarge the groups:

  • m12,m13,m14,m15m_{12},m_{13},m_{14},m_{15} gives ABAB
  • m8,m9,m12,m13m_8,m_9,m_{12},m_{13} gives AC′AC'
  • m2,m10m_2,m_{10} gives B′CD′B'CD'

F′=AB+AC′+B′CD′F' = AB + AC' + B'CD'

Complementing,

F=(A′+B′)(A′+C)(B+C′+D)F = (A'+B')(A'+C)(B+C'+D)

This is the NOR network below, since NOR(x,y,z)=x′y′z′\text{NOR}(x,y,z)=x'y'z':

F=NOR( NOR(A′,B′), NOR(A′,C), NOR(B,C′,D) )F = \text{NOR}\big(\,\text{NOR}(A',B'),\ \text{NOR}(A',C),\ \text{NOR}(B,C',D)\,\big)

Check: NOR(A′,B′)=AB\text{NOR}(A',B') = AB, NOR(A′,C)=AC′\text{NOR}(A',C)=AC', NOR(B,C′,D)=B′CD′\text{NOR}(B,C',D)=B'CD', and the output NOR gives (AB+AC′+B′CD′)′=F(AB+AC'+B'CD')' = F.

Circuit (NOR gates only)

  1. Three inverters made from NOR gates with inputs tied together: A′=NOR(A,A)A' = \text{NOR}(A,A), B′=NOR(B,B)B' = \text{NOR}(B,B), C′=NOR(C,C)C' = \text{NOR}(C,C).
  2. Gate G1 = 2-input NOR of A′A' and B′B'.
  3. Gate G2 = 2-input NOR of A′A' and CC.
  4. Gate G3 = 3-input NOR of BB, C′C' and DD.
  5. Output gate = 3-input NOR of G1, G2, G3, which gives FF.

This uses 7 NOR gates in all.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 8 marks

Implement a circuit full adder.

Answer

A full adder adds three 1-bit inputs: two operand bits AA, BB and a carry-in CinC_{in}. It produces a sum bit SS and a carry-out CoutC_{out}.

Truth table

AABBCinC_{in}SSCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111

Boolean expressions. From the table, S=∑m(1,2,4,7)S=\sum m(1,2,4,7) and Cout=∑m(3,5,6,7)C_{out}=\sum m(3,5,6,7).

S=A′B′Cin+A′BCin′+AB′Cin′+ABCin=A⊕B⊕CinS = A'B'C_{in} + A'BC_{in}' + AB'C_{in}' + ABC_{in} = A \oplus B \oplus C_{in}

K-map simplification of the carry (pairs ABAB, ACinAC_{in}, BCinBC_{in}):

Cout=AB+ACin+BCin=AB+Cin(A⊕B)C_{out} = AB + AC_{in} + BC_{in} = AB + C_{in}(A\oplus B)

Implementation. The full adder is built from two half adders and an OR gate.

  1. Half adder 1 takes AA and BB. It gives S1=A⊕BS_1 = A\oplus B and C1=ABC_1 = AB.
  2. Half adder 2 takes S1S_1 and CinC_{in}. It gives S=S1⊕CinS = S_1\oplus C_{in} and C2=S1CinC_2 = S_1 C_{in}.
  3. An OR gate gives Cout=C1+C2C_{out} = C_1 + C_2.

In total there are 2 XOR gates, 2 AND gates and 1 OR gate. Connecting nn full adders, with each carry-out feeding the next carry-in, gives an nn-bit parallel adder.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 7 marks

Convert Excess-3 to BCD code and use K-map for circuit implementation.

Answer

Excess-3 code. Each decimal digit nn is coded as the 4-bit binary of n+3n+3. The valid codes are 00110011 to 11001100. The codes 0000,0001,0010,1101,1110,11110000, 0001, 0010, 1101, 1110, 1111 never occur, so they are don't cares.

Let the Excess-3 input be w x y zw\,x\,y\,z and the BCD output be A B C DA\,B\,C\,D.

Truth table

DigitwxyzwxyzABCDABCD
000110000
101000001
201010010
301100011
401110100
510000101
610010110
710100111
810111000
911001001

K-map simplification (minterms are the decimal value of wxyzwxyz, with don't cares d(0,1,2,13,14,15)d(0,1,2,13,14,15)):

  • A=∑m(11,12)+d(0,1,2,13,14,15)A = \sum m(11,12) + d(0,1,2,13,14,15). Groups: m12,m13,m14,m15m_{12},m_{13},m_{14},m_{15} gives wxwx, and m11,m15m_{11},m_{15} gives wyzwyz. So A=wx+wyzA = wx + wyz.
  • B=∑m(7,8,9,10)+d(0,1,2,13,14,15)B = \sum m(7,8,9,10) + d(0,1,2,13,14,15). Groups: m7,m15m_7,m_{15} gives xyzxyz; m0,m1,m8,m9m_0,m_1,m_8,m_9 gives x′y′x'y'; m0,m2,m8,m10m_0,m_2,m_8,m_{10} gives x′z′x'z'. So B=x′y′+x′z′+xyzB = x'y' + x'z' + xyz.
  • C=∑m(5,6,9,10)+d(0,1,2,13,14,15)C = \sum m(5,6,9,10) + d(0,1,2,13,14,15). Groups: m1,m5,m9,m13m_1,m_5,m_9,m_{13} gives y′zy'z; m2,m6,m10,m14m_2,m_6,m_{10},m_{14} gives yz′yz'. So C=y′z+yz′=y⊕zC = y'z + yz' = y\oplus z.
  • D=∑m(4,6,8,10,12)+dD = \sum m(4,6,8,10,12) + d gives D=z′D = z'.

Check: for digit 0 (wxyz=0011wxyz=0011) we get A=0A=0, B=0B=0, C=1⊕1=0C=1\oplus1=0, D=0D=0, which is 00000000. For digit 9 (11001100) we get A=1A=1, B=0B=0, C=0C=0, D=1D=1, which is 10011001.

Final equations

A=wx+wyz,B=x′y′+x′z′+xyz,C=y⊕z,D=z′A = wx + wyz,\quad B = x'y' + x'z' + xyz,\quad C = y \oplus z,\quad D = z'

Circuit. Use inverters for x′,y′,z′x', y', z'; AND gates for wxwx, wyzwyz, x′y′x'y', x′z′x'z', xyzxyz; OR gates to form AA and BB; one XOR gate for CC; and the inverter output z′z' directly for DD.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 7 marks

Explain state diagram and state table. Explain it with example.

Answer

In a sequential circuit the output depends on the present inputs and also on the stored state. Its behaviour can be described in two equivalent ways.

State table. A state table lists, for every combination of present state and input, the next state and the output. It is built from the flip-flop input equations and the characteristic equation of the flip-flop.

State diagram. A state diagram is the graphical form of the state table.

  • Each state is drawn as a circle labelled with the flip-flop values (for example Q1Q0Q_1Q_0).
  • Each transition is an arrow from the present state to the next state.
  • The arrow is labelled with the input value that causes the transition. For a Mealy machine the label is input/output; for a Moore machine the output is written inside the circle.

Example. Consider a sequential circuit with one D flip-flop AA, one input xx and one output yy, where

DA=A⊕x,y=A x′D_A = A \oplus x,\qquad y = A\,x'

Since A(t+1)=DAA(t+1)=D_A, the state table is:

Present state AAInput xxNext state AAOutput yy
0000
0110
1011
1100

The state diagram has two circles, state 0 and state 1.

  • Arrow 0→00\to0 labelled x/y=0/0x/y = 0/0.
  • Arrow 0→10\to1 labelled 1/01/0.
  • Arrow 1→11\to1 labelled 0/10/1.
  • Arrow 1→01\to0 labelled 1/01/0.

This circuit behaves as a toggle: it changes state whenever x=1x=1.

Use. From the state diagram and table, the designer derives the flip-flop input equations and output equations. This is the basis of sequential circuit analysis and design (counters, sequence detectors and so on).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 8 marks

Explain PISO shift register.

Answer

A PISO (Parallel-In Serial-Out) shift register loads all nn bits at the same time through parallel inputs and then delivers them one bit per clock pulse at a single serial output.

Structure (4-bit). It uses four D flip-flops FF0…FF3FF_0 \ldots FF_3 driven by a common clock. In front of each flip-flop, except the first, is a 2-to-1 selector made from AND-OR gates, controlled by a SHIFT/LOAD‾SHIFT/\overline{LOAD} line.

  • Parallel data inputs: D3 D2 D1 D0D_3\,D_2\,D_1\,D_0.
  • Serial output: Q0Q_0 of the last flip-flop.
  • Control line: SHIFT/LOAD‾SHIFT/\overline{LOAD}.

Operation

  1. Load mode (SHIFT/LOAD‾=0SHIFT/\overline{LOAD}=0). The selector passes the parallel inputs to the D inputs. On the next clock edge Q3Q2Q1Q0=D3D2D1D0Q_3Q_2Q_1Q_0 = D_3D_2D_1D_0, so all bits are loaded together.
  2. Shift mode (SHIFT/LOAD‾=1SHIFT/\overline{LOAD}=1). The selector connects each D input to the output of the previous flip-flop. On every clock pulse the data moves one place towards the output, Q3→Q2→Q1→Q0Q_3\to Q_2\to Q_1\to Q_0, and a 0 enters at the serial input end.
  3. The bit at the serial output appears one per clock pulse. For 4 bits, one load pulse and 3 shift pulses are needed to send the whole word out.

Example. Load D3D2D1D0=1011D_3D_2D_1D_0 = 1011.

ClockQ3Q2Q1Q0Q_3Q_2Q_1Q_0Serial out (Q0Q_0)
Load10111
101011
200100
300011

The output sequence is 1,1,0,11,1,0,1 (least significant bit first).

Applications. Converting parallel data from a computer into a serial stream for transmission (for example in UARTs and serial communication links), and serial output ports.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 7 marks

Design a 3-bit synchronous down ripple counter.

Answer

A synchronous counter applies the same clock to every flip-flop, so all flip-flops change state together. A 3-bit down counter counts 7,6,5,4,3,2,1,07,6,5,4,3,2,1,0 and then returns to 77 (modulo-8).

State table and JK excitation. Flip-flops Q2Q1Q0Q_2Q_1Q_0 (JK type) are used, with Q0Q_0 the least significant bit.

Present Q2Q1Q0Q_2Q_1Q_0Next Q2Q1Q0Q_2Q_1Q_0J2K2J_2K_2J1K1J_1K_1J0K0J_0K_0
111110X0X0X1
110101X0X11X
101100X00XX1
100011X11X1X
0110100XX0X1
0100010XX11X
0010000X0XX1
0001111X1X1X

K-map simplification gives:

J0=K0=1J_0 = K_0 = 1 J1=K1=Q0′J_1 = K_1 = Q_0' J2=K2=Q1′ Q0′J_2 = K_2 = Q_1'\,Q_0'

This follows the rule for a down counter: a bit toggles only when all lower bits are 0.

Circuit

  • Three JK flip-flops with a common clock.
  • J0=K0J_0=K_0 tied to logic 1.
  • J1=K1J_1=K_1 connected to Q0‾\overline{Q_0}.
  • J2=K2J_2=K_2 connected to the output of a 2-input AND gate whose inputs are Q1‾\overline{Q_1} and Q0‾\overline{Q_0}.

Check. From 100100: Q0Q_0 toggles to 1, Q1Q_1 toggles to 1 (since Q0′=1Q_0'=1), Q2Q_2 toggles to 0 (since Q1′Q0′=1Q_1'Q_0'=1), so the next state is 011011 as required.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 8 marks

What is status register? Explain about RAM.

Answer

Status register. A status register (also called flag register or condition code register) is a special register that stores single-bit flags describing the result of the last ALU operation. The flags are used by conditional branch instructions to decide the program flow. The common flags are:

  • C (carry): set to 1 when the operation produces a carry out of the most significant bit.
  • S (sign): copy of the most significant bit of the result; 1 means negative.
  • Z (zero): set to 1 when the result is zero.
  • V (overflow): set to 1 when signed overflow occurs, that is, when the carry into and the carry out of the sign bit differ.

Each flag is held in a flip-flop. After every arithmetic or logic operation they are updated automatically.

RAM (Random Access Memory). RAM is the main working memory of a computer. Data can be read from or written to any location directly, and the access time is the same for every location. Its main features are:

  • It is volatile: its contents are lost when the power is switched off.
  • It holds the programs and data currently being executed.
  • It has an address bus (to select a location), a data bus (to carry data), and control lines read/write and chip select.
  • A memory of 2k2^k words needs kk address lines.

Types of RAM

  • SRAM (static RAM): each bit is stored in a flip-flop (about six transistors). It is fast and needs no refreshing, but is costly and takes more space. It is used for cache memory.
  • DRAM (dynamic RAM): each bit is stored as charge on a capacitor with one transistor. It is cheaper and denser, but the charge leaks, so it must be refreshed periodically. It is used for main memory.

Operation. To read, the CPU places the address on the address bus and asserts the read signal, and the data appear on the data bus. To write, the CPU puts both the address and the data on the buses and asserts the write signal.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 5 marks

Write short notes on: Gray Code

Answer

Gray code is a non-weighted, unit-distance binary code in which two successive numbers differ in exactly one bit. It is also called the reflected binary code.

DecimalBinaryGray
0000000
1001001
2010011
3011010
4100110
5101111
6110101
7111100

Binary to Gray. The MSB is copied; each next Gray bit is the XOR of the corresponding binary bit and the binary bit to its left: Gi=Bi⊕Bi+1G_i = B_i \oplus B_{i+1}. Example: 10112→1, 1⊕0, 0⊕1, 1⊕1=11101011_2 \to 1,\ 1\oplus0,\ 0\oplus1,\ 1\oplus1 = 1110.

Gray to binary. The MSB is copied; each next binary bit is the XOR of the previous binary bit and the current Gray bit: Bi=Bi+1⊕GiB_i = B_{i+1} \oplus G_i.

Uses. Because only one bit changes at a time, it avoids errors in shaft-position encoders and rotary sensors, and is used in K-map labelling and in analog-to-digital converters.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 5 marks

Write short notes on: Postulates of boolean algebra

Answer

Boolean algebra is defined on a set {0,1}\{0,1\} with the operations OR (+), AND (·) and NOT ('). Huntington's postulates are the basic assumptions on which all theorems rest.

  1. Closure: the result of x+yx+y and x⋅yx\cdot y is again in the set {0,1}\{0,1\}.
  2. Identity elements: x+0=xx + 0 = x and x⋅1=xx\cdot 1 = x.
  3. Commutative law: x+y=y+xx+y=y+x and x⋅y=y⋅xx\cdot y=y\cdot x.
  4. Distributive law: x⋅(y+z)=xy+xzx\cdot(y+z) = xy + xz and x+yz=(x+y)(x+z)x + yz = (x+y)(x+z).
  5. Complement: for every xx there is x′x' such that x+x′=1x + x' = 1 and x⋅x′=0x\cdot x' = 0.
  6. Existence of at least two distinct elements (0≠10\neq1).

The postulates occur in dual pairs: interchanging OR with AND and 0 with 1 turns a true statement into another true statement (the principle of duality).

Useful theorems that follow: idempotent (x+x=xx+x=x, x⋅x=xx\cdot x=x), null (x+1=1x+1=1, x⋅0=0x\cdot0=0), involution (x′′=xx''=x), absorption (x+xy=xx+xy=x), associative law and De Morgan's laws.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Fall · 5 marks

Write short notes on: Maxterm vs Minterm

Answer

For nn variables there are 2n2^n standard terms.

Minterm. A minterm is a product (AND) term containing every variable exactly once, either complemented or uncomplemented. It equals 1 for exactly one input combination. A variable is written uncomplemented when its value is 1 and complemented when 0. For three variables, m5=AB′Cm_5 = AB'C (101).

Maxterm. A maxterm is a sum (OR) term containing every variable exactly once. It equals 0 for exactly one input combination. A variable is written uncomplemented when its value is 0 and complemented when 1. For three variables, M5=A′+B+C′M_5 = A' + B + C' (101).

PointMintermMaxterm
FormAND of literalsOR of literals
Value1 for one combination0 for one combination
Notationmim_iMiM_i
Used inSum of products (SOP), ∑m\sum mProduct of sums (POS), ∏M\prod M
Literal rule1 gives xx, 0 gives x′x'0 gives xx, 1 gives x′x'

They are complements of each other: Mi=mi′M_i = m_i'.

A function can be written as the sum of the minterms where it is 1, or as the product of the maxterms where it is 0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 8 marks

Convert the following:
(i) (0110.001)2=(?)gray(0110.001)_2 = (?)_{gray} (ii) (67.32)oct=(?)decimal(67.32)_{oct} = (?)_{decimal} (iii) (9432.78)decimal=(?)hex(9432.78)_{decimal} = (?)_{hex} (iv) (10011.011)=(?)oct(10011.011) = (?)_{oct}

Answer

(i) (0110.001)2→(0110.001)_2 \to Gray. Copy the MSB and XOR each bit with the bit to its left. Treating the whole string 01100010110001:

g1=0,  g2=0⊕1=1,  g3=1⊕1=0,  g4=1⊕0=1,  g5=0⊕0=0,  g6=0⊕0=0,  g7=0⊕1=1g_1 = 0,\; g_2 = 0\oplus1 = 1,\; g_3 = 1\oplus1 = 0,\; g_4 = 1\oplus0 = 1,\; g_5 = 0\oplus0 = 0,\; g_6 = 0\oplus0 = 0,\; g_7 = 0\oplus1 = 1

(0110.001)2=(0101.001)gray(0110.001)_2 = (0101.001)_{gray}

(ii) (67.32)8→(67.32)_8 \to decimal.

6×8+7×1+3×8−1+2×8−2=48+7+0.375+0.03125=55.406256\times8 + 7\times1 + 3\times8^{-1} + 2\times8^{-2} = 48 + 7 + 0.375 + 0.03125 = 55.40625

(67.32)8=(55.40625)10(67.32)_8 = (55.40625)_{10}

(iii) (9432.78)10→(9432.78)_{10} \to hex. Integer part, dividing by 16:

  • 9432=16×589+89432 = 16\times589 + 8
  • 589=16×36+13589 = 16\times36 + 13 (D)
  • 36=16×2+436 = 16\times2 + 4
  • 2=16×0+22 = 16\times0 + 2

Reading upward gives 24D824D8.

Fraction, multiplying by 16:

  • 0.78×16=12.480.78\times16 = 12.48 gives C
  • 0.48×16=7.680.48\times16 = 7.68 gives 7
  • 0.68×16=10.880.68\times16 = 10.88 gives A
  • 0.88×16=14.080.88\times16 = 14.08 gives E

(9432.78)10≈(24D8.C7AE)16(9432.78)_{10} \approx (24D8.C7AE)_{16}

(iv) (10011.011)2→(10011.011)_2 \to octal. Group in threes from the binary point: 010  011 . 011010\;011 \,.\, 011 gives 2  3 . 32\;3 \,.\, 3.

(10011.011)2=(23.3)8(10011.011)_2 = (23.3)_8

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 7 marks

Subtract using 1's and 2's complement method.
(i) 11011−011011011 - 0110 (ii) 1001−10101001 - 1010

Answer

Let MM be the minuend and SS the subtrahend. Both are written with the same number of bits.

(i) 11011−011011011 - 0110 (that is 27−627 - 6). Write the subtrahend as 0011000110.

1's complement method

  • 1's complement of 0011000110 is 1100111001.
  • Add: 11011+11001=1 1010011011 + 11001 = 1\,10100.
  • There is an end-around carry, so add it back: 10100+1=1010110100 + 1 = 10101.

2's complement method

  • 2's complement of 0011000110 is 11001+1=1101011001 + 1 = 11010.
  • Add: 11011+11010=1 1010111011 + 11010 = 1\,10101.
  • The carry is discarded, so the result is 1010110101.

Both give 10101=2110101 = 21, which is correct.

(ii) 1001−10101001 - 1010 (that is 9−109 - 10).

1's complement method

  • 1's complement of 10101010 is 01010101.
  • Add: 1001+0101=11101001 + 0101 = 1110.
  • There is no end-around carry, so the result is negative. Take the 1's complement of the sum: 00010001.
  • Result: −0001-0001.

2's complement method

  • 2's complement of 10101010 is 01100110.
  • Add: 1001+0110=11111001 + 0110 = 1111.
  • There is no carry, so the result is negative. Take the 2's complement of the sum: 00010001.
  • Result: −0001-0001.

Both give −1-1, which is correct.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 4+4 marks

State and prove De-Morgan's theorem with examples. "NAND gate is called universal gate." Justify this statement.

Answer

De Morgan's theorems

  1. The complement of a sum equals the product of the complements: (A+B)′=A′⋅B′(A+B)' = A'\cdot B'
  2. The complement of a product equals the sum of the complements: (AB)′=A′+B′(AB)' = A' + B'

Proof by truth table

AABBA+BA+B(A+B)′(A+B)'A′A'B′B'A′B′A'B'ABAB(AB)′(AB)'A′+B′A'+B'
0001111011
0110100011
1010010011
1110000100

The columns (A+B)′(A+B)' and A′B′A'B' are identical, and the columns (AB)′(AB)' and A′+B′A'+B' are identical, so both theorems hold.

Example. (A+BC)′=A′(BC)′=A′(B′+C′)(A + BC)' = A'(BC)' = A'(B' + C').

NAND is a universal gate. A universal gate can implement every other gate, and so any Boolean function. NAND is (AB)′(AB)'.

  • NOT: tie the inputs together: (A⋅A)′=A′(A\cdot A)' = A'.
  • AND: a NAND followed by a NOT (NAND with tied inputs): ((AB)′)′=AB((AB)')' = AB.
  • OR: invert each input and then NAND them. By De Morgan, (A′B′)′=A+B(A'B')' = A + B.

Since AND, OR and NOT are sufficient to build any logic function, and all three can be made from NAND gates only, NAND is a universal gate. (NOR is universal in the same way.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 7 marks

Simplify the given function using k-map and realize the expression using NAND gate only.
F=∑(0,2,4,6,7,9,15)F = \sum(0,2,4,6,7,9,15), D=∑(1,3,8,11,12,13)D = \sum(1,3,8,11,12,13)

Answer

K-map (rows ABAB, columns CDCD; X = don't care). Minterms F=∑(0,2,4,6,7,9,15)F=\sum(0,2,4,6,7,9,15), don't cares D=∑(1,3,8,11,12,13)D=\sum(1,3,8,11,12,13).

AB\CDAB \backslash CD00011110
001 (0)X (1)X (3)1 (2)
011 (4)0 (5)1 (7)1 (6)
11X (12)X (13)1 (15)0 (14)
10X (8)1 (9)X (11)0 (10)

Groups

  • m0,m2,m4,m6m_0,m_2,m_4,m_6 (columns 00 and 10 of rows 00 and 01) gives A′D′A'D'.
  • m2,m3,m6,m7m_2,m_3,m_6,m_7 gives A′CA'C.
  • m9,m11,m13,m15m_9,m_{11},m_{13},m_{15} gives ADAD.

All the ones are covered: 0,2,4,60,2,4,6 by A′D′A'D'; 77 by A′CA'C; 9,159,15 by ADAD.

F=A′D′+A′C+ADF = A'D' + A'C + AD

NAND-only realisation. A two-level AND-OR network becomes a two-level NAND-NAND network, because by De Morgan

F=[(A′D′)′⋅(A′C)′⋅(AD)′]′F = \big[(A'D')'\cdot(A'C)'\cdot(AD)'\big]'

Circuit:

  1. Inverters (NAND gates with tied inputs) for A′A' and D′D'.
  2. Three 2-input NAND gates producing (A′D′)′(A'D')', (A′C)′(A'C)' and (AD)′(AD)'.
  3. A 3-input NAND gate that takes these three outputs and gives FF.

This needs 2 inverters, 3 two-input NAND gates and 1 three-input NAND gate.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 7 marks

Design a full adder circuit with required logic diagram.

Answer

A full adder adds three bits AA, BB and the carry-in CinC_{in}, and gives a sum SS and a carry-out CoutC_{out}.

Truth table

AABBCinC_{in}SSCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111

Simplification. From the K-maps:

S=A′B′Cin+A′BCin′+AB′Cin′+ABCin=A⊕B⊕CinS = A'B'C_{in} + A'BC_{in}' + AB'C_{in}' + ABC_{in} = A\oplus B\oplus C_{in}

Cout=AB+BCin+ACin=AB+Cin(A⊕B)C_{out} = AB + BC_{in} + AC_{in} = AB + C_{in}(A\oplus B)

Logic diagram.

  1. XOR gate 1: inputs AA, BB, output A⊕BA\oplus B.
  2. XOR gate 2: inputs A⊕BA\oplus B and CinC_{in}, output SS.
  3. AND gate 1: inputs AA, BB, output ABAB.
  4. AND gate 2: inputs A⊕BA\oplus B and CinC_{in}, output Cin(A⊕B)C_{in}(A\oplus B).
  5. OR gate: inputs from the two AND gates, output CoutC_{out}.

This is two half adders (XOR plus AND each) joined by an OR gate. The circuit uses 2 XOR, 2 AND and 1 OR gate. Its delay is two XOR levels for the sum and about three gate levels for the carry.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 8 marks

Design a combinational logic circuit that converts a decimal digit from BCD code to Excess-3 code.

Answer

Principle. Excess-3 code of a decimal digit is the BCD value plus 3 (00110011). BCD inputs are A B C DA\,B\,C\,D (AA is the MSB) and the Excess-3 outputs are w x y zw\,x\,y\,z. The input combinations 10101010 to 11111111 do not occur in BCD, so they are don't cares.

Truth table

DigitABCDABCDwxyzwxyz
000000011
100010100
200100101
300110110
401000111
501011000
601101001
701111010
810001011
910011100

K-map simplification (decimal value of ABCDABCD as minterm, don't cares d(10,11,12,13,14,15)d(10,11,12,13,14,15)):

  • w=∑m(5,6,7,8,9)w = \sum m(5,6,7,8,9). Groups: m8,m9,m10,…,m15m_8,m_9,m_{10},\ldots,m_{15} gives AA; m6,m7,m14,m15m_6,m_7,m_{14},m_{15} gives BCBC; m5,m7,m13,m15m_5,m_7,m_{13},m_{15} gives BDBD.
  • x=∑m(1,2,3,4,9)x = \sum m(1,2,3,4,9). Groups: m2,m3,m10,m11m_2,m_3,m_{10},m_{11} gives B′CB'C; m1,m3,m9,m11m_1,m_3,m_9,m_{11} gives B′DB'D; m4,m12m_4,m_{12} gives BC′D′BC'D'.
  • y=∑m(0,3,4,7,8)y = \sum m(0,3,4,7,8). Groups: m0,m4,m8,m12m_0,m_4,m_8,m_{12} gives C′D′C'D'; m3,m7,m11,m15m_3,m_7,m_{11},m_{15} gives CDCD.
  • z=∑m(0,2,4,6,8)z = \sum m(0,2,4,6,8). The group of all even minterms gives D′D'.

w=A+BC+BDw = A + BC + BD x=B′C+B′D+BC′D′x = B'C + B'D + BC'D' y=CD+C′D′y = CD + C'D' z=D′z = D'

Check. Digit 4 (ABCD=0100ABCD=0100): w=0w=0, x=BC′D′=1x = BC'D' = 1, y=C′D′=1y = C'D' = 1, z=1z = 1, giving 01110111 as required. Digit 9 (10011001): w=1w=1, x=B′D=1x = B'D = 1, y=0y = 0, z=0z = 0, giving 11001100 as required.

Circuit. Inverters for B′,C′,D′B', C', D'; AND gates for BCBC, BDBD, B′CB'C, B′DB'D, BC′D′BC'D', CDCD, C′D′C'D'; OR gates for ww, xx and yy (yy is also the XNOR of CC and DD); and z=D′z = D' taken directly from an inverter.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 2+5 marks

Differentiate between flip-flop and latch. Explain the operation of J-K flip-flop with circuit diagram, characteristics table, characteristics equation.

Answer

Flip-flop vs latch

LatchFlip-flop
Level-sensitive: output can change as long as the enable/clock level is activeEdge-triggered: output changes only at a clock edge (rising or falling)
Has no clock, or uses an enable signalAlways has a clock input
Simple, uses fewer gatesMore complex (often two latches, master and slave)
Output may change several times during one enable pulseOutput changes once per clock edge
Example: SR latch, D latchExample: JK, D, T flip-flop

J-K flip-flop. The JK flip-flop removes the invalid state of the SR flip-flop: JJ acts like Set, KK like Reset, and J=K=1J=K=1 makes the output toggle.

Circuit. It is an SR flip-flop with two extra AND gates (two 3-input NAND gates in the NAND version) at the inputs. The first gate receives JJ, CLKCLK and Qˉ\bar{Q} and gives SS; the second receives KK, CLKCLK and QQ and gives RR. The outputs QQ and Qˉ\bar{Q} are fed back to the input gates. In practice it is made edge-triggered (master-slave), so that it does not race when J=K=1J=K=1.

Characteristic table

JJKKQ(t+1)Q(t+1)Operation
00Q(t)Q(t)No change
010Reset
101Set
11Q(t)‾\overline{Q(t)}Toggle

Characteristic equation

From the K-map of Q(t+1)Q(t+1) in terms of JJ, KK and QQ:

Q(t+1)=J Q‾+K‾ QQ(t+1) = J\,\overline{Q} + \overline{K}\,Q

Excitation table (needed for design):

Q(t)→Q(t+1)Q(t)\to Q(t+1)JJKK
0 to 00X
0 to 11X
1 to 0X1
1 to 1X0

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 7 marks

Describe in detail about the SIPO register with necessary diagrams also applications of register.

Answer

A SIPO (Serial-In Parallel-Out) shift register receives data one bit at a time at a serial input and makes all stored bits available together at parallel outputs.

Structure (4-bit). Four D flip-flops are connected in cascade with a common clock. The serial input DinD_{in} goes to the D input of FF3FF_3, and Q3→D2Q_3\to D_2, Q2→D1Q_2\to D_1, Q1→D0Q_1\to D_0. The outputs Q3Q2Q1Q0Q_3Q_2Q_1Q_0 are the parallel outputs.

Operation. On each clock pulse every bit moves one position to the right and a new serial bit enters at the left. After 4 clock pulses the 4-bit word is stored in the register and can be read in parallel.

Example: serial input 1,0,1,11,0,1,1 (first bit first), register initially 0000.

ClockDinD_{in}Q3Q2Q1Q0Q_3Q_2Q_1Q_0
0-0000
111000
200100
311010
411101

After four pulses the parallel output is 11011101, with the first bit received in the Q0Q_0 position.

Applications of shift registers

  • Serial-to-parallel conversion, for example in serial communication receivers.
  • Parallel-to-serial conversion (PISO) for transmission.
  • Temporary data storage.
  • Time delay of digital signals (delay lines).
  • Multiplication and division by 2 (shift left or right).
  • Building ring counters and Johnson counters, and sequence generators.
  • Used in keyboards, LED displays and arithmetic units to hold operands.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 7 marks

Design a 4 bits arithmetic circuit that performs eight different operations.

Answer

The basic idea is to use one 4-bit parallel (full-adder) adder and control its second input YY with selection lines S1,S0S_1,S_0, together with the carry input CinC_{in}. With X=AX = A always, the output is D=A+Y+CinD = A + Y + C_{in}.

Block

  • Four full adders FA0…FA3FA_0 \ldots FA_3 connected as a ripple-carry adder.
  • Inputs: A3…A0A_3\ldots A_0 go straight to the XX inputs of the full adders.
  • For each bit ii, a 4-to-1 multiplexer chooses YiY_i from BiB_i, Bi‾\overline{B_i}, 0 and 1, selected by S1S0S_1S_0.
  • CinC_{in} goes to the first adder. The carry-out is CoutC_{out}.

Function table

S1S_1S0S_0CinC_{in}YYOutput DDOperation
000BBA+BA+BAdd
001BBA+B+1A+B+1Add with carry
010B‾\overline{B}A+B‾A+\overline{B}Subtract with borrow
011B‾\overline{B}A+B‾+1A+\overline{B}+1Subtract (A−BA-B)
1000AATransfer AA
1010A+1A+1Increment
110all 1sA−1A-1Decrement
111all 1sAATransfer AA

In the last row, adding all 1s (that is −1-1 in 2's complement) plus carry 1 gives A−1+1=AA-1+1 = A.

Input logic. The multiplexer for each bit is equivalent to

Yi=Bi S1‾ S0‾+Bi‾ S1‾ S0+S1 S0Y_i = B_i\,\overline{S_1}\,\overline{S_0} + \overline{B_i}\,\overline{S_1}\,S_0 + S_1\,S_0

Select 00 gives BiB_i, 01 gives Bi‾\overline{B_i}, 10 gives 0 and 11 gives 1.

Working. Subtraction uses 2's complement: A−B=A+B‾+1A - B = A + \overline{B} + 1. Incrementing and decrementing use Y=0Y=0 with Cin=1C_{in}=1, and Y=1111Y=1111 (that is −1-1), respectively. All eight operations are obtained from the same adder just by changing the three control inputs S1,S0,CinS_1,S_0,C_{in}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 8 marks

Explain processor organization and bus organization with required block diagram.

Answer

Processor organization. The processor (CPU) is built around a set of registers, an ALU, and a control unit. The internal organization decides how registers are connected to the ALU and how data move between them. There are three common forms:

  1. Single accumulator organization: one main register (accumulator) holds one operand and receives the result. Instructions are short, but the processor is slow because every operation uses the accumulator.
  2. General register organization: a set of registers R1…RnR_1\ldots R_n connected to the ALU through multiplexers (buses). Any register can be an operand source or the destination.
  3. Stack organization: operands are taken from, and results pushed to, a stack in memory (LIFO).

General register organization (block diagram, in words).

  • Registers R1,R2,…,R7R_1,R_2,\ldots,R_7 and the input register.
  • Two multiplexers (MUX A and MUX B) select the two ALU operands from the registers.
  • The ALU performs the operation chosen by the operation-select code (OPR).
  • The ALU output goes to the destination register chosen by a decoder, which enables the load input of only that register.
  • A control word of fields SELA, SELB, SELD and OPR (for example 3+3+3+5 bits = 14 bits) defines one micro-operation.

Example: R1←R2+R3R1 \leftarrow R2 + R3 uses SELA = R2, SELB = R3, SELD = R1, OPR = ADD.

Bus organization. A bus is a common set of lines through which several registers exchange data. Instead of separate connections between every pair of registers, all registers are tied to a shared bus.

  • Common bus system: each register output is connected to a multiplexer (or three-state buffer) feeding the bus. Select lines S2S1S0S_2S_1S_0 choose which register places its data on the bus. The destination register is enabled by its load (LD) control and takes the data at the clock pulse. Only one transfer can occur per clock pulse.
  • Two-bus and three-bus organization: a two-bus processor lets both operands be read together; a three-bus processor has two input buses to the ALU and one output bus back to the registers, so an operation such as R3←R1+R2R3 \leftarrow R1 + R2 completes in a single clock cycle.

Advantages: fewer connections, simple control, scalable. Disadvantage of a single bus: only one transfer at a time, so it is slower.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 5 marks

Write short notes on: Error detection and correction code

Answer

Errors can occur when binary data are stored or transmitted, because noise can flip a bit. Error codes add extra (redundant) bits so that errors can be detected, and in some codes corrected.

Parity bit (error detection). An extra bit is added so that the total number of 1s is even (even parity) or odd (odd parity).

  • Example (even parity): data 10110011011001 has four 1s, so the parity bit is 00 and the word sent is 1011001010110010 (parity at the end). Data 10110111011011 has five 1s, so the parity bit is 11.
  • The receiver counts the 1s; a wrong parity means an error.
  • A single parity bit detects any odd number of bit errors but cannot locate the error, and cannot detect two errors at once.

Hamming code (detection and correction). Parity bits are placed at positions that are powers of 2 (1,2,4,8,…1,2,4,8,\ldots) and each covers a set of bit positions. For mm data bits we need kk parity bits with 2k≥m+k+12^k \ge m + k + 1. For a 4-bit data word, k=3k = 3, so the total length is 7 bits (the (7,4) code).

At the receiver the parity checks are recomputed, giving a kk-bit syndrome. If it is 000000, there is no error; otherwise its value is the position of the erroneous bit, which is then complemented. The code corrects any single-bit error. With an additional overall parity bit it also detects double-bit errors.

Other codes: checksums and cyclic redundancy check (CRC) are used for detecting errors in larger blocks of data.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 5 marks

Write short notes on: K-Map for 3 logical variables

Answer

The Karnaugh map (K-map) is a graphical method for simplifying Boolean expressions. For 3 variables A,B,CA,B,C it has 23=82^3=8 cells, normally drawn as 2 rows by 4 columns (or 4 by 2).

Layout. The row is AA (0 or 1) and the columns are BCBC in Gray code order: 00,01,11,1000,01,11,10, so that adjacent cells differ in only one variable.

A\BCA \backslash BC00011110
0m0m_0m1m_1m3m_3m2m_2
1m4m_4m5m_5m7m_7m6m_6

Procedure

  1. Place a 1 in each cell for which the function is 1 (from the truth table or minterm list).
  2. Group adjacent 1s in rectangles of size 1, 2, 4 or 8 (powers of 2). Groups may wrap around the edges (the first and last columns are adjacent) and may overlap.
  3. Use the largest groups possible and as few groups as possible.
  4. Each group gives a product term that contains only the variables that stay constant over the group. A group of 2 eliminates one variable, a group of 4 eliminates two variables, and a group of 8 gives 1.
  5. OR the terms to get the minimal sum of products (SOP).

Example. F=∑m(1,3,5,7)F = \sum m(1,3,5,7) gives a group of four (all cells with C=1C=1), so F=CF = C. Another: F=∑m(0,2,4,6)F=\sum m(0,2,4,6) gives F=C′F = C'.

Don't-care cells (X) may be used in a group if this makes it bigger. Grouping the 0s gives the product-of-sums (POS) form.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Spring · 5 marks

Write short notes on: Clock triggering

Answer

In a synchronous sequential circuit the flip-flops change state only when the clock signal tells them to. Triggering is the way the clock pulse causes the change.

Level triggering. The flip-flop responds as long as the clock is at a particular level (high or low). While the level is active the output can change several times if the input changes. This causes problems such as the race-around condition in a JK flip-flop. Latches are level-triggered.

Edge triggering. The flip-flop responds only at a transition of the clock:

  • Positive (rising) edge triggering: the state changes at the 0→10\to1 transition.
  • Negative (falling) edge triggering: the state changes at the 1→01\to0 transition. A bubble at the clock input of the symbol shows this.

The inputs are sampled just at the edge, and the output cannot change again until the next edge, so race-around is avoided.

Pulse triggering (master-slave). The input is accepted by the master during one level of the clock, and the output is passed on from the slave at the opposite level or at the edge.

Implementation of edge triggering: a short pulse is derived from the clock using an edge-detector circuit (a delay and an AND gate), or it is obtained by the master-slave arrangement.

Importance. Edge triggering makes the design of counters, registers and state machines reliable, since all flip-flops change together at a well-defined instant.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 10 marks

Perform the conversion as indicated:
(i) (2421)10=( )8(2421)_{10} = (\ )_8 (ii) (211.0231)8=( )10(211.0231)_8 = (\ )_{10} (iii) (10001.1100111)2=( )16(10001.1100111)_2 = (\ )_{16} (iv) (878)10=( )2=(878)_{10} = (\ )_2 = (gray code)

Answer

(i) (2421)10→(2421)_{10} \to octal. Divide repeatedly by 8:

  • 2421=8×302+52421 = 8\times302 + 5
  • 302=8×37+6302 = 8\times37 + 6
  • 37=8×4+537 = 8\times4 + 5
  • 4=8×0+44 = 8\times0 + 4

Reading upward gives

(2421)10=(4565)8(2421)_{10} = (4565)_8

Check: 4⋅512+5⋅64+6⋅8+5=2048+320+48+5=24214\cdot512+5\cdot64+6\cdot8+5 = 2048+320+48+5 = 2421.

(ii) (211.0231)8→(211.0231)_8 \to decimal.

Integer part: 2×64+1×8+1=1372\times64 + 1\times8 + 1 = 137.

Fraction: 0×8−1+2×8−2+3×8−3+1×8−4=0.03125+0.005859375+0.000244140625=0.0373535156250\times8^{-1} + 2\times8^{-2} + 3\times8^{-3} + 1\times8^{-4} = 0.03125 + 0.005859375 + 0.000244140625 = 0.037353515625

(211.0231)8=(137.037353515625)10≈137.0374(211.0231)_8 = (137.037353515625)_{10} \approx 137.0374

(iii) (10001.1100111)2→(10001.1100111)_2 \to hex. Group in fours from the binary point, padding with zeros:

Integer: 0001  00010001\;0001 gives 1111. Fraction: 1100  11101100\;1110 gives CECE.

(10001.1100111)2=(11.CE)16(10001.1100111)_2 = (11.CE)_{16}

(iv) (878)10→(878)_{10} \to binary →\to Gray.

878=512+256+64+32+8+4+2878 = 512+256+64+32+8+4+2, so the binary number is

(878)10=(1101101110)2(878)_{10} = (1101101110)_2

Gray code: copy the MSB, then XOR each pair of adjacent bits:

1, 1⊕1=0, 1⊕0=1, 0⊕1=1, 1⊕1=0, 1⊕0=1, 0⊕1=1, 1⊕1=0, 1⊕1=0, 1⊕0=11,\ 1\oplus1=0,\ 1\oplus0=1,\ 0\oplus1=1,\ 1\oplus1=0,\ 1\oplus0=1,\ 0\oplus1=1,\ 1\oplus1=0,\ 1\oplus1=0,\ 1\oplus0=1

(1101101110)2=(1011011001)gray(1101101110)_2 = (1011011001)_{gray}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 5 marks

State and prove de-Morgan's law.

Answer

Statement of De Morgan's laws

  1. (A+B)′=A′⋅B′(A+B)' = A'\cdot B': the complement of a sum is the product of the complements.
  2. (A⋅B)′=A′+B′(A\cdot B)' = A'+B': the complement of a product is the sum of the complements.

They extend to any number of variables: (A+B+C)′=A′B′C′(A+B+C)' = A'B'C' and (ABC)′=A′+B′+C′(ABC)' = A'+B'+C'.

Proof (truth table)

AABB(A+B)′(A+B)'A′B′A'B'(AB)′(AB)'A′+B′A'+B'
001111
010011
100011
110000

The columns for (A+B)′(A+B)' and A′B′A'B' are identical, and so are those for (AB)′(AB)' and A′+B′A'+B'. Hence both laws are proved.

Algebraic proof of law 1. Two elements are complements of each other if their sum is 1 and their product is 0. Take X=A+BX = A+B and Y=A′B′Y = A'B'.

  • X+Y=(A+B)+A′B′=(A+B+A′)(A+B+B′)=1⋅1=1X + Y = (A+B) + A'B' = (A+B+A')(A+B+B') = 1\cdot1 = 1 (distributive law).
  • X⋅Y=(A+B)A′B′=AA′B′+BA′B′=0+0=0X \cdot Y = (A+B)A'B' = AA'B' + BA'B' = 0 + 0 = 0.

Since the sum is 1 and the product is 0, A′B′A'B' is the complement of A+BA+B, so (A+B)′=A′B′(A+B)' = A'B'. Law 2 follows by duality.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 5 marks

Define Logic gate. Prove that NAND and NOR are universal gates.

Answer

Logic gate. A logic gate is a basic digital circuit that has one or more inputs and one output and performs a Boolean operation on the inputs (AND, OR, NOT, NAND, NOR, XOR, XNOR). Its inputs and output take the values 0 and 1.

Universal gates. A gate is universal if AND, OR and NOT (and therefore any Boolean function) can be built using only that gate. NAND and NOR are universal gates.

NAND as a universal gate (NAND(A,B)=(AB)′\text{NAND}(A,B) = (AB)')

  • NOT: connect both inputs together, (A⋅A)′=A′(A\cdot A)' = A'.
  • AND: NAND followed by a NOT, ((AB)′)′=AB((AB)')' = AB.
  • OR: NOT on each input and then NAND, (A′B′)′=A+B(A'B')' = A+B (De Morgan).

NOR as a universal gate (NOR(A,B)=(A+B)′\text{NOR}(A,B) = (A+B)')

  • NOT: connect both inputs together, (A+A)′=A′(A+A)' = A'.
  • OR: NOR followed by a NOT, ((A+B)′)′=A+B((A+B)')' = A+B.
  • AND: NOT on each input and then NOR, (A′+B′)′=AB(A'+B')' = AB (De Morgan).

Because NOT, AND and OR can all be realised from NAND alone, and also from NOR alone, both are universal gates. Any sum-of-products expression can therefore be implemented as a two-level NAND-NAND circuit, and any product-of-sums expression as a NOR-NOR circuit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 10 marks

Use k-map to simplify the given function and realize using basic gates only.
F=π(1,4,6,8,10,12,14)F = \pi(1,4,6,8,10,12,14) and D=π(0,9,15)D = \pi(0,9,15)

Answer

Given: F=∏M(1,4,6,8,10,12,14)F=\prod M(1,4,6,8,10,12,14) with don't cares D=∏M(0,9,15)D=\prod M(0,9,15).

So the function is 0 at minterms 1,4,6,8,10,12,141,4,6,8,10,12,14; it is a don't care at 0,9,150,9,15; and it is 1 at 2,3,5,7,11,132,3,5,7,11,13.

K-map (rows ABAB, columns CDCD):

AB\CDAB \backslash CD00011110
00X (0)0 (1)1 (3)1 (2)
010 (4)1 (5)1 (7)0 (6)
110 (12)1 (13)X (15)0 (14)
100 (8)X (9)1 (11)0 (10)

Grouping the 0s (for the product-of-sums form), using the don't cares:

  • m0,m1,m8,m9m_0,m_1,m_8,m_9 gives B′C′B'C'.
  • m8,m10,m12,m14m_8,m_{10},m_{12},m_{14} gives AD′AD'.
  • m4,m6,m12,m14m_4,m_6,m_{12},m_{14} gives BD′BD'.

All the zeros 1,4,6,8,10,12,141,4,6,8,10,12,14 are covered.

F′=B′C′+AD′+BD′F' = B'C' + AD' + BD'

Complementing and applying De Morgan:

F=(B+C)(A′+D)(B′+D)F = (B + C)(A' + D)(B' + D)

Check. Minterm 2 (00100010): (0+1)(1+0)(1+0)=1(0+1)(1+0)(1+0)=1. Minterm 5 (01010101): (1+0)(1+1)(0+1)=1(1+0)(1+1)(0+1) = 1. Minterm 4 (01000100): (B+C)=1(B+C)=1, (A′+D)=1(A'+D)=1, (B′+D)=0+0=0(B'+D) = 0+0 = 0, so F=0F=0.

Realisation with basic gates

  1. Three OR gates: B+CB+C, A′+DA'+D and B′+DB'+D.
  2. One 3-input AND gate whose inputs are the three OR outputs, giving FF.
  3. Two NOT gates for A′A' and B′B'.

This is a total of 2 NOT, 3 OR and 1 AND gate.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 8 marks

Design a combinational circuit that converts a four-bit Gray code to a four bit binary number. Implement the circuit with Exclusive OR gates.

Answer

Let the Gray inputs be G3G2G1G0G_3G_2G_1G_0 and the binary outputs be B3B2B1B0B_3B_2B_1B_0.

Truth table

G3G2G1G0G_3G_2G_1G_0B3B2B1B0B_3B_2B_1B_0G3G2G1G0G_3G_2G_1G_0B3B2B1B0B_3B_2B_1B_0
0000000011001000
0001000111011001
0011001011111010
0010001111101011
0110010010101100
0111010110111101
0101011010011110
0100011110001111

K-map simplification of each output gives (each map is a checkerboard of XOR patterns):

B3=G3B_3 = G_3 B2=G3′G2+G3G2′=G3⊕G2B_2 = G_3'G_2 + G_3G_2' = G_3 \oplus G_2 B1=G3⊕G2⊕G1B_1 = G_3\oplus G_2\oplus G_1 B0=G3⊕G2⊕G1⊕G0B_0 = G_3\oplus G_2\oplus G_1\oplus G_0

The result can be written in a chain: B3=G3B_3 = G_3, B2=B3⊕G2B_2 = B_3\oplus G_2, B1=B2⊕G1B_1 = B_2\oplus G_1, B0=B1⊕G0B_0 = B_1\oplus G_0.

Circuit (3 XOR gates)

  1. B3B_3 is connected directly to G3G_3.
  2. XOR gate 1: inputs B3B_3 and G2G_2 gives B2B_2.
  3. XOR gate 2: inputs B2B_2 and G1G_1 gives B1B_1.
  4. XOR gate 3: inputs B1B_1 and G0G_0 gives B0B_0.

Check. Gray 11011101: B3=1B_3=1, B2=1⊕1=0B_2=1\oplus1=0, B1=0⊕0=0B_1=0\oplus0=0, B0=0⊕1=1B_0=0\oplus1=1, giving 10011001, which agrees with the table.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 7 marks

Explain triggering of flip-flop in detail with example.

Answer

A flip-flop is a clocked circuit, so the way in which the clock makes it change state is called triggering. There are the following types.

1. Level triggering. The flip-flop is enabled for the whole time the clock is at a given level (high level or low level).

  • The inputs are accepted for as long as the level is active, so the output can change more than once in one clock pulse if the inputs change.
  • For a JK flip-flop with J=K=1J=K=1 and a wide pulse, the output toggles repeatedly. This is the race-around condition.
  • Example: gated SR latch, D latch.

2. Edge triggering. The flip-flop responds only at the instant of a clock transition.

  • Positive edge triggered: the output changes on the 0→10\to1 transition.
  • Negative edge triggered: the output changes on the 1→01\to0 transition; a small circle (bubble) is drawn at the clock input.
  • The inputs are sampled only at the edge, so there is no race-around. Almost all counters and registers use edge-triggered flip-flops.
  • Example: edge-triggered D flip-flop with Q(t+1)=DQ(t+1)=D. If D=1D=1 and the rising edge arrives, QQ becomes 1 and remains 1 even if DD changes to 0 later in the same pulse.

3. Master-slave (pulse) triggering. Two latches are connected in series. The master is enabled while the clock is high and the slave while it is low (through an inverter). The inputs are accepted by the master while the clock is high, and the output changes when the clock falls, so the output does not change while the inputs are being read. This also avoids race-around.

Comparison

TypeOutput changesProblem
LevelDuring the whole active levelRace-around, noise sensitive
EdgeAt the clock edge onlyNone
Master-slaveAt the falling edge of the pulseSlower, needs two stages

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 7 marks

Describe about processor bus organization in digital system.

Answer

Bus. A bus is a set of common lines (a group of wires) used to transfer binary information between registers, memory and I/O units, so that separate connections between every pair of devices are not needed.

Processor bus organization. Inside the processor, the registers R1,R2,…R_1,R_2,\ldots, the ALU and the accumulator are connected through one or more internal buses.

Single-bus organization

  • All registers and the ALU share one common bus.
  • The output of any register is placed on the bus through a multiplexer or three-state buffers, chosen by select lines.
  • The destination register loads the bus value at the clock pulse, using its load (LD) control.
  • Because the ALU needs two operands but only one can be on the bus at a time, an extra temporary register (Y) holds the first operand while the second is on the bus, and the result is held in a register Z before it is moved to the destination.
  • Example: R3←R1+R2R3 \leftarrow R1 + R2 takes three steps: (R1outR1_{out}, YinY_{in}), (R2outR2_{out}, ADD, ZinZ_{in}), (ZoutZ_{out}, R3inR3_{in}).

Two-bus and three-bus organization

  • Two buses: one operand can come on each bus, so the temporary register for an operand is not needed.
  • Three buses: two input buses carry both operands to the ALU and the third carries the result back to the registers. An operation such as R3←R1+R2R3\leftarrow R1+R2 then completes in a single clock cycle, so this is the fastest, but it needs more hardware.

Control. The control unit supplies the select signals (SELA, SELB for the sources, SELD for the destination) and the ALU function code.

Bus system with multiplexers. For an nn-bit register bus of kk registers, nn multiplexers of kk inputs each are used, with log⁡2k\log_2 k select lines.

The memory and I/O are connected to the processor in the same way, through the external address, data and control buses.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 5 marks

Write short notes on: Master-slave flipflop

Answer

A master-slave flip-flop is made from two flip-flops (latches) connected in series: a master and a slave. The slave receives the clock through an inverter, so the two are enabled at opposite clock levels. It is used to avoid the race-around condition of a level-triggered JK flip-flop.

Construction. Two gated SR (or JK) latches are connected so that the outputs of the master feed the inputs of the slave. The external inputs (JJ, KK) go to the master; the final outputs QQ, Q‾\overline{Q} are taken from the slave, and they are fed back to the master inputs.

Operation

  1. Clock = 1: the master is enabled and follows the inputs; the slave is disabled (clock inverted), so the output QQ does not change.
  2. Clock falls to 0: the master is disabled and keeps the value it stored; the slave is enabled and copies the master's output, so QQ takes the new value.

Thus the output changes only once per clock cycle, at the falling edge, and changes at the output do not reach the master within the same pulse. For J=K=1J=K=1 the output toggles exactly once per pulse, so there is no race-around.

Characteristic table: same as the JK flip-flop: 0000 no change, 0101 reset, 1010 set, 1111 toggle.

Disadvantage: it needs twice as many gates as a single latch, and it is slower. It is also sensitive to input changes (ones catching) while the clock is high. These are overcome in edge-triggered flip-flops.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 5 marks

Write short notes on: Excess-3 code

Answer

Excess-3 code is a non-weighted, self-complementing BCD code for decimal digits. Each digit is coded as the 4-bit binary of the digit plus 3.

DigitBCDExcess-3
000000011
100010100
200100101
300110110
401000111
501011000
601101001
701111010
810001011
910011100

Properties

  • It is non-weighted, so the position of a bit has no fixed weight.
  • It is self-complementing: the 1's complement of the code of a digit is the code of its 9's complement. For example, digit 2 is 01010101, and its complement 10101010 is the code of 7, which is 9−29-2. This makes subtraction by 9's complement simple.
  • The codes 0000,0001,0010,1101,1110,11110000,0001,0010,1101,1110,1111 are unused (invalid).
  • There is no all-zero code, so a failure of a line (all zeros) can be detected.

Example. (25)10(25)_{10} is 0101  10000101\;1000 in Excess-3. Excess-3 addition: add the codes, and if there is a carry add 3 to the group, else subtract 3.

Uses. In early decimal arithmetic circuits, because of the simple 9's complement and the easy carry generation.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2021 Fall · 5 marks

Write short notes on: Application of K-map

Answer

The Karnaugh map is a tool for simplifying Boolean expressions and for designing logic circuits. Its main applications are:

  1. Minimisation of Boolean functions: it gives the minimal sum-of-products (SOP) or product-of-sums (POS) form directly, with fewer gates and fewer inputs per gate, which reduces cost, size, power and delay.
  2. Design of combinational circuits: adders, subtractors, code converters (BCD to Excess-3, Gray to binary), decoders, multiplexers and comparators are simplified with K-maps (for 3, 4 and up to about 5 or 6 variables).
  3. Design of sequential circuits: the flip-flop input equations (JJ, KK, DD, TT) and the output equations obtained from state tables are simplified with K-maps, for counters and registers.
  4. Use of don't-care conditions: unused input combinations can be marked X and included in groups to get simpler expressions.
  5. Hazard detection: adjacent groups that are not overlapped show where static hazards may occur, and an extra term can be added to remove them.
  6. Conversion between forms: the SOP and POS forms, and NAND-only or NOR-only implementations, can be written from the same map.
  7. Verification: two expressions can be shown to be equivalent by plotting both on a K-map.

It is simpler and less error-prone than algebraic simplification, but it is practical only for a small number of variables; for more variables the Quine-McCluskey method is used.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from PU BCA 2025 Spring Computer Fundamentals and Application (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Computer Fundamentals and Application (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2023), PU BCA 2021 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2021), PU BCA 2025 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2023), PU BCA 2021 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2021), PU BCA 2021 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2021), PU BCA 2025 Spring English for IT Professionals (New) (Pokhara University BCA, Spring 2025, new syllabus), PU BCA 2024 Fall English for IT Professionals (New) (Pokhara University BCA, Fall 2024, new syllabus), PU BCA 2024 Spring English for IT Professionals (Pokhara University BCA, Spring 2024), PU BCA 2023 Fall English for IT Professionals (Pokhara University BCA, Fall 2023), PU BCA 2021 Spring English (Pokhara University BCA, Spring 2021), PU BCA 2021 Fall English (Pokhara University BCA, Fall 2021), PU BCA 2025 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2023), PU BCA 2023 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2023), PU BCA 2021 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2021), PU BCA 2021 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2021), PU BCA 2025 Spring (New) Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2025, new syllabus), PU BCA 2025 Spring (Old) Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2025, old syllabus), PU BCA 2023 Fall Programming Logic and Technique (Pokhara University BCA semester exam, Fall 2023) and PU BCA 2024 Spring Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2024). Answers are written for this site; check them against your class notes.