Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Perform the following number system conversions, showing all intermediate steps: (i) Convert the decimal number (189.625)10(189.625)_{10} to its binary, octal and hexadecimal equivalents. (ii) Convert the hexadecimal number (2AF.C)16(2AF.C)_{16} to decimal.

(b) Using 8-bit 2's complement representation, perform the subtraction (45)10(78)10(45)_{10} - (78)_{10} and verify your result.

(c) Differentiate between weighted and non-weighted codes. Encode the decimal number (947)10(947)_{10} into BCD (8421) and into Excess-3 code.

(a) Number system conversions

(i) (189.625)10(189.625)_{10} to binary, octal and hexadecimal

Integer part (189) to binary — repeated division by 2:

DivisionQuotientRemainder
189/2941
94/2470
47/2231
23/2111
11/251
5/221
2/210
1/201

Reading remainders bottom-to-top: (189)10=(10111101)2(189)_{10} = (10111101)_2.

Fractional part (0.625) — repeated multiplication by 2:

0.625×2=1.2510.625\times2 = 1.25 \Rightarrow 1; 0.25×2=0.500.25\times2 = 0.5 \Rightarrow 0; 0.5×2=1.010.5\times2 = 1.0 \Rightarrow 1.

So (0.625)10=(0.101)2(0.625)_{10} = (0.101)_2.

(189.625)10=(10111101.101)2\boxed{(189.625)_{10} = (10111101.101)_2}

Binary to octal — group in 3s from the binary point: 010211171015.1015=(275.5)8\underbrace{010}_{2}\,\underbrace{111}_{7}\,\underbrace{101}_{5}\,.\,\underbrace{101}_{5} = (275.5)_8.

Binary to hexadecimal — group in 4s from the binary point: 1011B1101D.1010A=(BD.A)16\underbrace{1011}_{B}\,\underbrace{1101}_{D}\,.\,\underbrace{1010}_{A} = (BD.A)_{16}.

(189.625)10=(275.5)8=(BD.A)16\boxed{(189.625)_{10} = (275.5)_8 = (BD.A)_{16}}

(ii) (2AF.C)16(2AF.C)_{16} to decimal

Using positional weights (A=10,F=15,C=12A=10,\,F=15,\,C=12):

2×162+10×161+15×160+12×1612\times16^2 + 10\times16^1 + 15\times16^0 + 12\times16^{-1} =512+160+15+0.75=(687.75)10= 512 + 160 + 15 + 0.75 = \boxed{(687.75)_{10}}

(b) (45)10(78)10(45)_{10}-(78)_{10} in 8-bit 2's complement

+45=(00101101)2+45 = (00101101)_2.

+78=(01001110)2+78 = (01001110)_2. Its 2's complement (i.e. 78-78):

  • 1's complement: 1011000110110001
  • add 1: 10110010=7810110010 = -78.

Add 45+(78)45 + (-78):

  00101101   (+45)
+ 10110010   (-78)
-----------
  11011111

Result =(11011111)2= (11011111)_2. The MSB is 1, so the result is negative. Its magnitude = 2's complement of 1101111111011111:

  • 1's complement 0010000000100000, add 1 00100001=33\Rightarrow 00100001 = 33.

Hence the result is 33-33, which matches 4578=3345-78 = -33. Verified.

(c) Weighted vs non-weighted codes; BCD and Excess-3 of (947)10(947)_{10}

Weighted code: each bit position carries a fixed numeric weight, and the digit value is the weighted sum of bits (e.g. BCD/8421, 2421, 84-2-1). Non-weighted code: positions have no fixed weights, so the digit cannot be obtained by a weighted sum (e.g. Excess-3, Gray code). Non-weighted codes are used for special properties such as error detection or self-complementing arithmetic.

BCD (8421) — encode each decimal digit in 4 bits: 9=1001,  4=0100,  7=01119 = 1001,\;4 = 0100,\;7 = 0111

(947)10=(1001  0100  0111)BCD\boxed{(947)_{10} = (1001\;0100\;0111)_{BCD}}

Excess-3 — add 3 to each digit, then encode in 4 bits: 9+3=12=1100,  4+3=7=0111,  7+3=10=10109+3=12=1100,\;4+3=7=0111,\;7+3=10=1010

(947)10=(1100  0111  1010)XS3\boxed{(947)_{10} = (1100\;0111\;1010)_{XS3}}
number-systemscodes
2long12 marks

(a) Simplify the following Boolean function using a four-variable Karnaugh map and obtain the minimal Sum-of-Products (SOP) expression:

F(A,B,C,D)=m(0,1,2,5,8,9,10,12,13,14)F(A,B,C,D) = \sum m(0,1,2,5,8,9,10,12,13,14)

Indicate all the prime implicants and the essential prime implicants on the map.

(b) For the function in part (a), also obtain the minimal Product-of-Sums (POS) expression.

(c) Realize the minimal SOP expression obtained in part (a) using only NAND gates and draw the logic diagram.

(a) K-map simplification — minimal SOP

F(A,B,C,D)=m(0,1,2,5,8,9,10,12,13,14)F(A,B,C,D)=\sum m(0,1,2,5,8,9,10,12,13,14)

Four-variable K-map (rows ABAB, columns CDCD in Gray order 00,01,11,1000,01,11,10):

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

Prime implicants (PIs):

  • BCB'C' = {0,1,8,9}
  • BDB'D' = {0,2,8,10}
  • ACAC' = {8,9,12,13}
  • ADAD' = {8,10,12,14}
  • CDC'D = {1,5,9,13}

Essential prime implicants (EPIs):

  • BDB'D' — only PI covering m2
  • CDC'D — only PI covering m5
  • ADAD' — only PI covering m14

These three EPIs together cover all ten minterms {0,1,2,5,8,9,10,12,13,14}\{0,1,2,5,8,9,10,12,13,14\}, so no other PI is needed.

F=BD+CD+AD\boxed{F = B'D' + C'D + AD'}

(b) Minimal POS

Group the 0s (maxterms M3,M4,M6,M7,M11,M15M_3,M_4,M_6,M_7,M_{11},M_{15}):

  • {3,7,11,15}\{3,7,11,15\} (C=1, D=1) \Rightarrow sum term (C+D)(C'+D') — essential
  • {4,6}\{4,6\} (A=0,B=1,D=0) \Rightarrow sum term (A+B+D)(A+B'+D) — essential (covers m4)

Together they cover all zeros, giving

F=(C+D)(A+B+D)\boxed{F = (C'+D')(A+B'+D)}

(c) NAND-only realization of the SOP

The two-level SOP F=BD+CD+ADF = B'D' + C'D + AD' is converted to NAND-NAND by replacing every AND and the final OR with NAND gates (double inversion leaves the function unchanged):

F=(BD)(CD)(AD)F = \overline{\overline{(B'D')}\cdot\overline{(C'D)}\cdot\overline{(AD')}}

Logic diagram (described):

  • Generate complements B,C,D,AB',C',D',A' using NAND gates as inverters (tie both inputs of a NAND together).
  • First level: three 2-input NAND gates produce BD\overline{B'D'}, CD\overline{C'D}, AD\overline{AD'}.
  • Second level: a 3-input NAND combines these three outputs to give FF.

Thus FF is realized with a NAND-NAND (two-level) network plus inverters, all NAND gates.

karnaugh-mapsboolean-algebra
3long14 marks

Design a synchronous sequential circuit (a Mod-6 counter that counts in the sequence 01234500 \to 1 \to 2 \to 3 \to 4 \to 5 \to 0) using JK flip-flops.

(a) Draw the state diagram and write down the present-state/next-state table.

(b) Derive the excitation table for the JK flip-flops and obtain the simplified input equations using Karnaugh maps.

(c) Draw the complete logic circuit diagram and comment on how the unused states are handled.

Synchronous Mod-6 counter (01234500\to1\to2\to3\to4\to5\to0) with JK flip-flops

Three flip-flops are needed (23=862^3=8\ge6). Let outputs be Q2Q1Q0Q_2Q_1Q_0 (MSB Q2Q_2). States 6 and 7 are unused (treated as don't-cares).

(a) State diagram and next-state table

State diagram (described): a single directed ring 000001010011100101000000\to001\to010\to011\to100\to101\to000, each transition on a clock edge.

Present Q2Q1Q0Q_2Q_1Q_0Next Q2+Q1+Q0+Q_2^+Q_1^+Q_0^+
000001
001010
010011
011100
100101
101000
110d d d
111d d d

(b) Excitation table and input equations

JK excitation rules: 00:J=0,K=d0\to0:J=0,K=d; 01:J=1,K=d0\to1:J=1,K=d; 10:J=d,K=11\to0:J=d,K=1; 11:J=d,K=01\to1:J=d,K=0.

Q2Q1Q0Q_2Q_1Q_0J2K2J_2K_2J1K1J_1K_1J0K0J_0K_0
0000d0d1d
0010d1dd1
0100dd01d
0111dd1d1
100d00d1d
101d10dd1
110dddddd
111dddddd

Using K-maps over Q2Q1Q0Q_2Q_1Q_0 (states 6,7 as don't-cares):

J0=1,K0=1J_0 = 1,\qquad K_0 = 1 J1=Q0,K1=Q0J_1 = Q_0,\qquad K_1 = Q_0 J2=Q1Q0,K2=1J_2 = Q_1Q_0,\qquad K_2 = 1

Check of K2K_2: Q2=1Q_2=1 occurs only at 100 and 101; from 101 the counter must go to 000 so Q2Q_2 resets (K2=1K_2=1), and from 100 it stays (K2K_2 is don't-care), so K2=1K_2=1 is valid. J2=Q1Q0J_2=Q_1Q_0 is 1 only at state 011 (the 3\to4 transition), correct.

(c) Logic circuit and unused-state handling

Circuit (described):

  • FF0FF_0: J0=K0=1J_0=K_0=1 (toggles every clock).
  • FF1FF_1: J1=K1=Q0J_1=K_1=Q_0 (toggles when Q0=1Q_0=1).
  • FF2FF_2: J2=Q1Q0J_2=Q_1\cdot Q_0 (one AND gate), K2=1K_2=1.
  • All three flip-flops share a common clock (synchronous).

Unused states 110 and 111: Because they were entered as don't-cares, their behaviour follows the derived equations. Evaluating:

  • From 110: J0K0=11Q0:01J_0K_0=11\Rightarrow Q_0:0\to1; J1K1=Q0=0Q1J_1K_1=Q_0=0\Rightarrow Q_1 holds at 1; J2=Q1Q0=0,K2=1Q2:10J_2=Q_1Q_0=0,K_2=1\Rightarrow Q_2:1\to0. Next = 011 (a valid state).
  • From 111: Q0:10Q_0:1\to0; J1K1=1Q1:10J_1K_1=1\Rightarrow Q_1:1\to0; J2=1,K2=1Q2:10J_2=1,K_2=1\Rightarrow Q_2:1\to0. Next = 000 (a valid state).

Both unused states return to valid states within one clock, so the counter is self-correcting and cannot lock up.

sequential-circuit-designflip-flops
4long12 marks

(a) Design a full adder using the truth table approach. Obtain the simplified Boolean expressions for the SUM and CARRY outputs and draw its logic diagram.

(b) Implement the SUM output of the full adder using an 8-to-1 multiplexer.

(c) Explain how a 3-to-8 line decoder can be used to implement the following two functions simultaneously:

F1(A,B,C)=m(1,3,5,7),F2(A,B,C)=m(0,2,4,6)F_1(A,B,C) = \sum m(1,3,5,7), \quad F_2(A,B,C) = \sum m(0,2,4,6)

(a) Full adder design

Inputs A,B,CinA,B,C_{in}; outputs SS (sum) and CoutC_{out} (carry).

ABCinC_{in}SCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111

S=m(1,2,4,7)S=\sum m(1,2,4,7), Cout=m(3,5,6,7)C_{out}=\sum m(3,5,6,7). Simplifying:

S=ABCinS = A\oplus B\oplus C_{in} Cout=AB+BCin+ACinC_{out} = AB + BC_{in} + AC_{in}

Logic diagram (described): Two XOR gates in cascade produce SS (ABA\oplus B, then Cin\oplus C_{in}). CoutC_{out} uses three 2-input AND gates (ABAB, BCinBC_{in}, ACinAC_{in}) feeding a 3-input OR gate. (Equivalently two half-adders + one OR.)

(b) SUM using an 8-to-1 multiplexer

Use A,B,CinA,B,C_{in} as the three select lines (S2S1S0S_2S_1S_0). The data input InI_n for line nn equals the SUM value of that minterm:

I0=0,  I1=1,  I2=1,  I3=0,  I4=1,  I5=0,  I6=0,  I7=1I_0=0,\;I_1=1,\;I_2=1,\;I_3=0,\;I_4=1,\;I_5=0,\;I_6=0,\;I_7=1

So connect I1,I2,I4,I7I_1,I_2,I_4,I_7 to logic 1 and I0,I3,I5,I6I_0,I_3,I_5,I_6 to logic 0; the MUX output then equals S=ABCinS=A\oplus B\oplus C_{in}.

(c) Two functions with one 3-to-8 decoder

A 3-to-8 decoder with inputs A,B,CA,B,C produces all eight minterm lines D0D7D_0\ldots D_7 (each output high for exactly one input combination). Any SOP function is then the OR of the decoder outputs for its minterms.

  • F1=m(1,3,5,7)F_1=\sum m(1,3,5,7): OR-gate the lines D1,D3,D5,D7F1=D1+D3+D5+D7D_1,D_3,D_5,D_7 \Rightarrow F_1 = D_1+D_3+D_5+D_7.
  • F2=m(0,2,4,6)F_2=\sum m(0,2,4,6): OR-gate the lines D0,D2,D4,D6F2=D0+D2+D4+D6D_0,D_2,D_4,D_6 \Rightarrow F_2 = D_0+D_2+D_4+D_6.

The same decoder feeds two separate 4-input OR gates, realizing both functions simultaneously. (Note: F1=CF_1=C and F2=CF_2=C', since the odd/even minterms correspond to C=1/0C=1/0.) For active-low decoder outputs, NAND gates would replace the OR gates.

combinational-logicmultiplexers-decoders
B

Section B: Short Answer Questions

Attempt all / any as specified.

8 questions
5short6 marks

State and prove De Morgan's theorems for two variables. Using Boolean algebra, simplify the expression Y=AB+A(B+C)+B(B+C)Y = AB + A(B + C) + B(B + C) and express the result in its simplest form.

De Morgan's theorems (two variables)

Theorem 1: A+B=AˉBˉ\overline{A+B} = \bar{A}\cdot\bar{B}
Theorem 2: AB=Aˉ+Bˉ\overline{A\cdot B} = \bar{A}+\bar{B}

Proof by truth table (Theorem 1):

ABA+B\overline{A+B}AˉBˉ\bar A\,\bar B
0011
0100
1000
1100

Columns 3 and 4 are identical, proving A+B=AˉBˉ\overline{A+B}=\bar A\bar B. Theorem 2 is proved the same way (its truth table gives 1,1,1,0, equal on both sides). The two theorems are duals of each other.

Simplification of Y=AB+A(B+C)+B(B+C)Y = AB + A(B+C) + B(B+C)

Y=AB+AB+AC+BB+BCY = AB + AB + AC + BB + BC

Using X+X=XX+X=X (so AB+AB=ABAB+AB=AB) and BB=BBB=B (idempotence):

Y=AB+AC+B+BCY = AB + AC + B + BC

Apply absorption B+BC=BB + BC = B and B+AB=BB + AB = B:

Y=B+ACY = B + AC Y=B+AC\boxed{Y = B + AC}
boolean-algebra
6short6 marks

(a) Explain the operation of an SR latch using NOR gates and state its forbidden input condition. (b) What is meant by the 'race-around condition' in a JK flip-flop, and how does a master-slave configuration eliminate it?

(a) NOR-gate SR latch

An SR latch is built from two cross-coupled NOR gates: the output of each NOR feeds back to one input of the other. Inputs are SS (Set) and RR (Reset); outputs are QQ and Qˉ\bar Q.

SRQAction
00QprevQ_{prev}Hold (no change)
010Reset
101Set
110/0Forbidden

Operation: With S=1,R=0S=1,R=0 the latch sets (Q=1Q=1); with S=0,R=1S=0,R=1 it resets (Q=0Q=0); with S=R=0S=R=0 it holds the stored value.

Forbidden condition: S=R=1S=R=1 forces both QQ and Qˉ\bar Q to 0, violating the requirement that they be complementary. Worse, if both inputs then return to 0 simultaneously, the final state is unpredictable (a race), so this input combination is disallowed.

(b) Race-around condition and master-slave solution

Race-around: In a level-triggered JK flip-flop with J=K=1J=K=1 (toggle), if the clock pulse width tpt_p is longer than the propagation delay tpdt_{pd} of the gates, the output toggles repeatedly for the entire duration the clock is high. The final state at the end of the pulse becomes uncertain — this oscillation is the race-around condition.

Master-slave elimination: A master-slave JK uses two latches in series. The master latch is enabled when the clock is HIGH and accepts the inputs; the slave is enabled when the clock is LOW (clock inverted) and copies the master's state to the output. Because the two are never transparent at the same time, the output can change only once per clock cycle, removing the multiple-toggle oscillation. (Edge-triggered flip-flops achieve the same result.)

flip-flops
7short6 marks

(a) Differentiate between a synchronous counter and an asynchronous (ripple) counter. (b) Draw the logic diagram of a 4-bit Serial-In Parallel-Out (SIPO) shift register using D flip-flops and explain its operation.

(a) Synchronous vs asynchronous (ripple) counter

FeatureSynchronous counterAsynchronous (ripple) counter
ClockingAll flip-flops share one common clockOutput of one FF clocks the next
SpeedFast (all FFs change together)Slow (delay ripples through stages)
Propagation delayOne FF delayAccumulates with number of stages
Glitches/spikesFree of decoding glitchesProne to transient glitches
Circuit complexityMore combinational logicSimpler hardware

(b) 4-bit SIPO shift register using D flip-flops

Circuit (described): Four D flip-flops FF0,FF1,FF2,FF3FF_0,FF_1,FF_2,FF_3 are cascaded. Serial data enters D0D_0 of FF0FF_0; the output Q0Q_0 connects to D1D_1, Q1Q_1 to D2D_2, and Q2Q_2 to D3D_3. All four flip-flops share a common clock. The four outputs Q0Q1Q2Q3Q_0Q_1Q_2Q_3 are available in parallel.

Operation: On each clock pulse, every flip-flop loads the value at its DD input, so the bit pattern shifts one position. A serial bit stream applied at D0D_0 is shifted in one bit per clock; after 4 clock pulses the 4 input bits occupy Q0Q_0Q3Q_3 and can be read out simultaneously (serial-to-parallel conversion). For example, to load 1011 the input bits are fed one per clock until all four bits sit in the register.

counters-registers
8short6 marks

Design a half subtractor and a full subtractor. Write down their truth tables, derive the Boolean expressions for the DIFFERENCE and BORROW outputs, and draw the logic diagram of the full subtractor.

Half subtractor

Inputs AA (minuend), BB (subtrahend); outputs DD (difference ABA-B) and BoutB_{out} (borrow).

ABDBoutB_{out}
0000
0111
1010
1100
D=AB,Bout=AˉBD = A\oplus B,\qquad B_{out} = \bar{A}B

Full subtractor

Inputs A,B,BinA,B,B_{in} (incoming borrow); outputs DD and BoutB_{out}.

ABBinB_{in}DBoutB_{out}
00000
00111
01011
01101
10010
10100
11000
11111

D=m(1,2,4,7)D=\sum m(1,2,4,7), Bout=m(1,2,3,7)B_{out}=\sum m(1,2,3,7). Simplifying:

D=ABBinD = A\oplus B\oplus B_{in} Bout=AˉB+AˉBin+BBin=AˉB+(AB)BinB_{out} = \bar{A}B + \bar{A}B_{in} + BB_{in} = \bar A B + (\overline{A\oplus B})B_{in}

Logic diagram of full subtractor (described):

  • Two XOR gates produce the difference: ABA\oplus B, then Bin=D\oplus B_{in} = D.
  • The borrow uses: an inverter for Aˉ\bar A, an AND gate AˉB\bar A B, and an AND gate (AB)Bin\overline{(A\oplus B)}\cdot B_{in} (taking the complement of the first XOR), combined by a 2-input OR gate to give BoutB_{out}.

A full subtractor can thus be built from two half subtractors and one OR gate.

combinational-logic
9short6 marks

(a) What is a multiplexer? With a neat block diagram and function table, explain the working of a 4-to-1 multiplexer. (b) Show how two 4-to-1 multiplexers and one additional gate can be used to construct an 8-to-1 multiplexer.

(a) Multiplexer and 4-to-1 MUX

A multiplexer (MUX) is a combinational circuit that selects one of several input data lines and routes it to a single output, the choice being controlled by select (address) lines. An nn-select MUX has 2n2^n data inputs (a data selector / many-to-one switch).

4-to-1 MUX block (described): four data inputs I0,I1,I2,I3I_0,I_1,I_2,I_3, two select lines S1S0S_1S_0, one output YY.

Function table:

S1S_1S0S_0YY
00I0I_0
01I1I_1
10I2I_2
11I3I_3

Boolean output:

Y=S1ˉS0ˉI0+S1ˉS0I1+S1S0ˉI2+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

The select lines decode to enable exactly one AND gate, passing its data input through the final OR gate.

(b) 8-to-1 MUX from two 4-to-1 MUX + one gate

Use three select lines S2S1S0S_2S_1S_0:

  • MUX-A (4-to-1) handles data inputs I0I_0I3I_3 with selects S1S0S_1S_0.
  • MUX-B (4-to-1) handles data inputs I4I_4I7I_7 with selects S1S0S_1S_0.
  • The MSB S2S_2 chooses between the two: when S2=0S_2=0 the lower group is wanted, when S2=1S_2=1 the upper group.

Combining gate: Enable each 4-to-1 MUX with S2S_2 via its active-low enable (MUX-A enabled by S2ˉ\bar{S_2}, MUX-B by S2S_2) and OR their outputs:

Y=S2ˉYA+S2YBY = \bar{S_2}\,Y_A + S_2\,Y_B

A single 2-input OR gate (with the enable arrangement) merges the two outputs, giving a complete 8-to-1 multiplexer.

multiplexers-decoders
10short6 marks

(a) Define a self-complementing code and give one example. (b) Convert the binary number (10110110)2(10110110)_2 into Gray code and convert the Gray code (11011)Gray(11011)_{Gray} back into binary. Show the bit-by-bit procedure.

(a) Self-complementing code

A self-complementing code is one in which the code of the 9's complement of a decimal digit is obtained simply by complementing (inverting) each bit of the code for that digit. Equivalently, the codes of a digit dd and of (9d)(9-d) are bit-wise complements.

Example: Excess-3 code. For digit 4 the XS-3 code is 01110111; its bit-complement is 10001000, which is the XS-3 code for 5=945 = 9-4. (The 2421 code is another example.)

(b) Gray code conversions

Binary (10110110)2(10110110)_2 \to Gray

Rule: MSB of Gray = MSB of binary; each next Gray bit gi=bibi+1g_i = b_i \oplus b_{i+1} (XOR of adjacent binary bits).

Binary:  1  0  1  1  0  1  1  0
Gray:    1  1  1  0  1  1  0  1

Check: 11; 10=11\oplus0=1; 01=10\oplus1=1; 11=01\oplus1=0; 10=11\oplus0=1; 01=10\oplus1=1; 11=01\oplus1=0; 10=11\oplus0=1.

(10110110)2=(11101101)Gray\boxed{(10110110)_2 = (11101101)_{Gray}}

Gray (11011)Gray(11011)_{Gray} \to binary

Rule: MSB of binary = MSB of Gray; each next binary bit bi=bi+1gib_i = b_{i+1}\oplus g_i (XOR of the previous binary bit with the current Gray bit).

Gray:    1  1  0  1  1
Binary:  1  0  0  1  0

Check: b4=1b_4=1; b3=11=0b_3=1\oplus1=0; b2=00=0b_2=0\oplus0=0; b1=01=1b_1=0\oplus1=1; b0=11=0b_0=1\oplus1=0.

(11011)Gray=(10010)2\boxed{(11011)_{Gray} = (10010)_2}
number-systems
11short6 marks

Distinguish between Mealy and Moore models of a finite state machine using suitable block diagrams. State one practical advantage and one disadvantage of each model.

Mealy vs Moore finite state machines

Both are clocked sequential machines with a state register and combinational logic; they differ in how the output is generated.

AspectMealy machineMoore machine
Output depends onPresent state and present inputsPresent state only
Output expressionZ=f(state,input)Z = f(\text{state}, \text{input})Z=g(state)Z = g(\text{state})
Number of statesUsually fewerUsually more
Output timingCan change asynchronously with input (mid-cycle)Changes only on clock edge (synchronous, glitch-free)

Block diagrams (described):

  • Mealy: Inputs and the state-register outputs both feed the output combinational logic (so inputs reach the output directly) as well as the next-state logic.
  • Moore: Only the state-register outputs feed the output logic; the inputs feed only the next-state logic, so outputs are a pure function of state.

MealyAdvantage: generally needs fewer states/flip-flops and reacts to input changes faster (lower latency). Disadvantage: outputs can change asynchronously with inputs, making them prone to glitches/spikes and harder to time.

MooreAdvantage: outputs change only on the clock edge, so they are stable and glitch-free, easier to synchronize. Disadvantage: usually requires more states/flip-flops and responds one clock cycle later to input changes.

sequential-circuit-designflip-flops
12short4 marks

What are 'don't care' conditions in a logic function? Using a Karnaugh map, simplify the BCD function F(A,B,C,D)=m(1,3,5,7,9)+d(10,11,12,13,14,15)F(A,B,C,D) = \sum m(1,3,5,7,9) + \sum d(10,11,12,13,14,15) and write the minimal SOP expression.

Don't-care conditions

A don't-care condition is an input combination for which the output value is irrelevant — either because that input combination never occurs (e.g. unused codes in BCD, where 1010–1111 never appear) or because the output is not used for that case. In a K-map a don't-care is marked dd (or X) and may be grouped as either 0 or 1, whichever yields a larger, simpler grouping, helping to minimize the logic.

K-map simplification

F(A,B,C,D)=m(1,3,5,7,9)+d(10,11,12,13,14,15)F(A,B,C,D)=\sum m(1,3,5,7,9) + \sum d(10,11,12,13,14,15)

K-map (rows ABAB, columns CDCD):

AB\CDAB\backslash CD00011110
0001 (m1)1 (m3)0
0101 (m5)1 (m7)0
11d (12)d (13)d (15)d (14)
1001 (m9)d (11)d (10)

All the 1-cells lie where D=1D=1 (the CD=01CD=01 and CD=11CD=11 columns). Using the don't-cares m11,m13,m15m_{11},m_{13},m_{15} to extend the grouping, the entire two columns where D=1D=1 form a single group of eight, i.e. the single literal DD.

F=D\boxed{F = D}
combinational-logickarnaugh-maps

Frequently asked questions

Where can I find the BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) question paper 2078?
The full BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 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 (PU, ELX 110) 2078 paper come with solutions?
Yes. Every question on this Digital Logic (PU, ELX 110) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2078 paper?
The BE Computer Engineering (Pokhara University) Digital Logic (PU, ELX 110) 2078 paper carries 100 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Digital Logic (PU, ELX 110) past paper free?
Yes — reading and attempting this Digital Logic (PU, ELX 110) past paper on Kekkei is completely free.