Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the signed magnitude, 1's complement and 2's complement number representations with examples. Perform (-25) + (15) using 8-bit 2's complement.

Signed Number Representations

In an nn-bit signed representation the MSB is the sign bit (00 = positive, 11 = negative).

1. Signed Magnitude

The MSB stores the sign; the remaining n1n-1 bits store the magnitude in plain binary.

  • +25=00011001+25 = 0\,0011001
  • 25=10011001-25 = 1\,0011001 (8-bit)

Drawbacks: two representations of zero (0000000000000000 and 1000000010000000) and complicated arithmetic.

2. One's Complement

A negative number is formed by inverting (complementing) every bit of its positive magnitude.

  • +25=00011001+25 = 00011001
  • 25=11100110-25 = 11100110 (invert all bits)

Still has two zeros (0000000000000000 and 1111111111111111) and needs end-around carry in addition.

3. Two's Complement

A negative number = 1's complement + 1. Range for nn bits: 2n1-2^{n-1} to +2n11+2^{n-1}-1.

  • +25=00011001+25 = 00011001
  • 25-25: invert 11100110\rightarrow 11100110, add 1111001111 \rightarrow 11100111

Single representation of zero; ordinary binary addition works directly, so it is used in modern computers.

Compute (25)+(15)(-25) + (15) in 8-bit 2's complement

Step 1 — Represent each operand

+25=0001100125=11100111+25 = 00011001 \Rightarrow -25 = 11100111

+15=00001111+15 = 00001111

Step 2 — Add

  1 1 1 0 0 1 1 1   (-25)
+ 0 0 0 0 1 1 1 1   (+15)
-----------------
  1 1 1 1 0 1 1 0

Step 3 — Interpret result. MSB =1=1, so the result is negative. Take 2's complement to read magnitude: invert 111101100000100111110110 \rightarrow 00001001, add 100001010=101 \rightarrow 00001010 = 10.

(25)+(15)=10=111101102\boxed{(-25)+(15) = -10 = 11110110_2}

No overflow occurs (the carry out of the sign bit is discarded; signs of operands differ so overflow is impossible).

binary-arithmetic
2long10 marks

Simplify F(A,B,C,D) = Sum(1,3,7,11,15) + d(0,2,5) using a K-map and implement using NOR gates.

Simplify F(A,B,C,D)=m(1,3,7,11,15)+d(0,2,5)F(A,B,C,D)=\sum m(1,3,7,11,15) + d(0,2,5)

Step 1 — K-map (1 = minterm, X = don't-care)

Rows = ABAB, Columns = CDCD (Gray order 00,01,11,1000,01,11,10):

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

Step 2 — Group the 1's (using don't-cares helpfully)

  • Group 1 (column CD=11, all four cells m3,7,15,11 = 1): a quad where C=1,D=1C=1, D=1 → term CDCD.
  • Group 2 (cells m1, m3, plus don't-cares m0, m2 in row AB=00): a quad covering row AB=00AB=00 → term AˉBˉ\bar A\bar B.

Minterm 5 (don't-care) and others are left as 0; not needed.

Step 3 — Simplified SOP

F=CD+AˉBˉF = CD + \bar A\bar B

Step 4 — Implement using NOR gates only

NOR is functionally complete. Convert the SOP to NOR form. By De Morgan:

F=CD+AˉBˉ=CDAˉBˉF = CD + \bar A\bar B = \overline{\overline{CD}\cdot\overline{\bar A\bar B}}

Express each AND term as a NOR. Since CD=Cˉ+DˉCD = \overline{\bar C + \bar D} and AˉBˉ=A+B\bar A\bar B = \overline{A+B}:

  • AˉBˉ=NOR(A,B)\bar A\bar B = \text{NOR}(A,B) directly (one NOR gate with inputs A,BA,B).
  • CD=Cˉ+Dˉ=NOR(Cˉ,Dˉ)CD = \overline{\bar C + \bar D} = \text{NOR}(\bar C,\bar D), where Cˉ,Dˉ\bar C,\bar D are obtained from single-input NOR (inverter) gates.

NOR-gate network (described):

  1. NOR gate G1G_1: inputs A,BA, B → output AˉBˉ\bar A\bar B.
  2. Inverters (NOR used as NOT) produce Cˉ\bar C and Dˉ\bar D.
  3. NOR gate G2G_2: inputs Cˉ,Dˉ\bar C, \bar D → output CDCD.
  4. Final OR-into-NOR stage: the OR of two terms in NOR logic is NOR(G1,G2)\text{NOR}(\overline{G_1},\overline{G_2}). Invert G1G_1 and G2G_2, then NOR them: F=(AˉBˉ)+(CD)F = \overline{\overline{(\bar A\bar B)}+\overline{(CD)}}.

This realizes F=AˉBˉ+CDF=\bar A\bar B + CD entirely with NOR gates (a two-level OR–AND/NOR–NOR structure).

k-map
3long10 marks

Explain the working of a 4-bit universal shift register with a neat block diagram.

4-bit Universal Shift Register

A universal shift register can perform all basic register operations: parallel load, shift-left, shift-right, and hold (no change). A 4-bit version is built from four flip-flops (FF0_0–FF3_3) and four 4-to-1 multiplexers, one in front of each flip-flop's D input.

Mode-control inputs

Two select lines S1S0S_1S_0 choose the operation for every multiplexer simultaneously:

S1S_1S0S_0OperationMUX selects
00Hold (no change)FF's own output QiQ_i
01Shift rightQi+1Q_{i+1} / serial-in-right
10Shift leftQi1Q_{i-1} / serial-in-left
11Parallel loadexternal input IiI_i

Block diagram (described)

          S1 S0 (common select to all MUX)
   SI_right -> [MUX0]->D Q0 -+--> [MUX1]->D Q1 -+--> [MUX2]->D Q2 -+--> [MUX3]->D Q3 -> SI_left
Parallel   I0      |        I1      |        I2      |        I3      |
inputs ----+-------+---------+------+---------+------+---------+------+
              CLK common to all flip-flops; outputs Q0 Q1 Q2 Q3

Each 4-to-1 MUX inputs (for FFi_i): (00) QiQ_i hold, (01) right-neighbour for shift-right, (10) left-neighbour for shift-left, (11) parallel data IiI_i. The MUX output drives the D flip-flop.

Working

On every active clock edge, each flip-flop loads whatever its MUX has selected:

  • 00 Hold: QiQiQ_i \leftarrow Q_i, contents preserved.
  • 01 Shift right: QiQi+1Q_i \leftarrow Q_{i+1} (data moves toward LSB); serial-right input enters at Q3Q_3 side / MSB end.
  • 10 Shift left: QiQi1Q_i \leftarrow Q_{i-1} (data moves toward MSB); serial-left input enters at Q0Q_0 end.
  • 11 Parallel load: QiIiQ_i \leftarrow I_i, all four bits loaded in one clock.

Because one register supports serial-in/serial-out, parallel-in/parallel-out, and bidirectional shifting, it is called universal (e.g. the 74194 IC).

registers
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Convert (101101.101)2 into decimal and octal.

Convert (101101.101)2(101101.101)_2

To Decimal — multiply each bit by its positional weight

Integer part:

125+024+123+122+021+120=32+0+8+4+0+1=451\cdot2^5+0\cdot2^4+1\cdot2^3+1\cdot2^2+0\cdot2^1+1\cdot2^0 = 32+0+8+4+0+1 = 45

Fraction part:

121+022+123=0.5+0+0.125=0.6251\cdot2^{-1}+0\cdot2^{-2}+1\cdot2^{-3} = 0.5+0+0.125 = 0.625 (101101.101)2=(45.625)10\boxed{(101101.101)_2 = (45.625)_{10}}

To Octal — group bits in 3s from the binary point

Integer part: 101101(101)=5, (101)=555101\,101 \Rightarrow (101)=5,\ (101)=5 \Rightarrow 55

Fraction part: 1015101 \Rightarrow 5 (already a group of 3)

(101101.101)2=(55.5)8\boxed{(101101.101)_2 = (55.5)_8}

Check: (55.5)8=58+5+581=45+0.625=45.625(55.5)_8 = 5\cdot8+5 + 5\cdot8^{-1} = 45 + 0.625 = 45.625

number-system
5short5 marks

State and prove the consensus theorem.

Consensus Theorem

Statement (SOP form):

AB+AˉC+BC=AB+AˉCAB + \bar A C + BC = AB + \bar A C

The redundant term BCBC (the consensus of ABAB and AˉC\bar AC, formed from the variables left after removing the complementary pair A,AˉA,\bar A) can be eliminated.

Dual (POS form): (A+B)(Aˉ+C)(B+C)=(A+B)(Aˉ+C)(A+B)(\bar A+C)(B+C) = (A+B)(\bar A+C).

Proof

AB+AˉC+BC=AB+AˉC+BC(A+Aˉ)[A+Aˉ=1]=AB+AˉC+ABC+AˉBC=AB(1+C)+AˉC(1+B)[factor]=AB1+AˉC1[1+X=1]=AB+AˉC\begin{aligned} AB + \bar A C + BC &= AB + \bar A C + BC\,(A+\bar A) &&[A+\bar A = 1]\\ &= AB + \bar A C + ABC + \bar A BC\\ &= AB(1+C) + \bar A C(1+B) &&[\text{factor}]\\ &= AB\cdot 1 + \bar A C\cdot 1 &&[1+X = 1]\\ &= AB + \bar A C \qquad \blacksquare \end{aligned}

The consensus term BCBC is therefore logically redundant and is dropped to simplify expressions and remove static hazards.

boolean-algebra
6short5 marks

Explain the working of a 2-to-4 line decoder.

2-to-4 Line Decoder

A decoder converts an nn-bit binary code into one of 2n2^n active output lines. A 2-to-4 decoder has 2 inputs (A1,A0A_1,A_0), an optional enable EE, and 4 outputs (D0D_0D3D_3); for each input combination exactly one output is asserted (active-HIGH here).

Truth table (active-HIGH, enabled)

EA1A_1A0A_0D3D_3D2D_2D1D_1D0D_0
0xx0000
1000001
1010010
1100100
1111000

Output equations

D0=EAˉ1Aˉ0,D1=EAˉ1A0,D2=EA1Aˉ0,D3=EA1A0D_0=E\,\bar A_1\bar A_0,\quad D_1=E\,\bar A_1 A_0,\quad D_2=E\,A_1\bar A_0,\quad D_3=E\,A_1 A_0

Working

Each output is the AND of the appropriate input literals (with the enable). Only the minterm that matches the input code is 1, so the decoder "selects" one of four lines. When E=0E=0 all outputs are 0 (disabled). Implementation needs four 3-input AND gates plus two inverters that generate Aˉ1,Aˉ0\bar A_1,\bar A_0. Decoders are used for memory address selection, demultiplexing, and to implement any Boolean function as a sum of minterms.

decoder
7short5 marks

Implement a 4-to-1 multiplexer using logic gates.

4-to-1 Multiplexer using Logic Gates

A MUX routes one of several data inputs to a single output, chosen by select lines. A 4-to-1 MUX has 4 data inputs (I0,I1,I2,I3I_0,I_1,I_2,I_3), 2 select lines (S1,S0S_1,S_0), and 1 output YY.

Function table

S1S_1S0S_0YY
00I0I_0
01I1I_1
10I2I_2
11I3I_3

Boolean expression

Y=Sˉ1Sˉ0I0+Sˉ1S0I1+S1Sˉ0I2+S1S0I3Y = \bar S_1\bar S_0\,I_0 + \bar S_1 S_0\,I_1 + S_1\bar S_0\,I_2 + S_1 S_0\,I_3

Gate-level implementation

  • Two inverters produce Sˉ1\bar S_1 and Sˉ0\bar S_0.
  • Four 3-input AND gates, one per data input:
    • AND0_0: I0,Sˉ1,Sˉ0I_0,\bar S_1,\bar S_0
    • AND1_1: I1,Sˉ1,S0I_1,\bar S_1,S_0
    • AND2_2: I2,S1,Sˉ0I_2,S_1,\bar S_0
    • AND3_3: I3,S1,S0I_3,S_1,S_0
  • One 4-input OR gate combines the four AND outputs to give YY.
S1 ->|>o- S1'      I0 -+
S0 ->|>o- S0'           [AND0]-+
                  I1 --[AND1]--+
                  I2 --[AND2]--+--[OR]--> Y
                  I3 --[AND3]--+

For any select code, only the matching AND gate passes its data input (others output 0), so YY equals the selected input.

multiplexer
8short5 marks

Differentiate between Moore and Mealy machines.

Moore vs Mealy Machines

Both are finite-state machine models for synchronous sequential circuits; they differ in how the output is generated.

FeatureMoore machineMealy machine
Output depends onPresent state onlyPresent state and current inputs
Output equationZ=f(state)Z = f(\text{state})Z=f(state,input)Z = f(\text{state}, \text{input})
Output timingSynchronous; changes only on clock edge (after state change)Can change asynchronously as soon as input changes
Number of statesGenerally more states neededGenerally fewer states
Reaction speedSlower (one clock delay)Faster (immediate response)
Output stabilityMore stable, glitch-freeMay glitch with input changes
State diagramOutput written inside the state circleOutput written on the transition (input/output)

Summary: A Moore machine's output is a function of state alone, giving stable, delayed outputs; a Mealy machine's output also depends on the input, giving faster response with fewer states but possible glitches. Any Moore machine can be converted to an equivalent Mealy machine and vice versa.

sequential
9short5 marks

Explain the operation of a T flip-flop with its excitation table.

T (Toggle) Flip-Flop

The T flip-flop has a single input TT and a clock. It is obtained from a JK flip-flop by tying J=K=TJ=K=T.

Operation / characteristic table

TTQnQ_nQn+1Q_{n+1}Action
000No change (hold)
011No change (hold)
101Toggle
110Toggle
  • T=0T=0: output holds its previous value, Qn+1=QnQ_{n+1}=Q_n.
  • T=1T=1: output toggles (complements) on each active clock edge, Qn+1=QˉnQ_{n+1}=\bar Q_n.

Characteristic equation:

Qn+1=TQˉn+TˉQn=TQnQ_{n+1} = T\bar Q_n + \bar T Q_n = T \oplus Q_n

Because it divides the clock frequency by 2 when T=1T=1, the T flip-flop is the basic building block of ripple/asynchronous counters.

Excitation table

(Given a required QnQn+1Q_n \to Q_{n+1} transition, what TT is needed?)

QnQ_nQn+1Q_{n+1}TT
000
011
101
110

So T=QnQn+1T = Q_n \oplus Q_{n+1}: T=1T=1 whenever the output must change, T=0T=0 when it must stay the same.

flip-flops
10short5 marks

What is a BCD adder? Explain its working.

BCD Adder

A BCD (Binary-Coded Decimal) adder adds two BCD digits (each a 4-bit code for decimal 0–9) and produces a valid BCD sum digit plus a decimal carry. It is needed because ordinary 4-bit binary addition can yield results that are not valid BCD (the codes 1010–1111) or produce a binary carry, both of which must be corrected.

Why correction is needed

Valid BCD digits are 0000000010011001 (0–9). If the binary sum of two BCD digits exceeds 99, or generates a carry-out, the result is invalid in BCD.

Correction rule

Add 6(0110)6\,(0110) to the 4-bit sum when:

  • the sum >9> 9 (i.e. sum is 1010–1111), or
  • a carry-out CoutC_{out} is generated from the first adder.

The correction-needed signal is:

C=Cout+S3S2+S3S1C = C_{out} + S_3S_2 + S_3S_1

(S3S2S_3S_2 detects 12–15, S3S1S_3S_1 detects 10–11.)

Working / structure

  1. A first 4-bit binary adder adds the two BCD digits A+B+CinA+B+C_{in}, giving sum S3S2S1S0S_3S_2S_1S_0 and carry CoutC_{out}.
  2. The detection logic computes CC above.
  3. A second 4-bit adder adds 01100110 to the first sum when C=1C=1 (adds 00000000 otherwise).
  4. The output of the second adder is the corrected BCD sum digit; CC becomes the decimal carry to the next-higher BCD digit.

Example: 7+5=127+5=12. Binary 0111+0101=11000111+0101 = 1100 (=12>9=12>9), so add 01100110: 1100+0110=100101100+0110 = 1\,0010 → carry 1, digit 0010=20010 = 2, i.e. 1212 in BCD (000100100001\,0010). ✓

combinational
11short5 marks

Design a mod-5 counter using JK flip-flops.

Design of a Mod-5 Counter using JK Flip-Flops

A mod-5 counter counts 0123400 \to 1 \to 2 \to 3 \to 4 \to 0, i.e. 5 states. It needs log25=3\lceil\log_2 5\rceil = 3 flip-flops (Q2Q1Q0Q_2Q_1Q_0). States 101,110,111 are unused (don't-cares).

Step 1 — State / transition table with JK excitation

JK excitation: 00:J0,K×0\to0:J0,K{\times}; 01:J1,K×0\to1:J1,K{\times}; 10:J×,K11\to0:J{\times},K1; 11:J×,K01\to1:J{\times},K0.

Q2Q1Q0Q_2Q_1Q_0nextJ2K2J_2K_2J1K1J_1K_1J0K0J_0K_0
000001
001010×1
010011×0
011100×1×1
100000×1

Step 2 — Simplify (K-maps, using 101,110,111 as don't-cares)

J0=Qˉ2,K0=1J_0 = \bar Q_2,\quad K_0 = 1 J1=Q0,K1=Q0J_1 = Q_0,\quad K_1 = Q_0 J2=Q1Q0,K2=1J_2 = Q_1 Q_0,\quad K_2 = 1

Step 3 — Implementation

  • FF0: J0=Qˉ2J_0=\bar Q_2, K0=1K_0=1
  • FF1: J1=K1=Q0J_1=K_1=Q_0 (FF1 acts as a T flip-flop toggling on Q0Q_0)
  • FF2: J2=Q1Q0J_2=Q_1Q_0 (one AND gate), K2=1K_2=1

All flip-flops share the common clock. When the count reaches 4(100)4\,(100), the equations force the next state to 000000, giving a clean modulo-5 cycle. (Alternatively, a 3-bit binary counter with a NAND gate decoding state 101101 to asynchronously clear all flip-flops also gives mod-5.)

counters
12short5 marks

Write short notes on race-around condition.

Race-Around Condition

The race-around condition is a problem in a level-triggered JK (or SR) flip-flop when both inputs J=K=1J=K=1 (the toggle case) and the clock pulse stays HIGH for longer than the propagation delay of the gates.

Cause

With J=K=1J=K=1, the output should toggle once. But while the clock is HIGH the feedback path is enabled, so the output keeps toggling continuously (01010\to1\to0\to1\dots) every gate-delay tpdt_{pd} as long as the clock remains HIGH. If the clock pulse width tp>tpdt_p > t_{pd}, the flip-flop changes state multiple times and the final output is unpredictable (depends on exactly when the clock goes LOW). This rapid oscillation is the race-around condition.

Remedies

  1. Narrow clock pulse: make tp<tpdt_p < t_{pd} so only one toggle occurs — hard to guarantee in practice.
  2. Master-Slave JK flip-flop: two latches in series (master enabled when clock HIGH, slave when clock LOW). The output updates only once per clock cycle, eliminating the race.
  3. Edge-triggered flip-flop: the device responds only at the rising/falling clock edge, so the output can change at most once per clock pulse.

Thus race-around is eliminated by master-slave or edge-triggered designs.

flip-flops

Frequently asked questions

Where can I find the BSc CSIT (TU) Digital Logic (BSc CSIT, CSC116) question paper 2078?
The full BSc CSIT (TU) Digital Logic (BSc CSIT, CSC116) 2078 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Digital Logic (BSc CSIT, CSC116) 2078 paper come with solutions?
Yes. Every question on this Digital Logic (BSc CSIT, CSC116) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Digital Logic (BSc CSIT, CSC116) 2078 paper?
The BSc CSIT (TU) Digital Logic (BSc CSIT, CSC116) 2078 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Digital Logic (BSc CSIT, CSC116) past paper free?
Yes — reading and attempting this Digital Logic (BSc CSIT, CSC116) past paper on Kekkei is completely free.