Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Perform the following arithmetic operations as indicated, showing all intermediate steps: (i) Subtract (1010110)2(1010110)_2 from (1101001)2(1101001)_2 using 2's complement method, and (ii) convert (2AF.C)16(2AF.C)_{16} into its decimal and octal equivalents. [6]

(b) Define weighted and non-weighted codes. Explain the Gray code and the Excess-3 code with suitable examples, and state one practical application of each. [6]

(a) Arithmetic Operations

(i) Subtract (1010110)2(1010110)_2 from (1101001)2(1101001)_2 using 2's complement

Minuend =11010012=105= 1101001_2 = 105, Subtrahend =10101102=86= 1010110_2 = 86. Expected result =19=00100112= 19 = 0010011_2.

Step 1 — 2's complement of the subtrahend 10101101010110:

  • 1's complement: 01010010101001
  • Add 1: 0101001+1=01010100101001 + 1 = 0101010

Step 2 — Add to minuend:

  1101001   (minuend)
+ 0101010   (2's complement of subtrahend)
-----------
 10010011

Step 3 — End-around carry rule: A carry-out of the MSB (the leading 11) is generated, so the result is positive; discard the carry.

Result=00100112=(19)10\text{Result} = 0010011_2 = (19)_{10}

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

Hex → Decimal:

2×162+A×161+F×160+C×1612\times16^2 + A\times16^1 + F\times16^0 + C\times16^{-1} =2×256+10×16+15×1+12/16=512+160+15+0.75=(687.75)10= 2\times256 + 10\times16 + 15\times1 + 12/16 = 512 + 160 + 15 + 0.75 = (687.75)_{10}

Hex → Octal (via binary, 4 bits per hex digit):

2=0010,  A=1010,  F=1111,  C=11002=0010,\; A=1010,\; F=1111,\; C=1100

So (2AF.C)16=(001010101111.1100)2=1010101111.112(2AF.C)_{16} = (0010\,1010\,1111\,.\,1100)_2 = 1010101111.11_2.

Regroup in 3-bit groups from the binary point:

  • Integer: 001010101111=1257001\,010\,101\,111 = 1257
  • Fraction: 110=6110 = 6
(2AF.C)16=(687.75)10=(1257.6)8\boxed{(2AF.C)_{16} = (687.75)_{10} = (1257.6)_8}

(b) Weighted and Non-weighted Codes

Weighted code: each bit position carries a fixed numerical weight, and the digit value equals the weighted sum of its bits (e.g., BCD 8421, 2421). Non-weighted code: positions carry no fixed weight, so the value is not a simple weighted sum (e.g., Gray code, Excess-3).

Gray code (non-weighted, reflected binary): successive numbers differ in exactly one bit. Conversion from binary: MSB stays the same, each lower Gray bit gi=bi+1big_i = b_{i+1} \oplus b_i.

DecimalBinaryGray
0000000
1001001
2010011
3011010

Application: shaft/rotary position encoders and K-map ordering, where single-bit change avoids switching glitches.

Excess-3 code (non-weighted, self-complementing): each decimal digit is coded as its BCD value plus 3. Example: 44+3=7=01114 \to 4+3 = 7 = 0111; 912=11009 \to 12 = 1100.

DecimalExcess-3
00011
40111
91100

Application: used in older BCD arithmetic units because it is self-complementing (the 1's complement of a code word gives the 9's complement of the digit), simplifying subtraction.

number-systemscodesboolean-algebra
2long12 marks

(a) Simplify the Boolean function F(A,B,C,D)=m(0,1,2,5,8,9,10)+d(3,11,15)F(A,B,C,D)=\sum m(0,1,2,5,8,9,10)+\sum d(3,11,15) using a four-variable Karnaugh map. Obtain the minimal sum-of-products expression and implement it using only NAND gates. [8]

(b) State and prove DeMorgan's theorems for two variables, and prove that a positive logic X-OR gate is equivalent to a negative logic X-NOR gate. [4]

(a) K-map Simplification of F(A,B,C,D)=m(0,1,2,5,8,9,10)+d(3,11,15)F(A,B,C,D)=\sum m(0,1,2,5,8,9,10)+\sum d(3,11,15)

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

AB\CD00011110
001 (0)1 (1)d (3)1 (2)
010 (4)1 (5)0 (7)0 (6)
110 (12)0 (13)d (15)0 (14)
101 (8)1 (9)d (11)1 (10)

Grouping (using don't-cares to enlarge groups):

  • BCB'C' — cells 0,1,8,9 (an eight-cell band combined): minterms 0,1,8,9 give BCB'C'.
  • BDB'D' — cells 0,2,8,10 give BDB'D'.
  • ACDA'C'D — cells 1,5 (with 3 as don't-care assists, but the tight group of 1 and 5): minterm 5 needs covering. Cells 1 and 5 give ACDA'C'D. Using don't-care 3, group 1,3,5,7? — 7 is 0, so the valid pair is ACDA'C'D covering 1,5.

Combining the prime implicants that cover all required 1's:

F=BC+BD+ACD\boxed{F = B'C' + B'D' + A'C'D}

Check: BCB'C' covers 0,1,8,9; BDB'D' covers 0,2,8,10; ACDA'C'D covers 1,5. All required minterms covered.

NAND-only implementation: A two-level SOP maps directly to two-level NAND-NAND. Each product term is formed by a NAND gate (with its inputs), and the term outputs feed a final NAND gate:

F=(BC)(BD)(ACD)F = \overline{\overline{(B'C')}\cdot\overline{(B'D')}\cdot\overline{(A'C'D)}}

Describe: three NAND gates produce BC\overline{B'C'}, BD\overline{B'D'}, ACD\overline{A'C'D} (literals B,C,DB',C',D' obtained by inverters or available complements); a fourth NAND gate combines them to give FF. This is the standard NAND-NAND realization of an SOP function.

(b) DeMorgan's Theorems and XOR/XNOR Equivalence

DeMorgan's Theorems:

A+B=AB,AB=A+B\overline{A+B} = \overline{A}\cdot\overline{B}, \qquad \overline{A\cdot B} = \overline{A}+\overline{B}

Proof by truth table (theorem 1):

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

Columns match for all input combinations, proving A+B=AB\overline{A+B}=\overline{A}\,\overline{B}. The second theorem follows identically.

Positive-logic XOR = Negative-logic XNOR: In positive logic, HIGH voltage = 1. Under negative logic, the same physical HIGH represents 0 and LOW represents 1, so every input/output value is complemented. For an XOR gate, the negative-logic function is (AB)\overline{(\overline{A}\oplus\overline{B})}. Since AB=AB\overline{A}\oplus\overline{B} = A\oplus B, we get AB=AB\overline{A\oplus B} = A\odot B (XNOR). Hence a physical XOR gate read in negative logic behaves as an XNOR gate.

k-mapsboolean-algebranand-implementation
3long16 marks

(a) Design a synchronous sequential circuit that detects the input sequence "1011" (overlapping allowed) and produces an output of 1 whenever the sequence is detected. Draw the state diagram, construct the state table, perform state assignment, and implement the circuit using JK flip-flops. Show the excitation table and the simplified flip-flop input equations. [10]

(b) Differentiate between a Moore machine and a Mealy machine. Explain the role of state reduction in sequential circuit design with an example. [6]

(a) "1011" Sequence Detector (overlapping) using JK Flip-flops

States (Mealy machine, output depends on input + state):

  • S0S_0: no useful prefix
  • S1S_1: got "1"
  • S2S_2: got "10"
  • S3S_3: got "101"

State diagram (described): From S0S_0: input 1 → S1S_1, 0 → S0S_0. From S1S_1: 1 → S1S_1, 0 → S2S_2. From S2S_2: 1 → S3S_3, 0 → S0S_0. From S3S_3: 1 → S1S_1 with output 1 (overlap: the final 1 starts a new "1"), 0 → S2S_2.

State / output table:

Presentx=0 → next, outx=1 → next, out
S0S_0S0S_0, 0S1S_1, 0
S1S_1S2S_2, 0S1S_1, 0
S2S_2S0S_0, 0S3S_3, 0
S3S_3S2S_2, 0S1S_1, 1

State assignment: S0=00, S1=01, S2=10, S3=11S_0=00,\ S_1=01,\ S_2=10,\ S_3=11 (flip-flops Q1Q0Q_1Q_0).

Transition table:

Q1Q0Q_1Q_0xQ1+Q0+Q_1^+Q_0^+out
000000
001010
010100
011010
100000
101110
110100
111011

JK excitation (rule: 00:J=0,K=×0\to0:J=0,K=\times; 01:J=1,K=×0\to1:J=1,K=\times; 10:J=×,K=11\to0:J=\times,K=1; 11:J=×,K=01\to1:J=\times,K=0):

Q1Q0Q_1Q_0xJ1K1J_1K_1J0K0J_0K_0
0000× 0×(Q0 0→0) 0×
001
010×1
011×0
100×1
101×0
110×0×1
111×0×0

Simplified input equations (from K-maps over Q1,Q0,xQ_1,Q_0,x):

J1=Q0x,K1=Q0xJ_1 = Q_0 x' ,\quad K_1 = Q_0' x' J0=x,K0=Q1    (i.e. K0=Q1+x after simplification)J_0 = x ,\quad K_0 = Q_1' \;\;(\text{i.e. } K_0 = \overline{Q_1}+x' \text{ after simplification}) Output Z=Q1Q0x\text{Output } Z = Q_1 Q_0 x

Implementation: Two JK flip-flops clocked together; combinational gates realize the four input equations above, and an AND gate Q1Q0xQ_1Q_0x produces the output ZZ.

(b) Moore vs Mealy Machine

FeatureMooreMealy
Output depends onPresent state onlyPresent state and input
Output timingSynchronous, changes with stateCan change asynchronously with input
Number of statesUsually moreUsually fewer
Output stabilityMore stable (glitch-free)May glitch on input change

State reduction removes redundant/equivalent states — two states are equivalent if, for every input, they produce the same output and go to equivalent next states. Merging them reduces flip-flop count and gate cost. Example: if states S2S_2 and S5S_5 always give the same output and equivalent next states, replace all references to S5S_5 with S2S_2; a machine of 6 states reducible to 4 needs only 2 flip-flops instead of 3.

sequential-circuit-designflip-flopscounters
4long10 marks

(a) Design a full adder using two half adders and explain its operation with a truth table. Show how four full adders can be cascaded to build a 4-bit binary parallel adder. [6]

(b) Implement the Boolean function F(A,B,C)=m(1,3,5,6)F(A,B,C)=\sum m(1,3,5,6) using an 8×18\times1 multiplexer, and explain how the same function can be realized with a 4×14\times1 multiplexer. [4]

(a) Full Adder from Two Half Adders

A half adder adds two bits: S=ABS = A\oplus B, C=ABC = A\cdot B. A full adder adds three bits A,B,CinA,B,C_{in}.

Truth table:

ABCinC_{in}SumCoutC_{out}
00000
00110
01010
01101
10010
10101
11001
11111
Sum=ABCin,Cout=AB+Cin(AB)\text{Sum} = A\oplus B\oplus C_{in}, \qquad C_{out} = AB + C_{in}(A\oplus B)

Using two half adders: HA-1 adds A,BA,B giving sum S1=ABS_1=A\oplus B and carry C1=ABC_1=AB. HA-2 adds S1S_1 and CinC_{in} giving final Sum =S1Cin=S_1\oplus C_{in} and carry C2=S1CinC_2 = S_1 C_{in}. An OR gate combines: Cout=C1+C2=AB+(AB)CinC_{out}=C_1+C_2 = AB + (A\oplus B)C_{in}.

4-bit parallel (ripple-carry) adder: Cascade four full adders FA0..FA3. The carry-out of each stage feeds the carry-in of the next: Cin0=0C_{in0}=0, C1=Cout0C_1=C_{out0}, ..., producing S0S1S2S3S_0S_1S_2S_3 and final carry C4C_4. The carry ripples from LSB to MSB.

(b) F(A,B,C)=m(1,3,5,6)F(A,B,C)=\sum m(1,3,5,6) with multiplexers

Using an 8×18\times1 MUX: Apply A,B,CA,B,C to select lines S2S1S0S_2S_1S_0. Tie each data input Ik=1I_k=1 for minterms in the list, else 0:

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

The MUX output equals FF directly.

Using a 4×14\times1 MUX: Use A,BA,B as select lines; express each data input as a function of CC (the residual variable):

ABABmintermsFF in terms of CC
00 (m0,m1)m1=1, m0=0CC
01 (m2,m3)m3=1, m2=0CC
10 (m4,m5)m5=1, m4=0CC
11 (m6,m7)m6=1, m7=0CC'

So I0=I1=I2=CI_0=I_1=I_2=C and I3=CI_3=C'. The 4×14\times1 MUX with these inputs realizes FF using one less variable on the select lines.

combinational-circuitsaddersmultiplexers
B

Section B: Short Answer Questions

Attempt all / any as specified.

9 questions
5short6 marks

Design a combinational logic circuit for a BCD-to-seven-segment display decoder for a common-cathode display. Write the truth table for any two of the output segments and derive their simplified Boolean expressions using K-maps.

BCD-to-Seven-Segment Decoder (Common-Cathode)

A common-cathode display lights a segment when its input is HIGH (1). The decoder has 4 BCD inputs A,B,C,DA,B,C,D (AA=MSB) and 7 outputs aagg. Inputs 10–15 are don't-cares (dd). Digit patterns (segments lit):

DecABCDABCDa b c d e f g
000001 1 1 1 1 1 0
100010 1 1 0 0 0 0
200101 1 0 1 1 0 1
300111 1 1 1 0 0 1
401000 1 1 0 0 1 1
501011 0 1 1 0 1 1
601101 0 1 1 1 1 1
701111 1 1 0 0 0 0
810001 1 1 1 1 1 1
910011 1 1 1 0 1 1

Segment a truth table and K-map

a=1a=1 for digits 0,2,3,5,6,7,8,9 → a=0a=0 only for 1 and 4. So m(0,2,3,5,6,7,8,9)+d(10..15)\sum m(0,2,3,5,6,7,8,9)+d(10..15).

K-map simplification gives:

a=A+C+BD+BDa = A + C + BD + B'D'

Segment b truth table and K-map

b=1b=1 for 0,1,2,3,4,7,8,9 → b=0b=0 for 5 and 6. So m(0,1,2,3,4,7,8,9)+d(10..15)\sum m(0,1,2,3,4,7,8,9)+d(10..15).

K-map simplification gives:

b=B+CD+CDb = B' + C'D' + CD

(i.e. b=B+(CD)b = \overline{B} + (C\odot D) — segment b is OFF only when B=1B=1 and CDC\neq D, i.e. digits 5 and 6.)

Each output is realized as a two-level AND-OR (or NAND-NAND) network from these expressions; the remaining segments ccgg are derived identically.

decodersbcdseven-segment-display
6short6 marks

What is the difference between a decoder and an encoder? Design an octal-to-binary priority encoder, write its truth table, and explain the need for priority in such encoders.

Decoder vs Encoder

DecoderEncoder
nn inputs → 2n2^n outputs2n2^n (or more) inputs → nn outputs
Activates one output line for each input codeGenerates the binary code of the active input
Expands code to lines (1-of-2n2^n)Compresses lines to code
Example: 3-to-8 decoderExample: 8-to-3 encoder

Octal-to-Binary (8-to-3) Priority Encoder

Inputs D0D_0D7D_7, outputs A2A1A0A_2A_1A_0 plus a valid bit VV. Priority means if several inputs are active, the highest-numbered input wins. ×\times = don't-care.

D7D6D5D4D3D2D1D0D_7 D_6 D_5 D_4 D_3 D_2 D_1 D_0A2A1A0A_2 A_1 A_0V
0 0 0 0 0 0 0 0x x x0
0 0 0 0 0 0 0 10 0 01
0 0 0 0 0 0 1 x0 0 11
0 0 0 0 0 1 x x0 1 01
0 0 0 0 1 x x x0 1 11
0 0 0 1 x x x x1 0 01
0 0 1 x x x x x1 0 11
0 1 x x x x x x1 1 01
1 x x x x x x x1 1 11

Output expressions:

A2=D7+D6+D5+D4A_2 = D_7 + D_6 + D_5 + D_4 A1=D7+D6+D5D4D3+D5D4D2A_1 = D_7 + D_6 + \overline{D_5}\,\overline{D_4}D_3 + \overline{D_5}\,\overline{D_4}D_2 A0=D7+D6D5+D6D4D3+D6D4D2D1A_0 = D_7 + \overline{D_6}D_5 + \overline{D_6}\,\overline{D_4}D_3 + \overline{D_6}\,\overline{D_4}\,\overline{D_2}D_1 V=D0+D1++D7V = D_0+D_1+\dots+D_7

Need for priority: In an ordinary encoder, if two or more inputs are simultaneously active the output is an invalid superposition of codes. A priority encoder resolves this ambiguity by always encoding only the highest-priority active input, guaranteeing a meaningful output. The valid bit VV distinguishes the all-zero input (no active line) from the code for D0D_0.

encoderspriority-encoderdecoders
7short6 marks

Explain the working of an SR latch using NOR gates and discuss its invalid state. Describe how a master-slave JK flip-flop eliminates the race-around condition, with the help of a timing diagram.

NOR-gate SR Latch

Two cross-coupled NOR gates: Q=R+QQ = \overline{R + \overline{Q}} and Q=S+Q\overline{Q} = \overline{S + Q}. Inputs SS (set), RR (reset) are active-HIGH.

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

Invalid state: When S=R=1S=R=1, both NOR outputs are forced to 00, so Q=Q=0Q=\overline{Q}=0 — they are no longer complementary. Worse, if both inputs then return to 00 simultaneously, the latch enters an unpredictable (race) state because the final value depends on which gate switches faster. Hence S=R=1S=R=1 is forbidden.

Master-Slave JK Flip-flop and Race-Around

Race-around occurs in a level-triggered JK flip-flop when J=K=1J=K=1: while the clock is HIGH, the feedback makes the output toggle repeatedly (oscillate) because the output keeps changing the inputs as long as the clock stays high. If the clock pulse width tpt_p is larger than the propagation delay, the final state is uncertain.

Master-slave configuration uses two JK latches in series:

  • The master is enabled when CLK = 1 and accepts the J,K inputs.
  • The slave is enabled when CLK = 0 (inverted clock) and copies the master's output.

Because master and slave are never transparent at the same time, the output of the whole flip-flop changes only once per clock cycle (on the falling edge effectively), eliminating multiple toggles.

Timing diagram (described): During CLK HIGH, the master latches the new value (master output changes) but the slave output QQ holds. On the CLK falling edge, the slave transfers the master's value to QQ. With J=K=1J=K=1, QQ toggles exactly once per clock pulse instead of oscillating — the race-around condition is removed.

flip-flopslatchestiming
8short6 marks

Explain the operation of a 4-bit Serial-In Parallel-Out (SIPO) shift register using D flip-flops. Draw its logic diagram and show the timing waveforms when the serial data 1101 is shifted in.

4-bit Serial-In Parallel-Out (SIPO) Shift Register

Construction: Four D flip-flops (FF0–FF3) connected in cascade, all driven by a common clock. The serial data enters D0D_0 of FF0; each flip-flop's output feeds the next flip-flop's D input: D1=Q0D_1 = Q_0, D2=Q1D_2 = Q_1, D3=Q2D_3 = Q_2. The four outputs Q0,Q1,Q2,Q3Q_0,Q_1,Q_2,Q_3 are available in parallel.

Logic diagram (described):

Serial in --> D0 [FF0] Q0 --> D1 [FF1] Q1 --> D2 [FF2] Q2 --> D3 [FF3] Q3
                |            |            |            |
CLK ------------+------------+------------+------------+

Operation: On each rising clock edge, every flip-flop loads the value present at its D input, so the data shifts one position to the right per clock. After 4 clocks, the 4-bit word is fully loaded and read in parallel.

Shifting serial data 1101 (LSB first, i.e. order 1,0,1,1 applied at serial input):

Assume serial input sequence applied per clock = 1, 1, 0, 1 (entering so that final pattern appears). Tracking Q0Q1Q2Q3Q_0Q_1Q_2Q_3 starting from 0000:

ClockSerial inQ0Q_0Q1Q_1Q2Q_2Q3Q_3
Initial0000
111000
211100
300110
411011

After 4 clock pulses the register holds the shifted data Q0Q1Q2Q3=1011Q_0Q_1Q_2Q_3 = 1011, now available in parallel.

Timing waveform (described): The clock is a square wave. The serial-input waveform shows the bit sequence. Each QQ waveform is a one-clock-delayed copy of the stage before it, so Q0Q_0 follows serial-in by one clock, Q1Q_1 lags Q0Q_0 by one clock, and so on — illustrating the right-shift of data through the register.

registersshift-registerstiming
9short6 marks

Design a MOD-10 asynchronous (ripple) counter using JK flip-flops. Draw the logic diagram and the output timing waveforms, and explain how the counter resets at the count of ten.

MOD-10 Asynchronous (Ripple) Counter using JK Flip-flops

A MOD-10 (decade) counter counts 0000 → 1001 (0–9) and resets to 0000 on the 10th pulse. It needs 4 JK flip-flops (Q0Q_0=LSB).

Ripple connections: All J,K tied HIGH (toggle mode). Q0Q_0 is clocked by the input clock; each following flip-flop is clocked by the output of the previous stage (for a negative-edge counter, QnQ_n drives the clock of stage n+1n{+}1).

Reset logic: The counter must clear at count 10=1010210 = 1010_2, i.e. when Q3=1Q_3=1 and Q1=1Q_1=1. A NAND gate detects this:

CLR=Q3Q1\text{CLR} = \overline{Q_3 \cdot Q_1}

When the count momentarily reaches 10101010, Q3Q1=11Q_3Q_1=11, the NAND output goes LOW and is fed to the active-LOW asynchronous CLEAR of all flip-flops, instantly resetting the counter to 00000000.

Logic diagram (described):

CLK -> [JK0] Q0 -> clk[JK1] Q1 -> clk[JK2] Q2 -> clk[JK3] Q3
  J=K=1 on all.   Q3,Q1 -> NAND -> CLR (active-low) of all FFs

Count sequence:

PulseQ3Q2Q1Q0Q_3 Q_2 Q_1 Q_0
00000
10001
......
91001
101010 → CLEAR → 0000

Timing waveforms (described): Q0Q_0 toggles every clock pulse (÷2), Q1Q_1 toggles every 2 pulses (÷4), Q2Q_2 every 4, Q3Q_3 every 8 — but the 10101010 glitch is detected and the count is forced back to 0000, so the sequence repeats every 10 clocks. Thus the counter resets at ten via the asynchronous CLEAR triggered when Q3=Q1=1Q_3=Q_1=1.

countersasynchronous-counterfrequency-division
10short6 marks

Differentiate between RAM and ROM. Explain how a combinational circuit can be implemented using a ROM, taking the example of a circuit that converts a 3-bit binary number to its square.

RAM vs ROM

RAMROM
Read and writePrimarily read-only
Volatile (loses data on power-off)Non-volatile (retains data)
Used for temporary/working storageUsed for permanent/firmware storage
Static (SRAM) or dynamic (DRAM)Mask, PROM, EPROM, EEPROM types

Implementing a Combinational Circuit with ROM

A ROM with nn address lines and mm data lines stores a complete truth table: the nn inputs form the address, and the stored mm-bit word is the output. Internally a ROM is a fixed AND array (full decoder) + programmable OR array, so it directly realizes any combinational function of nn variables.

Example: 3-bit binary → its square

Input A2A1A0A_2A_1A_0 (0–7); output is the square (0–49), needing 6 output bits. So a 23×62^3 \times 6 = 8×68\times6 ROM.

Input (dec)A2A1A0A_2A_1A_0SquareOutput O5O4O3O2O1O0O_5O_4O_3O_2O_1O_0
00000000000
10011000001
20104000100
30119001001
410016010000
510125011001
611036100100
711149110001

Operation: The 3 input bits address one of the 8 ROM locations; the stored 6-bit word at that location is the binary square, produced directly at the output. No gate-level minimization is needed — the ROM "looks up" the answer, making it a simple and flexible way to implement combinational logic such as code converters and look-up tables.

memorypldsrom
11short6 marks

Distinguish between PLA and PAL with the help of their basic block diagrams. Implement the functions F1(A,B,C)=m(0,1,3,4)F_1(A,B,C)=\sum m(0,1,3,4) and F2(A,B,C)=m(1,2,3,4,5)F_2(A,B,C)=\sum m(1,2,3,4,5) using a PLA, and show the PLA programming table.

PLA vs PAL

Both are programmable logic devices with two arrays (AND then OR).

PLA (Programmable Logic Array)PAL (Programmable Array Logic)
AND array programmable, OR array programmableAND array programmable, OR array fixed
More flexible (product terms can be shared by any output)Less flexible (fixed group of product terms per output)
Slower, costlierFaster, cheaper, easier to program

Block diagrams (described): Inputs (with their complements) feed an AND-plane producing product terms. In a PLA both the input-to-AND connections and the AND-to-OR connections are programmable fuses. In a PAL the AND-plane is programmable but each OR gate is hard-wired to a fixed subset of product terms.

PLA Implementation

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

Simplify with K-maps:

F1F_1: minterms 0,1,3,4.

F1=AB+AC+BC    minimal: F1=AB+AC+BCF_1 = A'B' + A'C + B'C' \;\Rightarrow\; \text{minimal: } F_1 = A'B' + A'C + B'C'

Checking: ABA'B' (0,1), ACA'C (1,3), BCB'C' (0,4). Covers 0,1,3,4. ✓

F2F_2: minterms 1,2,3,4,5.

F2=AC+AB+BCF_2 = A'C + AB' + BC'

Checking: ACA'C (1,3), ABAB' (4,5), BCBC' (2). Covers 1,2,3,4,5. ✓

Shared product terms: Both functions use ACA'C, so the PLA shares it.

Product terms used: P1=ABP_1=A'B', P2=ACP_2=A'C (shared), P3=BCP_3=B'C', P4=ABP_4=AB', P5=BCP_5=BC'.

PLA Programming Table

Inputs (A B C)F1F_1F2F_2
P1=ABP_1=A'B'0 0 –1
P2=ACP_2=A'C0 – 111
P3=BCP_3=B'C'– 0 01
P4=ABP_4=AB'1 0 –1
P5=BCP_5=BC'– 1 01

( = don't-connect; a 1 in the FF columns marks the OR-array fuse left intact.) Thus 5 product terms realize both outputs, sharing ACA'C.

pldsplapal
12short4 marks

Define analog and digital signals. State the logic gate that acts as a universal gate and justify your answer by realizing the NOT, AND and OR operations using only that gate.

Analog vs Digital Signals

  • Analog signal: a continuous signal that can take any value within a range and varies smoothly with time (e.g., a sine wave, microphone voltage).
  • Digital signal: a discrete signal that takes only a finite set of levels — typically two (LOW = 0, HIGH = 1) — changing in steps (e.g., a clock pulse train).

Universal Gate

The NAND gate (and equally the NOR gate) is a universal gate because any Boolean function — and hence NOT, AND, OR — can be built using only NAND gates.

NOT (tie both inputs together):

AA=A\overline{A\cdot A} = \overline{A}

AND (NAND followed by NAND-inverter):

AB=AB\overline{\overline{A\cdot B}} = A\cdot B

First NAND gives AB\overline{AB}; second NAND used as inverter gives ABAB.

OR (invert each input with a NAND, then NAND them — DeMorgan):

AB=A+B\overline{\overline{A}\cdot\overline{B}} = A + B

Use two NANDs as inverters to get A,B\overline{A},\overline{B}, then a NAND of these gives A+BA+B.

Since NOT, AND and OR (a functionally complete set) are all realizable with NAND alone, the NAND gate is universal.

logic-gatesdigital-signalsboolean-algebra
13short4 marks

Design a 2-bit magnitude comparator that produces three outputs indicating A>BA>B, A=BA=B and A<BA<B. Write the truth table and the simplified output expressions.

2-bit Magnitude Comparator

Compares A=A1A0A = A_1A_0 and B=B1B0B = B_1B_0, giving three outputs: GG (A>BA>B), EE (A=BA=B), LL (A<BA<B).

Truth table (16 rows; summarized by relation):

A1A0A_1A_0B1B0B_1B_0A>BA{>}BA=BA{=}BA<BA{<}B
0000010
0001/10/11001
0100100
0101010
0110/11001
1000/01100
1010010
1011001
1100/01/10100
1111010

Simplified output expressions:

Equality — both bit pairs equal:

E=(A1B1)(A0B0)=(A1B1)  (A0B0)E = (A_1\odot B_1)\,(A_0\odot B_0) = \overline{(A_1\oplus B_1)}\;\overline{(A_0\oplus B_0)}

Greater than — compare MSB first, then LSB:

G=A1B1+(A1B1)A0B0G = A_1\overline{B_1} + (A_1\odot B_1)\,A_0\overline{B_0}

Less than — by complement / symmetry:

L=A1B1+(A1B1)A0B0L = \overline{A_1}B_1 + (A_1\odot B_1)\,\overline{A_0}B_0

Note G+E+L=1G+E+L=1 always (exactly one output is high). The circuit uses XNOR gates for bit equality plus AND/OR gates for the GG and LL terms.

combinational-circuitscomparatorssubtractors

Frequently asked questions

Where can I find the BE Computer Engineering (IOE, TU) Digital Logic (IOE, EX 502) question paper 2079?
The full BE Computer Engineering (IOE, TU) Digital Logic (IOE, EX 502) 2079 (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 (IOE, EX 502) 2079 paper come with solutions?
Yes. Every question on this Digital Logic (IOE, EX 502) 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 (IOE, TU) Digital Logic (IOE, EX 502) 2079 paper?
The BE Computer Engineering (IOE, TU) Digital Logic (IOE, EX 502) 2079 paper carries 80 full marks and is meant to be completed in 180 minutes, across 13 questions.
Is practising this Digital Logic (IOE, EX 502) past paper free?
Yes — reading and attempting this Digital Logic (IOE, EX 502) past paper on Kekkei is completely free.