Skip to main content

Chapter 3

Digital Logic

TU BIT past exam questions

Past questions and answers

72 questions set from this chapter, 1 of them more than once; 1 is most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 3 of 6 exams
  • 2081 · 5 marks

Convert (257)8(257)_8 into hexadecimal and decimal number system.

Similar questions: Convert 51966.57 decimal number system into (2078) · Convert $(110.101)_8$ into binary and decimal (2079)

Answer

Convert (257)8(257)_8.

To hexadecimal: convert each octal digit to 3 bits, regroup into 4 bits.

2=010,5=101,7=1112 = 010,\quad 5 = 101,\quad 7 = 111

(257)8=(010 101 111)2=(0 1010 1111)2(257)_8 = (010\,101\,111)_2 = (0\,1010\,1111)_2

Grouping in fours from the right: 0000 1010 1111=(0AF)160000\ 1010\ 1111 = (0AF)_{16}.

(257)8=(AF)16(257)_8 = (AF)_{16}

To decimal

2×82+5×81+7×80=128+40+7=1752 \times 8^2 + 5 \times 8^1 + 7 \times 8^0 = 128 + 40 + 7 = 175

(257)8=(175)10(257)_8 = (175)_{10}

Check: (AF)16=10×16+15=175(AF)_{16} = 10 \times 16 + 15 = 175.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Asked 2 times
  • 2078 · 5 marks
  • 2079 · 5 marks

Define Half-subtractor with truth table and logic diagram.

Answer

Half-subtractor

A half-subtractor is a combinational circuit that subtracts two single bits, A−BA - B, and produces two outputs: the difference DD and the borrow BoB_o (borrow needed from the next higher bit). It has no borrow input, which is why it is "half".

Truth table

ABDifference DBorrow BoB_o
0000
0111
1010
1100

(For 0−10-1: the result is 1 with a borrow of 1.)

Boolean expressions

D=A′B+AB′=A⊕BD = A'B + AB' = A\oplus B

Bo=A′BB_o = A'B

Logic diagram

A ---+-------------[XOR]------------> D = A xor B
     |               ^
B ---|---+-----------+
     |   |
     +-[NOT]--+
         |    +--[AND]-------------> Bo = A'.B
B -------+----------^

That is: one XOR gate gives DD; AA is inverted by a NOT gate and ANDed with BB to give BoB_o.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Convert 51966.57 decimal number system into octal number system and hexadecimal number system.

Similar questions: Convert $(257)_8$ into hexadecimal and decimal (2081)

Answer

Convert (51966.57)10(51966.57)_{10} to octal and hexadecimal.

Integer part 51966

Hexadecimal (divide by 16):

DivisionQuotientRemainder
51966 / 16324714 (E)
3247 / 1620215 (F)
202 / 161210 (A)
12 / 16012 (C)

Reading upward: CAFE16CAFE_{16}.

Octal (divide by 8):

DivisionQuotientRemainder
51966 / 864956
6495 / 88117
811 / 81013
101 / 8125
12 / 814
1 / 801

Reading upward: 1453768145376_8.

Fraction part 0.57

Multiply by 16 repeatedly:

  • 0.57×16=9.12→90.57\times16 = 9.12 \to 9
  • 0.12×16=1.92→10.12\times16 = 1.92 \to 1
  • 0.92×16=14.72→E0.92\times16 = 14.72 \to E
  • 0.72×16=11.52→B0.72\times16 = 11.52 \to B
  • 0.52×16=8.32→80.52\times16 = 8.32 \to 8

Hex fraction ≈.91EB8\approx .91EB8 (it does not terminate).

Multiply by 8 repeatedly:

  • 0.57×8=4.56→40.57\times8 = 4.56 \to 4
  • 0.56×8=4.48→40.56\times8 = 4.48 \to 4
  • 0.48×8=3.84→30.48\times8 = 3.84 \to 3
  • 0.84×8=6.72→60.84\times8 = 6.72 \to 6
  • 0.72×8=5.76→50.72\times8 = 5.76 \to 5
  • 0.76×8=6.08→60.76\times8 = 6.08 \to 6

Octal fraction ≈.443656\approx .443656.

Result

(51966.57)10≈(145376.443656)8≈(CAFE.91EB8)16(51966.57)_{10} \approx (145376.443656)_8 \approx (CAFE.91EB8)_{16}

Check: CAFE16CAFE_{16} in binary is 1100 1010 1111 11101100\,1010\,1111\,1110; regrouping in threes gives 1 100 101 011 111 110=14537681\,100\,101\,011\,111\,110 = 145376_8.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Convert (110.101)8(110.101)_8 into binary and decimal number system.

Similar questions: Convert $(257)_8$ into hexadecimal and decimal (2081)

Answer

Convert (110.101)8(110.101)_8.

To binary (each octal digit becomes 3 bits)

  • Integer: 1=001, 1=001, 0=0001 = 001,\ 1 = 001,\ 0 = 000 giving 001 001 000=1001000001\,001\,000 = 1001000.
  • Fraction: 1=001, 0=000, 1=0011 = 001,\ 0 = 000,\ 1 = 001 giving .001 000 001.001\,000\,001.

(110.101)8=(1001000.001000001)2(110.101)_8 = (1001000.001000001)_2

To decimal

Integer part: 1⋅82+1⋅81+0⋅80=64+8+0=721\cdot8^2 + 1\cdot8^1 + 0\cdot8^0 = 64+8+0 = 72.

Fraction part: 1⋅8−1+0⋅8−2+1⋅8−3=0.125+0+0.001953125=0.1269531251\cdot8^{-1} + 0\cdot8^{-2} + 1\cdot8^{-3} = 0.125 + 0 + 0.001953125 = 0.126953125.

(110.101)8=(72.126953125)10(110.101)_8 = (72.126953125)_{10}

Check from binary: 10010002=64+8=721001000_2 = 64+8 = 72 and .0010000012=2−3+2−9=0.125+0.001953125.001000001_2 = 2^{-3}+2^{-9} = 0.125+0.001953125, which agrees.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

What is magnitude comparator? Design 2-bit magnitude comparator.

Similar questions: Define magnitude comparator? Design a 4-bit (2081)

Answer

Magnitude comparator

A magnitude comparator is a combinational circuit that compares two binary numbers AA and BB and gives three outputs: A>BA>B, A=BA=B and A<BA<B, exactly one of which is 1.

2-bit comparator design

Let A=A1A0A=A_1A_0 and B=B1B0B=B_1B_0. There are 4 inputs, so 16 rows in the truth table:

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

Equations

A=BA=B when both bit pairs are equal. Let xi=Ai⊙Bi=AiBi+Ai′Bi′x_i = A_i\odot B_i = A_iB_i + A_i'B_i' (XNOR).

(A=B)=x1x0(A=B) = x_1 x_0

A>BA>B when the MSB of AA is larger, or the MSBs are equal and the LSB of AA is larger:

(A>B)=A1B1′+x1A0B0′(A>B) = A_1B_1' + x_1 A_0B_0'

A<BA<B similarly:

(A<B)=A1′B1+x1A0′B0(A<B) = A_1'B_1 + x_1 A_0'B_0

Circuit. Two XNOR gates give x1,x0x_1,x_0; a 2-input AND gives A=BA=B. For A>BA>B: AND gates A1B1′A_1B_1' and x1A0B0′x_1A_0B_0' feed an OR gate. For A<BA<B: AND gates A1′B1A_1'B_1 and x1A0′B0x_1A_0'B_0 feed an OR gate. NOT gates provide the complements of the inputs.

Check: A=10,B=01A=10,B=01: A1B1′=1A_1B_1'=1, so A>B=1A>B=1; x1=0x_1=0 so A=B=0A=B=0; A1′B1=0A_1'B_1=0 and x1⋅(…)=0x_1\cdot(\ldots)=0 so A<B=0A<B=0. Correct.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Explain the operation of a 4-bit parallel-in parallel-out shift register with data input 1010.

Similar questions: Define shift register. Explain the operation (2081)

Answer

A 4-bit PIPO shift register consists of four D flip-flops with a common clock. Each flip-flop has its own data input (A,B,C,DA, B, C, D) and its own output (QA,QB,QC,QDQ_A, Q_B, Q_C, Q_D).

 A=1   B=0   C=1   D=0     (data input 1010)
  |     |     |     |
[FF_A][FF_B][FF_C][FF_D] <- common CLK
  |     |     |     |
 Q_A   Q_B   Q_C   Q_D

Operation with data 1010

  1. Before the clock pulse, the register holds an old value (say 0000) and the parallel inputs are set to A=1,B=0,C=1,D=0A=1, B=0, C=1, D=0.
  2. At the active clock edge, each flip-flop copies its input: QA=1Q_A = 1, QB=0Q_B = 0, QC=1Q_C = 1, QD=0Q_D = 0.
  3. The register now holds 1010 and all four bits appear at the outputs at the same time, in a single clock pulse. The data stays stored until the next clock edge or until it is cleared.
Clock pulseQAQBQCQDQ_A Q_B Q_C Q_D
Before0000
After 1st pulse1010

No shifting is involved between the stages. A clear input can reset all flip-flops to 0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 2+8 marks

Define magnitude comparator? Design a 4-bit magnitude comparator circuit.

Similar questions: What is magnitude comparator? Design 2-bit (2079)

Answer

Magnitude comparator: a combinational circuit that compares two binary numbers AA and BB and indicates whether A>BA > B, A=BA = B or A<BA < B using three outputs.

4-bit comparator design: let A=A3A2A1A0A = A_3A_2A_1A_0 and B=B3B2B1B0B = B_3B_2B_1B_0.

Step 1: bit equality (XNOR gates)

xi=Ai⊙Bi=AiBi+Ai′Bi′(i=0,1,2,3)x_i = A_i \odot B_i = A_iB_i + A_i'B_i' \quad (i = 0,1,2,3)

Step 2: outputs

(A=B)=x3x2x1x0(A = B) = x_3x_2x_1x_0

(A>B)=A3B3′+x3A2B2′+x3x2A1B1′+x3x2x1A0B0′(A > B) = A_3B_3' + x_3A_2B_2' + x_3x_2A_1B_1' + x_3x_2x_1A_0B_0'

(A<B)=A3′B3+x3A2′B2+x3x2A1′B1+x3x2x1A0′B0(A < B) = A_3'B_3 + x_3A_2'B_2 + x_3x_2A_1'B_1 + x_3x_2x_1A_0'B_0

Reasoning: comparison starts at the MSB. If A3>B3A_3 > B_3 then A>BA > B. If the MSBs are equal (x3=1x_3 = 1), the next bits are compared, and so on. The numbers are equal only if all four bit pairs are equal.

Logic diagram

A3 B3 -> XNOR -> x3 --+
A2 B2 -> XNOR -> x2 --+--> AND4 ---------------------> A = B
A1 B1 -> XNOR -> x1 --+
A0 B0 -> XNOR -> x0 --+

A>B : 4 AND terms (with NOT on B_i) -> OR4 -> A > B
A<B : 4 AND terms (with NOT on A_i) -> OR4 -> A < B

The circuit needs 4 XNOR gates, a few NOT gates, AND gates (of 2, 3, 4, 5 inputs) and two 4-input OR gates. (The IC 7485 is a standard 4-bit comparator.) For example, A=1011A = 1011, B=1001B = 1001: x3=1x_3 = 1, x2=1x_2 = 1, x1=0x_1 = 0, so A>BA > B through the term x3x2A1B1′=1x_3x_2A_1B_1' = 1.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 1+4 marks

Define shift register. Explain the operation of 4-bit Serial-In Serial-Out Shift register with data input 1011.

Similar questions: Explain the operation of a 4-bit (2080)

Answer

Shift register: a sequential circuit made of a group of cascaded flip-flops, sharing a common clock, used to store binary data and shift it left or right by one position on each clock pulse.

4-bit SISO shift register (four D flip-flops)

Serial   +----+   +----+   +----+   +----+
 in ---->| FF3|-->| FF2|-->| FF1|-->| FF0|----> Serial out
         +----+   +----+   +----+   +----+
CLK common to all

Operation with input 1011 (the bits are entered LSB first: 1, 1, 0, 1; the register initially holds 0000, outputs shown as Q3Q2Q1Q0Q_3Q_2Q_1Q_0)

Clock pulseSerial inQ3Q_3Q2Q_2Q1Q_1Q0Q_0
Initial-0000
111000
211100
300110
411011

After 4 clock pulses the register holds 1011 (the word is loaded). For serial output, four more pulses (with 0 input) shift the data out at Q0Q_0 in the order 1, 1, 0, 1 (first bit entered, first out).

Clock pulseSerial out (Q0Q_0)
51
61
70
81

At each pulse every flip-flop takes the value of the one before it, so data moves one position per pulse.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 10 marks

What is decoder? Design BCD to Decimal Decoder with truth table and logic diagram.

Answer

Decoder

A decoder is a combinational circuit that converts an nn-bit binary input code into up to 2n2^n unique output lines, activating exactly one output for each input combination.

BCD to decimal decoder (4-line to 10-line)

Inputs are the BCD digits A,B,C,DA, B, C, D (AA = MSB); outputs are D0D_0 to D9D_9. Input combinations 1010 to 1111 are invalid and produce no output (don't-care).

Truth table:

ABCDOutput high
0000D0D_0
0001D1D_1
0010D2D_2
0011D3D_3
0100D4D_4
0101D5D_5
0110D6D_6
0111D7D_7
1000D8D_8
1001D9D_9

Boolean expressions (using don't-cares to simplify):

D0=A′B′C′D′,D1=A′B′C′D,D2=B′CD′,D3=B′CD,D4=BC′D′D_0 = A'B'C'D',\quad D_1 = A'B'C'D,\quad D_2 = B'CD',\quad D_3 = B'CD,\quad D_4 = BC'D' D5=BC′D,D6=BCD′,D7=BCD,D8=AD′,D9=ADD_5 = BC'D,\quad D_6 = BCD',\quad D_7 = BCD,\quad D_8 = AD',\quad D_9 = AD

(Without don't-cares, each output is the full 4-input AND of the minterm, e.g. D8=AB′C′D′D_8 = AB'C'D'.)

Logic diagram: four inputs A,B,C,DA,B,C,D and their complements A′,B′,C′,D′A',B',C',D' feed ten AND gates, one per output. Each AND gate takes the literals shown in its expression above (4-input AND gates for D0,D1D_0, D_1, 3-input for D2D_2 to D7D_7, 2-input for D8,D9D_8, D_9); the output of the gate matching the input code goes to 1 and all others stay 0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 10 marks

Design a combinational circuit whose input is a four-bit number and output is 2's complement of the input number.

Answer

Let the input be A3A2A1A0A_3A_2A_1A_0 and the output Y3Y2Y1Y0Y_3Y_2Y_1Y_0, where YY is the 2's complement of AA (invert all bits and add 1).

Truth table:

A3A2A1A0A_3A_2A_1A_0Y3Y2Y1Y0Y_3Y_2Y_1Y_0
00000000
00011111
00101110
00111101
01001100
01011011
01101010
01111001
10001000
10010111
10100110
10110101
11000100
11010011
11100010
11110001

Simplifying with K-maps (or by the rule "copy bits up to and including the first 1 from the right, then invert the rest"):

Y0=A0Y_0 = A_0 Y1=A1⊕A0Y_1 = A_1 \oplus A_0 Y2=A2⊕(A1+A0)Y_2 = A_2 \oplus (A_1 + A_0) Y3=A3⊕(A2+A1+A0)Y_3 = A_3 \oplus (A_2 + A_1 + A_0)

Check: A=0110A = 0110: Y0=0Y_0=0, Y1=1⊕0=1Y_1 = 1\oplus 0 = 1, Y2=1⊕1=0Y_2 = 1 \oplus 1 = 0, Y3=0⊕1=1Y_3 = 0 \oplus 1 = 1, so Y=1010Y = 1010. Correct.

Logic diagram: Y0Y_0 is a direct wire from A0A_0; one XOR gate gives Y1Y_1; one OR gate plus one XOR gives Y2Y_2; a 3-input OR (or two 2-input ORs) plus one XOR gives Y3Y_3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 10 marks

What is ring counter? Explain ring counter with diagram, timing sequence and timing diagram.

Answer

Ring counter

A ring counter is a circular shift register in which the output of the last flip-flop is fed back to the input of the first. It is initialised so that a single 1 (the others 0) circulates around the register with each clock pulse. An nn-bit ring counter has nn states (modulus nn) and uses nn flip-flops.

Diagram (4-bit, using D flip-flops)

 +-----------------------------------------------+
 |                                               |
 +--> D Q0 --> D Q1 --> D Q2 --> D Q3 ----------+
      FF0       FF1       FF2       FF3
       ^         ^         ^         ^
 CLK --+---------+---------+---------+

All four flip-flops share the same clock. The QQ output of each flip-flop feeds the DD input of the next, and Q3Q_3 feeds back to D0D_0. A preset pulse sets Q0=1Q_0=1 and clears the others, giving the initial state 1000.

Timing (state) sequence

Clock pulseQ0Q_0Q1Q_1Q2Q_2Q3Q_3
0 (preset)1000
10100
20010
30001
41000

After 4 pulses the sequence repeats.

Timing diagram

CLK : _|-|_|-|_|-|_|-|_|-|_
Q0  : ---|_______|-------|__
Q1  : ___|-------|_______|--
Q2  : _______|-------|_______
Q3  : ___________|-------|___

Each output is high for exactly one clock period, and the high level moves from Q0Q_0 to Q3Q_3 in turn, so the outputs act as sequential timing pulses. Uses: sequence generators, control timing signals, and frequency division by nn.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Convert binary 1011.110 to decimal and hexadecimal.

Answer

Binary to decimal

(1011.110)2=1×23+0×22+1×21+1×20+1×2−1+1×2−2+0×2−3(1011.110)_2 = 1\times2^3 + 0\times2^2 + 1\times2^1 + 1\times2^0 + 1\times2^{-1} + 1\times2^{-2} + 0\times2^{-3} =8+0+2+1+0.5+0.25+0=11.75= 8 + 0 + 2 + 1 + 0.5 + 0.25 + 0 = 11.75

So (1011.110)2=(11.75)10(1011.110)_2 = (11.75)_{10}.

Binary to hexadecimal

Group in fours from the binary point: integer part 10111011, fractional part 11001100 (pad with a zero on the right).

1011=B,1100=C1011 = B,\qquad 1100 = C

So (1011.110)2=(B.C)16(1011.110)_2 = (B.C)_{16}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Subtract 1011.11 from 1010.10 using 1's and 2's complement.

Answer

Compute 1010.10−1011.111010.10 - 1011.11 (that is 10.5−11.75=−1.2510.5 - 11.75 = -1.25).

Using 1's complement

1's complement of the subtrahend 1011.111011.11 is 0100.000100.00.

1010.10+0100.00=1110.101010.10 + 0100.00 = 1110.10

There is no end-around carry, so the result is negative and is the 1's complement of the sum:

−(0001.01)=−1.25-(0001.01) = -1.25

Using 2's complement

2's complement of 1011.111011.11 = 0100.00+0000.01=0100.010100.00 + 0000.01 = 0100.01.

1010.10+0100.01=1110.111010.10 + 0100.01 = 1110.11

There is no carry out, so the result is negative; take the 2's complement of the sum: 0001.00+0000.01=0001.010001.00 + 0000.01 = 0001.01.

Result: −(0001.01)2=−1.2510-(0001.01)_2 = -1.25_{10}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Express a given Boolean function as a sum of minterms.

Answer

A minterm is a product (AND) term containing every variable of the function once, in complemented or uncomplemented form. A function in sum-of-minterms form is the OR of the minterms for which the function equals 1, written as Σm(…)\Sigma m(\ldots).

Method: make a truth table (or expand each product term by ANDing the missing variables with (x+x′)(x + x')) and list the rows where F=1F = 1.

Example: Express F(A,B,C)=A+B′CF(A,B,C) = A + B'C as a sum of minterms.

Expand the first term: A=A(B+B′)(C+C′)=ABC+ABC′+AB′C+AB′C′A = A(B + B')(C + C') = ABC + ABC' + AB'C + AB'C'.

Expand the second term: B′C=B′C(A+A′)=AB′C+A′B′CB'C = B'C(A + A') = AB'C + A'B'C.

Combining and removing the duplicate AB′CAB'C:

F=A′B′C+AB′C′+AB′C+ABC′+ABCF = A'B'C + AB'C' + AB'C + ABC' + ABC F=m1+m4+m5+m6+m7=Σm(1,4,5,6,7)F = m_1 + m_4 + m_5 + m_6 + m_7 = \Sigma m(1,4,5,6,7)

Check using the truth table: F=1F=1 for ABCABC = 001, 100, 101, 110, 111, which are exactly these minterms.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Simplify a Boolean function with don't-care conditions into SOP and POS forms.

Answer

Example: F(A,B,C,D)=Σm(1,3,7,11,15)F(A,B,C,D) = \Sigma m(1,3,7,11,15) with don't-care conditions d(0,2,5)d(0,2,5).

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

AB \ CD00011110
00X11X
010X10
110010
100010

SOP (group the 1s, using X where useful)

  • Quad m0,m1,m3,m2m_0, m_1, m_3, m_2 (top row) gives A′B′A'B'.
  • Quad m3,m7,m15,m11m_3, m_7, m_{15}, m_{11} (column CD=11CD=11) gives CDCD.

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

POS (group the 0s, using X where useful)

Zeros are m4,m6,m8,m9,m10,m12,m13,m14m_4, m_6, m_8, m_9, m_{10}, m_{12}, m_{13}, m_{14}.

  • m4,m6,m12,m14m_4, m_6, m_{12}, m_{14} gives BD′BD'.
  • m8,m9,m12,m13m_8, m_9, m_{12}, m_{13} gives AC′AC'.
  • m8,m10,m12,m14m_8, m_{10}, m_{12}, m_{14} gives AD′AD'.

F′=BD′+AC′+AD′F' = BD' + AC' + AD'

Complementing with De Morgan's theorem:

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

Both forms realise the same function on the required minterms (they may differ only on the don't-care entries).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Implement a full subtractor using two half subtractors and one OR gate.

Answer

Half subtractor (HS)

Inputs x,yx, y; outputs Difference D=x⊕yD = x \oplus y and Borrow B=x′yB = x'y.

Full subtractor

Inputs xx, yy and borrow-in BinB_{in}:

D=x⊕y⊕BinD = x \oplus y \oplus B_{in} Bout=x′y+(x⊕y)′BinB_{out} = x'y + (x \oplus y)'B_{in}

Implementation using two half subtractors and an OR gate

  • HS1 takes xx and yy: gives D1=x⊕yD_1 = x \oplus y and B1=x′yB_1 = x'y.
  • HS2 takes D1D_1 and BinB_{in}: gives D=D1⊕BinD = D_1 \oplus B_{in} (final difference) and B2=D1′BinB_2 = D_1' B_{in}.
  • An OR gate combines the two borrows: Bout=B1+B2B_{out} = B_1 + B_2.
x --+--[ HS1 ]-- D1 --[ HS2 ]-- D (difference)
y --+      |            |  ^
           B1           B2 |
Bin ----------------------+
           \             /
            +-- OR ----+--> Bout

Verification: Bout=x′y+(x⊕y)′BinB_{out} = x'y + (x\oplus y)'B_{in}, which is the full-subtractor borrow expression, so the circuit is correct.

Truth table check (x y Bin -> D Bout): 000->00, 001->11, 010->11, 011->10, 100->10, 101->01, 110->00, 111->11.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Define an SR latch with its logic diagram and truth table.

Answer

SR latch

An SR (Set-Reset) latch is a basic 1-bit memory element with two inputs, S (set) and R (reset), and two complementary outputs QQ and Q′Q'. It can be built from two cross-coupled NOR gates (active-high inputs) or two cross-coupled NAND gates (active-low inputs).

Logic diagram (NOR latch)

R ----+----------|\\
      |    NOR1  | )o---- Q
      |      +---|//
      |      |
      |      +-------+
      |              |
      |      +-------+
      |      |
S ----+---------|\\
           NOR2 | )o---- Q'
         Q ----|//

The output of each NOR gate is fed back to an input of the other: Q=(R+Q′)′Q = (R + Q')' and Q′=(S+Q)′Q' = (S + Q)'.

Truth table (NOR latch)

SRQ (next)Q' (next)Action
00Q (no change)Q'Memory / hold
0101Reset
1010Set
1100Invalid (forbidden)

With S = R = 1 both outputs are 0 and the final state is unpredictable when both inputs return to 0, so this input is avoided. For the NAND latch the inputs are active-low, so S = R = 0 is the invalid case.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Compare the logic of synchronous and ripple counters.

Answer

Both are binary counters built from flip-flops, but they differ in how the clock reaches the flip-flops.

Ripple (asynchronous) counter

Only the first flip-flop receives the external clock. The output of each flip-flop drives the clock input of the next one, so the change ripples through the chain. For a 3-bit up counter with T (or JK with J=K=1J=K=1) flip-flops:

CLK --> [FF0] Q0 --> [FF1] Q1 --> [FF2] Q2

Synchronous counter

All flip-flops receive the same clock at the same instant. Each flip-flop's J/K (or T) input is driven by combinational logic on the present outputs, so a flip-flop toggles only when the logic enables it. For a 3-bit up counter:

T0=1,T1=Q0,T2=Q1Q0T_0 = 1,\qquad T_1 = Q_0,\qquad T_2 = Q_1 Q_0

CLK --+----------+----------+
      v          v          v
    [FF0]      [FF1]      [FF2]
   T0=1      T1=Q0     T2=Q1.Q0

Comparison

BasisRipple (asynchronous)Synchronous
ClockOnly FF0 clocked; others clocked by the previous outputCommon clock to all flip-flops
SpeedSlow: total delay =n tpd= n\,t_{pd} for nn flip-flopsFast: delay of one flip-flop plus gate delay, independent of nn
Maximum frequencyLimited as nn growsMuch higher
HardwareSimple, no extra gatesExtra combinational gates for the inputs
DesignVery easyNeeds excitation tables and K-maps
GlitchesDecoding gives false transient states because bits change one after anotherBits change together, so decoding is clean
UseLow-speed, low-cost counting and frequency divisionHigh-speed, accurate counting and arbitrary sequences

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Define shift register and describe its types.

Answer

Shift register

A shift register is a sequential circuit made of a cascade of flip-flops, usually D flip-flops, sharing a common clock. Each flip-flop output is connected to the input of the next, so on every clock pulse the stored binary word moves one position left or right. An nn-bit register stores nn bits. It is used for temporary storage, serial-to-parallel and parallel-to-serial conversion, delay, and in counters and arithmetic circuits (multiplication by 2 and division by 2).

Types (by the way data enters and leaves)

  1. Serial-In Serial-Out (SISO): Data enters one bit at a time at the first flip-flop and leaves one bit at a time from the last. A 4-bit word needs 4 clock pulses to load and 4 more to read. It acts as a delay line.
Din --> [D FF0] --> [D FF1] --> [D FF2] --> [D FF3] --> Dout
           ^           ^           ^           ^
           +-----------+-----CLK---+-----------+
  1. Serial-In Parallel-Out (SIPO): Data is loaded serially, and after nn clock pulses all flip-flop outputs Q0…Qn−1Q_0\ldots Q_{n-1} are available together. Used for serial-to-parallel conversion.

  2. Parallel-In Serial-Out (PISO): All nn bits are loaded at once through a SHIFT/LOAD control (a 2-to-1 selector in front of each flip-flop), then shifted out serially. Used for parallel-to-serial conversion (transmitters).

  3. Parallel-In Parallel-Out (PIPO): All bits are loaded together and all are available together after one clock pulse. It is a simple storage register and is the fastest type.

Other types by direction and function

  • Unidirectional: shifts only left or only right.
  • Bidirectional: shifts left or right under a mode control.
  • Universal shift register: has parallel load, shift left, shift right and hold modes (for example the IC 74194).
  • Ring counter: the last output is fed back to the first input; a single 1 circulates, giving nn states.
  • Johnson (twisted-ring) counter: the complement of the last output is fed back, giving 2n2n states.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2077 · 5 marks

Short notes on: (a) Parity generator (b) State diagram.

Answer

(a) Parity generator

A parity generator is a combinational circuit that adds one extra bit (the parity bit) to a data word so that the total number of 1s becomes even (even parity) or odd (odd parity). The receiver uses a parity checker to detect any single-bit error during transmission.

For a 3-bit message A B CA\,B\,C with even parity bit PP, PP must make the number of 1s even, so P=1P = 1 when the message has an odd number of 1s:

ABCP (even)
0000
0011
0101
0110
1001
1010
1100
1111

P=A⊕B⊕CP = A \oplus B \oplus C

It is implemented with two XOR gates: (A⊕B)⊕C(A\oplus B)\oplus C. For odd parity the output is inverted, P=(A⊕B⊕C)′P = (A\oplus B\oplus C)'. The 4-bit even-parity checker at the receiver computes E=A⊕B⊕C⊕PE = A\oplus B\oplus C\oplus P; E=1E=1 indicates an error.

(b) State diagram

A state diagram is a graphical description of a sequential circuit. Each state (the contents of the flip-flops) is drawn as a circle labelled with its binary code. A directed arrow from one circle to another shows a transition on a clock pulse and is labelled with the input that causes it (and, for a Mealy machine, the output as input/output; for a Moore machine the output is written inside the circle).

Example: a 2-bit up counter with one enable input xx:

         x=1               x=1               x=1               x=1
  (00) -------> (01) -------> (10) -------> (11) -------> (00)
   ^ |x=0        ^ |x=0        ^ |x=0        ^ |x=0
   +-+           +-+           +-+           +-+

State diagrams are first converted to a state table, then to excitation tables for the chosen flip-flops, and finally simplified with K-maps to obtain the circuit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Design a combinational circuit with four inputs and one output. The output is equal to 1 when (i) all the inputs are equal to 1 or (ii) none of the inputs are equal to 1 or (iii) an odd number of inputs are equal to 1.

Answer

Step 1: Truth table. Let the inputs be A,B,C,DA, B, C, D and the output FF.

  • (i) all inputs 1: minterm 15 (1111)
  • (ii) no input is 1: minterm 0 (0000)
  • (iii) odd number of 1s: minterms 1, 2, 4, 7, 8, 11, 13, 14
ABCDFABCDF
0000110001
0001110010
0010110100
0011010111
0100111000
0101011011
0110011101
0111111111

F(A,B,C,D)=Σ(0,1,2,4,7,8,11,13,14,15)F(A,B,C,D)=\Sigma(0,1,2,4,7,8,11,13,14,15)

Step 2: Simplification. The ten minterms contain the eight odd-parity minterms, which form a checkerboard pattern on the K-map. No two of them are adjacent, so they cannot be grouped into larger SOP terms. The function is therefore best expressed using the XOR (parity) function plus the two extra minterms:

F=(A⊕B⊕C⊕D)+ABCD+A′B′C′D′F = (A\oplus B\oplus C\oplus D) + ABCD + A'B'C'D'

K-map (rows ABAB, columns CDCD):

AB \ CD00011110
001101
011010
110111
101010

Step 3: Circuit.

  • Three 2-input XOR gates: X1=A⊕BX_1=A\oplus B, X2=C⊕DX_2=C\oplus D, X3=X1⊕X2X_3=X_1\oplus X_2 (odd parity detector).
  • One 4-input AND gate for ABCDABCD (all inputs 1).
  • One 4-input NOR gate for A′B′C′D′A'B'C'D' (no input is 1).
  • One 3-input OR gate combining X3X_3, the AND output and the NOR output to give FF.
A --+--[XOR]--+
B --+         +--[XOR]--------+
C --+--[XOR]--+                |
D --+                          +--[OR]--> F
A,B,C,D ---[AND4]--------------+
A,B,C,D ---[NOR4]--------------+

Check: 00000000 gives NOR =1=1; 11111111 gives AND =1=1; 01110111 has three 1s so XOR =1=1; 00110011 has two 1s, XOR =0=0, AND =0=0, NOR =0=0 so F=0F=0. All agree with the table.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Implement the following function: F=Σ(0,1,3,4,5,8,9,10,15)F = \Sigma(0,1,3,4,5,8,9,10,15) using (i) Decoder (ii) Multiplexer (iii) PLA

Answer

F(A,B,C,D)=Σ(0,1,3,4,5,8,9,10,15)F(A,B,C,D)=\Sigma(0,1,3,4,5,8,9,10,15)

(i) Using a decoder

Use a 4×164\times16 decoder with AA as MSB and DD as LSB. Its outputs m0…m15m_0\ldots m_{15} are the minterms. Connect the outputs m0,m1,m3,m4,m5,m8,m9,m10,m15m_0,m_1,m_3,m_4,m_5,m_8,m_9,m_{10},m_{15} to a 9-input OR gate:

F=m0+m1+m3+m4+m5+m8+m9+m10+m15F = m_0+m_1+m_3+m_4+m_5+m_8+m_9+m_{10}+m_{15}

(If the decoder has active-low outputs, use a 9-input NAND gate instead.)

A B C D --> [4x16 DECODER] --> m0,m1,m3,m4,m5,m8,m9,m10,m15 --> [OR] --> F

(ii) Using a multiplexer

Use an 8×18\times1 MUX with A,B,CA,B,C as select lines (S2S1S0S_2S_1S_0) and DD as the data variable. For each ABCABC, look at the pair of minterms (2k,2k+1)(2k, 2k+1):

ABCmintermsD=0D=0D=1D=1Input
0000, 111I0=1I_0=1
0012, 301I1=DI_1=D
0104, 511I2=1I_2=1
0116, 700I3=0I_3=0
1008, 911I4=1I_4=1
10110, 1110I5=D′I_5=D'
11012, 1300I6=0I_6=0
11114, 1501I7=DI_7=D

Connections: I0=I2=I4=1I_0=I_2=I_4=1, I3=I6=0I_3=I_6=0, I1=I7=DI_1=I_7=D, I5=D′I_5=D' (through a NOT gate); select lines S2=A, S1=B, S0=CS_2=A,\ S_1=B,\ S_0=C; output =F=F.

(iii) Using a PLA

First minimise with a K-map (rows ABAB, columns CDCD):

AB \ CD00011110
001110
011100
110010
101101

Groups: B′C′B'C' (0,1,8,9), A′C′A'C' (0,1,4,5), A′B′DA'B'D (1,3), AB′D′AB'D' (8,10), ABCDABCD (15).

F=B′C′+A′C′+A′B′D+AB′D′+ABCDF = B'C' + A'C' + A'B'D + AB'D' + ABCD

PLA program table (4 inputs, 5 product terms, 1 output; the AND plane is programmed with 1 = true input, 0 = complemented input, - = not connected):

ProductABCDF
B′C′B'C'-00-1
A′C′A'C'0-0-1
A′B′DA'B'D00-11
AB′D′AB'D'10-01
ABCDABCD11111

The AND plane generates the five product terms from the inputs and their complements; the OR plane connects all five products to the single output FF.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 3+7 marks

What do you mean by race condition in JK Flip Flop? Mention the methods to overcome race condition in JK Flip Flop. Explain Master Slave Flip-flop using JK flip flop with logic circuit, truth table and timing diagram.

Answer

Race condition in a JK flip-flop

In a level-triggered JK flip-flop with J=K=1J=K=1, the output toggles while the clock is high. If the clock pulse width tpt_p is longer than the propagation delay tpdt_{pd} of the gates, the toggled output is fed back to the inputs and the flip-flop toggles again and again during the same pulse. At the end of the pulse the output is unpredictable. This uncontrolled oscillation is the race-around condition.

Methods to overcome it

  1. Use edge triggering, so the flip-flop responds only at the rising or falling edge and the output changes once per clock.
  2. Use a master-slave configuration (described below).
  3. Make the clock pulse narrower than the propagation delay (tp<tpdt_p < t_{pd}), which is difficult to guarantee in practice.

Master-slave JK flip-flop

It consists of two JK (or SR) latches in cascade: the master and the slave. The master is clocked by CLK and the slave by the inverted clock CLK‾\overline{CLK}. The outputs of the slave Q,Q′Q, Q' are fed back to the master's gates.

J --+                                      +-------------------+
    |   +---------+  Qm      +---------+   |                   |
    +-->|  MASTER |--------->|  SLAVE  |---+--> Q              |
K --+-->| (CLK)   |--Qm'---->| (CLK')  |------> Q'             |
    |   +----^----+          +----^----+                       |
    |        |                    |                            |
    |       CLK                [NOT]<--CLK                     |
    +-- feedback of Q and Q' to the master input gates --------+

Operation

  • CLK = 1: the master is enabled and takes the values of JJ, KK (using QQ, Q′Q'); the slave is disabled, so QQ does not change.
  • CLK goes 1 to 0: the master is disabled (its inputs are locked), and the slave is enabled and copies the master's output. QQ changes only now.
  • CLK = 0: the master is disabled, so new J,KJ,K values have no effect.

Because the feedback to the master is blocked whenever the slave is open, the output changes only once per clock cycle and there is no race.

Truth table (output after the falling edge of CLK)

JKQn+1Q_{n+1}Action
00QnQ_nNo change
010Reset
101Set
11Qn′Q_n'Toggle

Timing diagram (for J=K=1J=K=1, so the flip-flop toggles)

CLK   __|""|__|""|__|""|__|""|__
Qm    __|"""""|_____|"""""|_____   (master follows while CLK=1)
Q     ____|"""""""""|_________|    (changes only at falling edge of CLK)

The output QQ toggles once at each falling clock edge, giving a frequency of half the clock.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Convert (1011.110)2(1011.110)_2 into decimal and hexadecimal.

Answer

Convert (1011.110)2(1011.110)_2.

To decimal

Integer part: 10112=1⋅8+0⋅4+1⋅2+1⋅1=111011_2 = 1\cdot 8 + 0\cdot 4 + 1\cdot 2 + 1\cdot 1 = 11.

Fraction part: .1102=1⋅2−1+1⋅2−2+0⋅2−3=0.5+0.25=0.75.110_2 = 1\cdot 2^{-1} + 1\cdot 2^{-2} + 0\cdot 2^{-3} = 0.5 + 0.25 = 0.75.

(1011.110)2=(11.75)10(1011.110)_2 = (11.75)_{10}

To hexadecimal

Group the bits in fours outward from the binary point, padding with zeros: integer 10111011; fraction .1100.1100 (a 0 is added on the right).

  • 1011=B1011 = B
  • 1100=C1100 = C

(1011.110)2=(B.C)16(1011.110)_2 = (B.C)_{16}

Check: B.C16=11+12/16=11.75B.C_{16} = 11 + 12/16 = 11.75.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Subtract (111000.110)2−(110100.101)2(111000.110)_2 - (110100.101)_2 using both 2's and 1's complement.

Answer

Subtract (111000.110)2−(110100.101)2(111000.110)_2 - (110100.101)_2.

Check in decimal: 56.75−52.625=4.12556.75 - 52.625 = 4.125, which is 100.0012100.001_2.

Let M=111000.110M = 111000.110 and N=110100.101N = 110100.101.

(a) Using 2's complement

1's complement of NN: 001011.010001011.010.

2's complement of NN: add 1 at the last place: 001011.010+000000.001=001011.011001011.010 + 000000.001 = 001011.011.

Add to MM:

  111000.110
+ 001011.011
------------
 1000100.001

There is a carry out of the MSB, so the result is positive; discard the carry.

M−N=000100.001=(100.001)2M - N = 000100.001 = (100.001)_2

(b) Using 1's complement

1's complement of NN: 001011.010001011.010.

Add to MM:

  111000.110
+ 001011.010
------------
 1000100.000

There is a carry out of the MSB (end-around carry). Add it to the least significant bit:

  000100.000
+ 000000.001
------------
  000100.001

M−N=(100.001)2M - N = (100.001)_2

Both methods give (100.001)2=4.12510(100.001)_2 = 4.125_{10}, which matches the decimal check.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

State and prove De-Morgan's Theorems.

Answer

De Morgan's theorems

Theorem 1: The complement of a sum equals the product of the complements.

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

Theorem 2: The complement of a product equals the sum of the complements.

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

(They extend to any number of variables: A+B+C+⋯‾=A‾ B‾ C‾⋯\overline{A+B+C+\cdots}=\overline A\,\overline B\,\overline C\cdots and ABC⋯‾=A‾+B‾+C‾+⋯\overline{ABC\cdots}=\overline A+\overline B+\overline C+\cdots.)

Proof by truth table

ABA+BA+BA+B‾\overline{A+B}A‾ B‾\overline A\,\overline BABABAB‾\overline{AB}A‾+B‾\overline A+\overline B
00011011
01100011
10100011
11100100

The columns A+B‾\overline{A+B} and A‾ B‾\overline A\,\overline B are identical, and the columns AB‾\overline{AB} and A‾+B‾\overline A+\overline B are identical, so both theorems hold for all input combinations.

Algebraic proof (Theorem 1)

The complement X′X' of XX is the unique element satisfying X+X′=1X+X'=1 and X⋅X′=0X\cdot X'=0. Show that A‾ B‾\overline A\,\overline B is the complement of A+BA+B.

(A+B)+A‾ B‾=(A+B+A‾)(A+B+B‾)=(1+B)(1+A)=1(A+B)+\overline A\,\overline B = (A+B+\overline A)(A+B+\overline B) = (1+B)(1+A) = 1

(A+B)⋅A‾ B‾=AA‾ B‾+BA‾ B‾=0+0=0(A+B)\cdot\overline A\,\overline B = A\overline A\,\overline B + B\overline A\,\overline B = 0 + 0 = 0

Both conditions are satisfied, so A+B‾=A‾ B‾\overline{A+B}=\overline A\,\overline B.

Algebraic proof (Theorem 2)

AB+(A‾+B‾)=(A+A‾+B‾)(B+A‾+B‾)=1⋅1=1AB+(\overline A+\overline B) = (A+\overline A+\overline B)(B+\overline A+\overline B) = 1\cdot1 = 1

AB⋅(A‾+B‾)=ABA‾+ABB‾=0+0=0AB\cdot(\overline A+\overline B) = AB\overline A + AB\overline B = 0+0=0

Hence A‾+B‾\overline A+\overline B is the complement of ABAB, i.e. AB‾=A‾+B‾\overline{AB}=\overline A+\overline B.

Applying the theorems turns an AND into an OR (and vice versa) with complemented inputs, so NAND and NOR gates can implement any logic function.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is decoder? Implement 8 x 1 MUX using 4 x 1 MUX.

Answer

Decoder

A decoder is a combinational circuit that converts an nn-bit binary code on its inputs into a unique active output among 2n2^n output lines. Exactly one output is 1 (active-high) for each input combination, so each output is a minterm of the inputs. Examples: 2×42\times4, 3×83\times8 and 4×164\times16 decoders; each usually has an enable input. A 3×83\times8 decoder has outputs Di=D_i = minterm mim_i of A2A1A0A_2A_1A_0. Uses: address decoding, memory chip selection, code conversion, and implementing Boolean functions.

8×18\times1 MUX using 4×14\times1 MUX

An 8×18\times1 MUX has 8 data inputs I0…I7I_0\ldots I_7, three select lines S2S1S0S_2S_1S_0 and one output YY. Three 4×14\times1 MUXes are used in two stages:

  • MUX1 takes I0,I1,I2,I3I_0,I_1,I_2,I_3 with selects S1,S0S_1,S_0. Output Y1Y_1.
  • MUX2 takes I4,I5,I6,I7I_4,I_5,I_6,I_7 with selects S1,S0S_1,S_0. Output Y2Y_2.
  • MUX3 takes Y1Y_1 on input 0 and Y2Y_2 on input 1 (inputs 2 and 3 are unused, connected to 0), with select lines S0=S2S_0 = S_2 and S1=0S_1 = 0. Its output is YY.
I0..I3 --> [4x1 MUX1] --Y1--> in0 +------------+
            S1 S0                   | 4x1 MUX3   |--> Y
I4..I7 --> [4x1 MUX2] --Y2--> in1  | S0=S2,S1=0 |
            S1 S0                   +------------+

When S2=0S_2=0 MUX3 passes Y1Y_1 (one of I0I_0-I3I_3); when S2=1S_2=1 it passes Y2Y_2 (one of I4I_4-I7I_7). So Y=IS2S1S0Y=I_{S_2S_1S_0} as required.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

What is clocked RS flip-flop? Explain with logic diagram and characteristic table.

Answer

Clocked RS flip-flop

A clocked (gated) RS flip-flop is an SR latch with an enabling clock. The inputs SS and RR can change the output only while the clock pulse CLK=1CLK=1. When CLK=0CLK=0 the outputs hold their previous state. This synchronises the changes of state with the clock.

Logic diagram (NAND implementation)

S ----[NAND1]--+                +--------------------> Q
CLK --[      ]  \--[NAND3]-----|
                    [      ]<--+ (cross-coupled)
R ----[NAND2]--+   [NAND4]-----|
CLK --[      ]  /--[      ]    +--------------------> Q'

Two NAND gates (NAND1, NAND2) gate SS and RR with the clock; their outputs drive a cross-coupled NAND latch (NAND3, NAND4) giving QQ and Q′Q'.

Characteristic (truth) table

CLKSRQn+1Q_{n+1}Action
0XXQnQ_nNo change (disabled)
100QnQ_nNo change
1010Reset
1101Set
111?Invalid (both outputs 1, then indeterminate)

Characteristic equation

Qn+1=S+R′Qn,SR=0Q_{n+1} = S + R'Q_n,\qquad SR=0

The combination S=R=1S=R=1 must be avoided because it forces Q=Q′=1Q=Q'=1 and the final state is unpredictable when the clock returns to 0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Design Mod-3 synchronous counter.

Answer

Mod-3 synchronous counter (counts 0→1→2→00\to1\to2\to0, using two JK flip-flops Q1Q0Q_1Q_0)

Number of flip-flops: 2n≥3⇒n=22^n \ge 3 \Rightarrow n=2. State 1111 is unused.

State table and excitation

JK excitation: 0→00\to0: J=0,K=XJ=0,K=X; 0→10\to1: J=1,K=XJ=1,K=X; 1→01\to0: J=X,K=1J=X,K=1; 1→11\to1: J=X,K=0J=X,K=0.

Present Q1Q0Q_1Q_0Next Q1Q0Q_1Q_0J1J_1K1K_1J0J_0K0K_0
00010X1X
01101XX1
1000X10X
11XXXXXX

K-map simplification

  • J1J_1: 1 at state 01, 0 at 00, X at 10 and 11, so J1=Q0J_1 = Q_0.
  • K1K_1: 1 at 10, X elsewhere, so K1=1K_1 = 1.
  • J0J_0: 1 at 00, 0 at 10, X at 01 and 11, so J0=Q1′J_0 = Q_1'.
  • K0K_0: 1 at 01, X elsewhere, so K0=1K_0 = 1.

J1=Q0,K1=1,J0=Q1‾,K0=1J_1=Q_0,\quad K_1=1,\quad J_0=\overline{Q_1},\quad K_0=1

Circuit

CLK ---------+------------------+
             |                  |
        +----v----+        +----v----+
Q0 ---->| J1  Q1  |--Q1'-->| J0  Q0  |--> Q0
  1 --->| K1      |   (+5V)| K0      |<-- 1
        +---------+        +---------+

J1J_1 is connected to Q0Q_0, J0J_0 to Q1‾\overline{Q_1}, and both KK inputs to logic 1; both flip-flops get the same clock.

Check: 00: J1=0,K1=1→Q1=0J_1=0,K_1=1\to Q_1=0; J0=1→Q0=1J_0=1\to Q_0=1: next 01. 01: J1=1→Q1=1J_1=1\to Q_1=1; K0=1→Q0=0K_0=1\to Q_0=0: next 10. 10: K1=1→Q1=0K_1=1\to Q_1=0; J0=0,K0=1→Q0=0J_0=0,K_0=1\to Q_0=0: next 00. The unused state 11 goes to 00 (J1=K1=1J_1=K_1=1 toggles Q1Q_1 to 0, J0=0,K0=1J_0=0,K_0=1 resets Q0Q_0), so the counter is self-starting.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Draw a Parallel-In Parallel-Out Shift register and explain it.

Answer

Parallel-In Parallel-Out (PIPO) shift register

In a PIPO register all bits of the data word are applied simultaneously to the flip-flop inputs and all bits are available simultaneously at the outputs. A 4-bit PIPO register uses four D flip-flops with a common clock.

Diagram

 D0       D1       D2       D3        (parallel data inputs)
  |        |        |        |
+-v--+   +-v--+   +-v--+   +-v--+
| D  |   | D  |   | D  |   | D  |
| FF0|   | FF1|   | FF2|   | FF3|
+-^--+   +-^--+   +-^--+   +-^--+
  |        |        |        |
  +--------+---CLK---+--------+
  |        |        |        |
 Q0       Q1       Q2       Q3        (parallel data outputs)

Operation

  1. The 4-bit word D0D1D2D3D_0D_1D_2D_3 is placed on the data inputs.
  2. On the active clock edge each flip-flop stores its own input: Q0=D0, Q1=D1, Q2=D2, Q3=D3Q_0=D_0,\ Q_1=D_1,\ Q_2=D_2,\ Q_3=D_3 (because for a D flip-flop Qn+1=DQ_{n+1}=D).
  3. The stored word appears at once on Q0…Q3Q_0\ldots Q_3 and is held until the next clock pulse.

Loading and reading each need only one clock pulse, so it is the fastest type of register. No shifting between flip-flops takes place, and it is mainly used as a temporary storage (buffer) register. For example, loading 10111011 gives Q0Q1Q2Q3=1011Q_0Q_1Q_2Q_3=1011 after one pulse.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Write short notes on: (a) Binary parallel adder (b) Johnson counter.

Answer

(a) Binary parallel adder

A binary parallel adder adds two nn-bit binary numbers using nn full adders connected in cascade, one per bit position. The carry output of each full adder feeds the carry input of the next higher stage. All bits of both numbers are applied simultaneously, and the sum bits S0…Sn−1S_0\ldots S_{n-1} and the final carry CnC_n are produced together.

A3 B3    A2 B2    A1 B1    A0 B0
 |  |     |  |     |  |     |  |
[ FA3 ]<-[ FA2 ]<-[ FA1 ]<-[ FA0 ]<-- C0 (carry in, 0 for addition)
 |   |    |   |    |   |    |   |
C4  S3    C3  S2   C2  S1   C1  S0

Each full adder gives Si=Ai⊕Bi⊕CiS_i = A_i\oplus B_i\oplus C_i and Ci+1=AiBi+Ci(Ai⊕Bi)C_{i+1} = A_iB_i + C_i(A_i\oplus B_i).

Because each carry must ripple through every stage, the total delay is about nn times the delay of one full adder (a ripple-carry adder). The delay is reduced by a carry look-ahead adder, which computes the carries directly from the generate Gi=AiBiG_i=A_iB_i and propagate Pi=Ai⊕BiP_i=A_i\oplus B_i terms. With C0C_0 driven by control, the same adder can also subtract (using XOR gates on BB).

(b) Johnson counter

A Johnson (twisted-ring) counter is a shift register in which the complement of the last flip-flop output Qn−1‾\overline{Q_{n-1}} is fed back to the first flip-flop's input. An nn-flip-flop Johnson counter has 2n2n states (mod-2n2n), compared with nn states for an ordinary ring counter.

For a 4-bit Johnson counter (D flip-flops, D0=Q3‾D_0=\overline{Q_3}, Di=Qi−1D_i=Q_{i-1}), starting from 0000:

ClockQ0Q1Q2Q3Q_0Q_1Q_2Q_3
00000
11000
21100
31110
41111
50111
60011
70001
80000

It has 8 states, each of which can be decoded with a single 2-input AND gate, and the output frequency is fclk/8f_{clk}/8. Advantages: simple decoding, no glitches, and twice the states of a ring counter. Disadvantage: unused states (2n−2n2^n-2n) mean it needs self-correcting logic to start properly.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Design a BCD-to Seven-segment decoder to display decimal numbers 1, 2 and 4.

Answer

Seven-segment display

A seven-segment display has segments a,b,c,d,e,f,ga,b,c,d,e,f,g arranged as a figure 8; lighting a suitable set of them shows a digit. Assume a common-cathode display (a segment lights when its input is 1).

  • Digit 1: b,cb,c
  • Digit 2: a,b,d,e,ga,b,d,e,g
  • Digit 4: b,c,f,gb,c,f,g

Truth table. BCD input ABCDABCD (AA = MSB). Only the BCD codes of 1, 2 and 4 light segments; the other valid codes (0, 3, 5-9) give a blank display; codes 10-15 never occur and are don't-cares.

DigitABCDabcdefg
100010110000
200101101101
401000110011
0, 3, 5-9-0000000
10-15-XXXXXXX

K-map simplification (using the don't-cares for 10-15)

  • aa: only minterm 2 (0010). It pairs with 10 (1010): a=B′CD′a = B'CD'.
  • dd and ee are 1 only for digit 2: d=e=B′CD′d = e = B'CD'.
  • ff: only minterm 4 (0100). It pairs with 12 (1100): f=BC′D′f = BC'D'.
  • cc: minterms 1 and 4. Minterm 1 (0001) has no adjacent don't-care, so it stays a full term; 4 pairs with 12: c=A′B′C′D+BC′D′c = A'B'C'D + BC'D'.
  • gg: minterms 2 and 4: g=B′CD′+BC′D′g = B'CD' + BC'D'.
  • bb: minterms 1, 2, 4: b=A′B′C′D+B′CD′+BC′D′b = A'B'C'D + B'CD' + BC'D'.

Define three common product terms:

P1=A′B′C′D (digit 1),P2=B′CD′ (digit 2),P4=BC′D′ (digit 4)P_1 = A'B'C'D\ (\text{digit }1),\quad P_2 = B'CD'\ (\text{digit }2),\quad P_4 = BC'D'\ (\text{digit }4)

a=d=e=P2,b=P1+P2+P4,c=P1+P4,f=P4,g=P2+P4a=d=e=P_2,\quad b=P_1+P_2+P_4,\quad c=P_1+P_4,\quad f=P_4,\quad g=P_2+P_4

Circuit. Four NOT gates give A′,B′,C′,D′A',B',C',D'. Three AND gates (one 4-input, two 3-input) produce P1,P2,P4P_1,P_2,P_4. Then: P2P_2 drives segments a,d,ea,d,e directly; P4P_4 drives ff; OR gates give c=P1+P4c=P_1+P_4, g=P2+P4g=P_2+P_4, and a 3-input OR gives b=P1+P2+P4b=P_1+P_2+P_4. Each output drives its segment through a current-limiting resistor.

Check: Input 0100 gives P4=1P_4=1, so b,c,f,g=1b,c,f,g=1 and a,d,e=0a,d,e=0: the display shows 4. Input 0010 gives P2=1P_2=1 so a,b,d,e,g=1a,b,d,e,g=1, c,f=0c,f=0: shows 2. Input 0001 gives P1=1P_1=1 so b,c=1b,c=1 only: shows 1.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

What are the drawbacks of clocked RS flip flop? Explain the operation of a JK flip flop along with its characteristic table, characteristic equation, circuit diagram and timing diagram.

Answer

Drawbacks of the clocked RS flip-flop

  1. Invalid state: the input combination S=R=1S=R=1 makes both outputs the same (Q=Q′Q=Q') and, when the clock returns to 0, the final state is unpredictable. The user must ensure SR=0SR=0.
  2. Level triggering: while the clock is high, any change of SS or RR (including noise) changes the output, so the flip-flop is not stable during the pulse.
  3. There is no toggle mode, so it cannot be used directly in counters.

The JK flip-flop removes the invalid state by feeding QQ and Q′Q' back to the input gates.

JK flip-flop operation

Inputs JJ (set) and KK (reset) with clock. The input gates are S=J⋅Q′S=J\cdot Q' and R=K⋅QR=K\cdot Q, so SS and RR can never be 1 together.

  • J=0,K=0J=0,K=0: no change.
  • J=0,K=1J=0,K=1: reset, Q=0Q=0.
  • J=1,K=0J=1,K=0: set, Q=1Q=1.
  • J=1,K=1J=1,K=1: toggle, Qn+1=Qn′Q_{n+1}=Q_n'.

Circuit diagram

J ---[AND3]---> S --+
     ^ Q' ^CLK      +--[ Clocked SR / NAND latch ]--> Q
K ---[AND3]---> R --+                                 --> Q'
     ^ Q  ^CLK
Q and Q' are fed back to the input AND gates.

Characteristic table

JKQnQ_nQn+1Q_{n+1}
0000
0011
0100
0110
1001
1011
1101
1110

Characteristic equation

Qn+1=JQn′+K′QnQ_{n+1} = JQ_n' + K'Q_n

Timing diagram (edge-triggered, active on the rising edge of CLK)

CLK  _|"|_|"|_|"|_|"|_|"|_
J    _|""""""|_____________
K    ____________|"""""""""
Q    ___|""""""""""|_______

The output sets at the first clock edge after J=1,K=0J=1,K=0, holds when J=K=0J=K=0, and resets at the first edge after J=0,K=1J=0,K=1. With J=K=1J=K=1 it would toggle on every edge.

The race-around problem at J=K=1J=K=1 with level triggering is avoided by using edge triggering or the master-slave arrangement.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Design a sequential circuit using JK flip-flop with the help of given state diagram.

Answer

The state diagram is taken as the following one (states ABAB, input xx, arrows labelled with xx):

        x=0 (loop)         x=1               x=0
          .--.      .-------------.       .--------.
          v  |      v             |       v        |
         (00) ---x=1--> (01) <--x=1 loop  (11) --x=0--> (10)
                          |  x=0 -------->(11)

Transitions: 00→000, 00→101, 01→011, 01→101, 10→010, 10→100, 11→010, 11→11100\xrightarrow{0}00,\ 00\xrightarrow{1}01,\ 01\xrightarrow{0}11,\ 01\xrightarrow{1}01,\ 10\xrightarrow{0}10,\ 10\xrightarrow{1}00,\ 11\xrightarrow{0}10,\ 11\xrightarrow{1}11.

Step 1: State table. Two flip-flops AA and BB (both JK).

Present ABxNext AB
00000
00101
01011
01101
10010
10100
11010
11111

Step 2: Excitation table. For JK: 0→00\to0: J=0,K=XJ=0,K=X; 0→10\to1: J=1,K=XJ=1,K=X; 1→01\to0: J=X,K=1J=X,K=1; 1→11\to1: J=X,K=0J=X,K=0.

A B xA+B+A^+B^+JAJ_AKAK_AJBJ_BKBK_B
000000X0X
001010X1X
010111XX0
011010XX0
10010X00X
10100X10X
11010X0X1
11111X0X0

Step 3: K-map simplification (minterm number =ABx= ABx)

  • JAJ_A: 1 at m2; 0 at m0, m1, m3; X at m4-m7. So JA=Bx′J_A = Bx'.
  • KAK_A: 1 at m5; 0 at m4, m6, m7; X at m0-m3. So KA=B′xK_A = B'x.
  • JBJ_B: 1 at m1; 0 at m0, m4, m5; X at m2, m3, m6, m7. So JB=A′xJ_B = A'x.
  • KBK_B: 1 at m6; 0 at m2, m3, m7; X at m0, m1, m4, m5. So KB=Ax′K_B = Ax'.

JA=Bx′,KA=B′x,JB=A′x,KB=Ax′J_A = Bx',\quad K_A = B'x,\quad J_B = A'x,\quad K_B = Ax'

Step 4: Circuit. Two JK flip-flops with a common clock; four AND gates and two NOT gates (x′x', and the complements B′B', A′A' taken from Q‾\overline Q outputs): JA=B⋅x′J_A = B\cdot x', KA=B′⋅xK_A = B'\cdot x, JB=A′⋅xJ_B = A'\cdot x, KB=A⋅x′K_B = A\cdot x'.

Check: state 01 with x=0x=0: JA=1,KA=0→A=1J_A=1,K_A=0\to A=1; JB=0,KB=0→BJ_B=0,K_B=0\to B holds 1: next 11. State 11, x=0x=0: JA=0,KA=0J_A=0,K_A=0 so A=1A=1; KB=1K_B=1 so B=0B=0: next 10. Both match the diagram.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Subtract (739.57)10−(78.35)2(739.57)_{10} - (78.35)_2 using both 10's and 9's complement.

Answer

Subtract (739.57)10−(78.35)(739.57)_{10} - (78.35) using 10's and 9's complement.

The digits 7, 8, 3, 5 are not valid in binary, so the subtrahend is the decimal number 78.3578.35. Expected result by direct subtraction: 739.57−78.35=661.22739.57 - 78.35 = 661.22.

Write the subtrahend with the same number of digits as the minuend: 078.35078.35.

(a) 10's complement

9's complement of 078.35078.35: subtract each digit from 9, giving 921.64921.64.

10's complement: add 1 at the last place: 921.64+0.01=921.65921.64 + 0.01 = 921.65.

Add to the minuend:

739.57+921.65=1661.22739.57 + 921.65 = 1661.22

There is a carry out of the leftmost digit, so the answer is positive; discard the carry.

739.57−78.35=661.22739.57 - 78.35 = 661.22

(b) 9's complement

9's complement of 078.35078.35 is 921.64921.64.

739.57+921.64=1661.21739.57 + 921.64 = 1661.21

A carry is produced, so add it back at the least significant digit (end-around carry):

661.21+0.01=661.22661.21 + 0.01 = 661.22

739.57−78.35=661.22739.57 - 78.35 = 661.22

Both methods agree with the direct result 661.22661.22.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

What is decoder? Implement 8 x 1 MUX using 2 x 1 MUX.

Answer

Decoder

A decoder is a combinational circuit with nn inputs and up to 2n2^n outputs that activates exactly one output line for each input code. Each output is a minterm of the inputs. For example, a 2×42\times4 decoder has outputs D0=A′B′, D1=A′B, D2=AB′, D3=ABD_0=A'B',\ D_1=A'B,\ D_2=AB',\ D_3=AB, and usually an enable input EE. It is used for address decoding, memory selection, and implementing Boolean functions.

8×18\times1 MUX using 2×12\times1 MUX

An 8×18\times1 MUX needs three levels of 2×12\times1 MUXes, in total 4+2+1=74+2+1=7 of them.

  • Level 1 (select S0S_0): four MUXes M1 to M4 take the pairs (I0,I1),(I2,I3),(I4,I5),(I6,I7)(I_0,I_1),(I_2,I_3),(I_4,I_5),(I_6,I_7) and give outputs Y1,Y2,Y3,Y4Y_1,Y_2,Y_3,Y_4.
  • Level 2 (select S1S_1): two MUXes M5 and M6 take (Y1,Y2)(Y_1,Y_2) and (Y3,Y4)(Y_3,Y_4) and give Z1,Z2Z_1,Z_2.
  • Level 3 (select S2S_2): MUX M7 takes (Z1,Z2)(Z_1,Z_2) and gives the output YY.
I0 I1 --[M1]--+
I2 I3 --[M2]--+--[M5]--+
I4 I5 --[M3]--+        +--[M7]--> Y
I6 I7 --[M4]--+--[M6]--+
 S0 -> M1..M4   S1 -> M5,M6   S2 -> M7

For example S2S1S0=101S_2S_1S_0=101 selects: M3 chooses I5I_5 (because S0=1S_0=1), M6 chooses Y3Y_3 (because S1=0S_1=0), M7 chooses Z2Z_2 (because S2=1S_2=1), so the output is I5I_5 as required.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Design and explain the operational characteristics of D-flip flop.

Answer

D flip-flop

A D (data/delay) flip-flop has one data input DD and a clock. On the active clock edge the output QQ takes the value of DD. It is obtained from an SR/JK flip-flop by connecting S=DS=D, R=D′R=D' (or J=DJ=D, K=D′K=D'), which makes the invalid input combination impossible.

Circuit (clocked NAND implementation)

D ---+-------------[NAND1]---+
     |  CLK ------>[     ]   +--[NAND3]---> Q
     |                        |    ^  |
     +--[NOT]-----[NAND2]-----+--[NAND4]---> Q'
        CLK ------>[     ]

DD drives the set side and its complement D′D' drives the reset side of a clocked SR latch.

Characteristic (truth) table

CLKDQnQ_nQn+1Q_{n+1}Action
active edge000Reset
active edge010Reset
active edge101Set
active edge111Set
no edgeXQnQ_nQnQ_nHold

Characteristic equation

Qn+1=DQ_{n+1} = D

Operational characteristics

  • The next state depends only on DD and not on the present state, so the flip-flop just delays the input by one clock period (hence "delay" flip-flop).
  • There is no invalid or no-change state: it either stores 0 or 1.
  • A D flip-flop is used as a 1-bit memory cell and is the building block of registers, shift registers and counters.

Timing: if DD is 1 at the clock edge, QQ becomes 1 and stays 1 until an edge where D=0D=0 is seen, at which QQ becomes 0; changes of DD between edges have no effect.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Design Mod-5 synchronous counter using T- flip flop.

Answer

Mod-5 synchronous counter using T flip-flops

A mod-5 counter has 5 states: 000, 001, 010, 011, 100, then back to 000. Number of flip-flops: 23≥52^3 \ge 5, so n=3n=3 (Q2Q1Q0Q_2Q_1Q_0). States 101, 110, 111 are unused (don't-cares).

For a T flip-flop, T=Qn⊕Qn+1T = Q_n \oplus Q_{n+1} (toggle when the bit must change).

State table and excitation

Present Q2Q1Q0Q_2Q_1Q_0Next Q2Q1Q0Q_2Q_1Q_0T2T_2T1T_1T0T_0
000001001
001010011
010011001
011100111
100000100
101XXXXXX
110XXXXXX
111XXXXXX

K-map simplification (minterms are the present states 0 to 7)

  • T0T_0: 1 for 0, 1, 2, 3; 0 for 4; X for 5, 6, 7. Grouping gives T0=Q2′T_0 = Q_2'.
  • T1T_1: 1 for 1 and 3; 0 for 0, 2, 4; X for 5, 6, 7. Grouping 1, 3, 5, 7 gives T1=Q0T_1 = Q_0.
  • T2T_2: 1 for 3 and 4; 0 for 0, 1, 2; X for 5, 6, 7. Group 4, 5, 6, 7 gives Q2Q_2, group 3, 7 gives Q1Q0Q_1Q_0: T2=Q2+Q1Q0T_2 = Q_2 + Q_1Q_0.

T0=Q2‾,T1=Q0,T2=Q2+Q1Q0T_0 = \overline{Q_2},\quad T_1 = Q_0,\quad T_2 = Q_2 + Q_1Q_0

Circuit. Three T flip-flops with a common clock. T0T_0 is driven by Q2‾\overline{Q_2}, T1T_1 by Q0Q_0, and T2T_2 by an OR gate whose inputs are Q2Q_2 and the output of an AND gate with inputs Q1,Q0Q_1,Q_0.

Check of the sequence: 011: T2=T1=T0=1T_2=T_1=T_0=1 so all bits toggle: 011→100011\to100. 100: T2=1T_2=1 (Q2=1Q_2=1), T1=0T_1=0, T0=0T_0=0, so only Q2Q_2 toggles: 100→000100\to000. 010: T0=1T_0=1 only: →011\to011.

Self-starting check of the unused states: 101: T2=1,T1=1,T0=0T_2=1,T_1=1,T_0=0 gives 011; 110: T2=1,T1=0,T0=0T_2=1,T_1=0,T_0=0 gives 010; 111: T2=1,T1=1,T0=0T_2=1,T_1=1,T_0=0 gives 001. All return to valid states.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Draw a Serial-In Serial-Out Shift register and explain it.

Answer

A Serial-In Serial-Out (SISO) shift register accepts data one bit at a time at a single input and delivers it one bit at a time at a single output, after a number of clock pulses equal to the number of stages.

Diagram (4-bit, D flip-flops)

Serial     +----+   +----+   +----+   +----+
 in  ----> | FF0|-->| FF1|-->| FF2|-->| FF3|----> Serial out
           +----+   +----+   +----+   +----+
              ^        ^        ^        ^
CLK ----------+--------+--------+--------+

The output QQ of each D flip-flop is connected to the D input of the next flip-flop, and all flip-flops share the same clock.

Operation

  1. At each clock pulse every flip-flop copies the value of the previous one, so the stored bits shift one place to the right.
  2. The new bit at the serial input enters the first flip-flop.
  3. A 4-bit word needs 4 clock pulses to be loaded completely and 4 more pulses (or 3 additional) to be taken out at the serial output; the first bit entered is the first to leave.

It is used for time delays and in serial data transmission. Its advantage is the use of the minimum number of connections, and its disadvantage is the slow speed compared with parallel registers.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Write short notes on (any two): (a) BCD code (b) Status Register (c) Ring Counter

Answer

(a) BCD code

Binary Coded Decimal represents each decimal digit by its own 4-bit binary equivalent (8421 weighted code). Digits 0 to 9 are 0000 to 1001; the combinations 1010 to 1111 are invalid. For example, (45)10=0100 0101(45)_{10} = 0100\ 0101 in BCD. It is easy to convert to decimal and is used in calculators and digital displays, but needs more bits than pure binary.

(b) Status register

The status register (flag register) is a register of the CPU that holds single-bit flags showing the result of the last ALU operation. Common flags: Carry (C), Sign (S), Zero (Z), Overflow (V). For example, Z = 1 when the result is zero. The flags are used by conditional branch instructions.

(c) Ring counter

A ring counter is a circular shift register in which the output of the last flip-flop is connected to the input of the first. Only one flip-flop holds 1 (initial state 1000) and this single 1 circulates: 1000, 0100, 0010, 0001. An nn-bit ring counter has nn states (mod-nn) and is used for sequencing and timing signals.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Define BCD code. Design a BCD to Excess-3 code converter, with truth table and logic diagram.

Answer

BCD code: Binary Coded Decimal represents each decimal digit 0 to 9 by its 4-bit binary value (8421 code). The codes 1010 to 1111 are invalid.

Excess-3 code: each digit is represented by BCD + 3 (0011). The BCD-to-Excess-3 converter has inputs ABCDA B C D (BCD, AA = MSB) and outputs E3E2E1E0E_3E_2E_1E_0.

Truth table

DigitA B C DE3E2E1E0E_3 E_2 E_1 E_0
000000011
100010100
200100101
300110110
401000111
501011000
601101001
701111010
810001011
910011100
10 to 151010 to 1111xxxx (don't care)

K-map simplification (with don't cares)

E3=A+BC+BDE_3 = A + BC + BD

E2=B′C+B′D+BC′D′E_2 = B'C + B'D + BC'D'

E1=CD+C′D′=C⊙DE_1 = CD + C'D' = C \odot D

E0=D′E_0 = D'

Check (digit 4, 0100): E3=0E_3 = 0, E2=BC′D′=1E_2 = BC'D' = 1, E1=C′D′=1E_1 = C'D' = 1, E0=1E_0 = 1 giving 0111 as required. Digit 9 (1001): E3=1E_3 = 1, E2=B′D=1E_2 = B'D = 1, E1=0E_1 = 0, E0=0E_0 = 0 giving 1100.

Logic diagram

D --[NOT]-------------------------------------> E0
C,D --[XNOR]----------------------------------> E1
B',C ; B',D ; B,C',D' --[AND x3]--[OR]--------> E2
A ; B.C ; B.D --[AND x2]--[OR3]----------------> E3

E0E_0 needs a single NOT gate on DD; E1E_1 needs one XNOR gate; E2E_2 needs three AND gates and one OR gate (with NOT gates on B,C,DB, C, D); E3E_3 needs two AND gates and one 3-input OR gate.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Define a combinational logic circuit. Design one that takes a four-bit input and outputs its 1's complement.

Answer

Combinational logic circuit: a circuit whose outputs at any instant depend only on the present values of the inputs (no memory or feedback). It is made of logic gates, e.g., adders, multiplexers, decoders, code converters.

Design: 4-bit 1's complement generator

The 1's complement of a binary number is obtained by inverting each bit. Let the inputs be A3A2A1A0A_3A_2A_1A_0 and outputs Y3Y2Y1Y0Y_3Y_2Y_1Y_0.

Truth table (selected rows)

A3A2A1A0A_3A_2A_1A_0Y3Y2Y1Y0Y_3Y_2Y_1Y_0
00001111
00011110
01011010
10100101
11110000

In every row each output bit is the complement of the corresponding input bit.

Boolean equations

Y3=A3′,Y2=A2′,Y1=A1′,Y0=A0′Y_3 = A_3', \quad Y_2 = A_2', \quad Y_1 = A_1', \quad Y_0 = A_0'

Logic diagram

A3 --[NOT]-- Y3
A2 --[NOT]-- Y2
A1 --[NOT]-- Y1
A0 --[NOT]-- Y0

Four inverters (NOT gates) are sufficient. A controllable version (complement only when a control C=1C = 1) uses Yi=Ai⊕CY_i = A_i \oplus C with four XOR gates.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Define a parallel counter. Design a MOD-12 synchronous up counter, with state diagram, timing sequence, and timing diagram.

Answer

Parallel (synchronous) counter: a counter in which all flip-flops receive the same clock pulse at the same time, so all state changes occur simultaneously. It avoids the ripple delay of an asynchronous counter.

Design of MOD-12 synchronous up counter (T flip-flops, Q3Q2Q1Q0Q_3Q_2Q_1Q_0)

It counts 0 to 11 (0000→10110000 \to 1011) then returns to 0000. States 12 to 15 are don't cares.

State diagram

0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11
^                                                         |
+---------------------------------------------------------+

State table with T inputs (T=Qn⊕Qn+1T = Q_n \oplus Q_{n+1})

Present Q3Q2Q1Q0Q_3Q_2Q_1Q_0NextT3T_3T2T_2T1T_1T0T_0
000000010001
000100100011
001000110001
001101000111
010001010001
010101100011
011001110001
011110001111
100010010001
100110100011
101010110001
101100001011

K-map simplification

T0=1T_0 = 1

T1=Q0T_1 = Q_0

T2=Q1Q0Q3′T_2 = Q_1Q_0Q_3'

T3=Q1Q0(Q2+Q3)=Q3Q1Q0+Q2Q1Q0T_3 = Q_1Q_0(Q_2 + Q_3) = Q_3Q_1Q_0 + Q_2Q_1Q_0

Timing sequence (output after each clock pulse)

Clock0123456789101112
Count012345678910110

Timing diagram: Q0Q_0 toggles on every clock edge (frequency f/2f/2); Q1Q_1 toggles when Q0=1Q_0 = 1 (period 4 clocks); Q2Q_2 is high during counts 4 to 7; Q3Q_3 is high during counts 8 to 11. After count 11 all outputs fall to 0 together, so the cycle repeats every 12 clock pulses.

CLK: _|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_|-|_
Q0 : toggles every pulse
Q1 : 0 0 1 1 0 0 1 1 0 0 1 1
Q2 : 0 0 0 0 1 1 1 1 0 0 0 0
Q3 : 0 0 0 0 0 0 0 0 1 1 1 1

(columns are counts 0 to 11)

Check of unused states: 1111 gives T3=1T_3 = 1, T2=0T_2 = 0, T1=1T_1 = 1, T0=1T_0 = 1, so bits 3, 1, 0 toggle and 1111 goes to 0100, a valid state. Similarly 1100 goes to 1101, 1101 to 1110 and 1110 to 1111. Hence the counter is self-correcting.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Explain why NAND and NOR gates are called universal gates, and realize NOR as a universal gate.

Answer

Why NAND and NOR are universal gates: a universal gate is one from which all other gates (NOT, AND, OR) and hence any Boolean function can be built using only that type of gate. NAND and NOR gates can each implement NOT, AND and OR operations, so they are called universal gates. They are also cheap and easy to fabricate in ICs.

Realization using NOR gate

  1. NOT: join both inputs of a NOR gate together.

Y=A+A‾=A′Y = \overline{A + A} = A'

  1. OR: a NOR gate followed by a NOR used as inverter.

Y=A+B‾‾=A+BY = \overline{\overline{A + B}} = A + B

  1. AND: invert each input with a NOR-as-NOT, then feed them to a NOR gate.

Y=A′+B′‾=ABY = \overline{A' + B'} = AB

NOT :  A --+--[NOR]-- A'
           +--/

OR  :  A --\
           [NOR]--[NOR as NOT]-- A+B
       B --/

AND :  A --[NOR as NOT]--\
                          [NOR]-- AB
       B --[NOR as NOT]--/

Since NOT, AND and OR can all be built from NOR gates alone, NOR is a universal gate. (Similarly NAND: NOT = NAND with joined inputs, AND = NAND followed by NOT, OR = NAND of the inverted inputs.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Simplify F=XYZ′+XZ′+X′Y+X′YZ′F = XYZ' + XZ' + X'Y + X'YZ' using K-maps in both SOP and POS forms.

Answer

F=XYZ′+XZ′+X′Y+X′YZ′F = XYZ' + XZ' + X'Y + X'YZ'

Minterms: XYZ′=110XYZ' = 110 (6), XZ′=100,110XZ' = 100, 110 (4, 6), X′Y=010,011X'Y = 010, 011 (2, 3), X′YZ′=010X'YZ' = 010 (2).

F=Σm(2,3,4,6)F = \Sigma m(2, 3, 4, 6)

K-map (rows XX, columns YZYZ in order 00, 01, 11, 10)

X \ YZ00011110
00011
11001

SOP form: group m4,m6m_4, m_6 (a pair giving XZ′XZ') and m2,m3m_2, m_3 (a pair giving X′YX'Y).

F=XZ′+X′YF = XZ' + X'Y

POS form: group the zeros m0,m1,m5,m7m_0, m_1, m_5, m_7.

  • m0,m1m_0, m_1 (X=0X=0, Y=0Y=0): X′Y′X'Y'
  • m5,m7m_5, m_7 (X=1X=1, Z=1Z=1): XZXZ

F′=X′Y′+XZF' = X'Y' + XZ

Complement both sides:

F=(X+Y)(X′+Z′)F = (X + Y)(X' + Z')

Both forms give the same function.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Define PLDs. Implement F1=Σ(0,1,2)F_1 = \Sigma(0,1,2) and F2=Σ(0,2,3)F_2 = \Sigma(0,2,3) using a ROM.

Answer

PLDs (Programmable Logic Devices): integrated circuits containing an array of AND and OR gates (and sometimes flip-flops) whose connections can be programmed by the user to implement a desired logic function. Types: PROM/ROM, PLA, PAL, CPLD, FPGA.

ROM implementation: a ROM with nn address lines and mm output bits implements mm functions of nn variables. It has a fixed AND array (a decoder that generates all minterms) and a programmable OR array.

Here there are two variables A,BA, B (as FF includes minterms 0 to 3), so a 4×24 \times 2 ROM is needed.

F1=Σ(0,1,2),F2=Σ(0,2,3)F_1 = \Sigma(0,1,2), \qquad F_2 = \Sigma(0,2,3)

ROM truth table (programming table)

Address (A B)F1F_1F2F_2
0011
0110
1011
1101

Implementation

A,B -> [2-to-4 decoder] -> m0 m1 m2 m3
F1 = OR(m0, m1, m2)   (programmed connections at m0, m1, m2)
F2 = OR(m0, m2, m3)   (programmed connections at m0, m2, m3)

The fuses are kept intact at the crosspoints where the table has 1, and blown where it has 0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Describe the clocked master-slave J-K flip-flop, with its operation table.

Answer

The master-slave J-K flip-flop consists of two cascaded clocked J-K (RS) flip-flops: the master and the slave. The slave receives the inverted clock, and the outputs of the slave Q,Q′Q, Q' are fed back to the master inputs.

J ---[ Master ]--Qm-->[ Slave ]-- Q
K ---[  JK    ]       [  RS   ]-- Q'
CLK ---+----------[NOT]--+
       +-> master        +-> slave (opposite phase)
  Q and Q' feed back to the master inputs

Operation

  • When CLK = 1: the master is enabled and accepts J and K, while the slave is disabled (isolated). The output does not change.
  • When CLK goes to 0 (falling edge): the master is disabled and the slave is enabled, so the master's state is passed to the output Q.

Hence the output changes only once per clock cycle, at the clock's falling edge, and the race-around condition for J=K=1J = K = 1 is eliminated.

Operation table

JKQn+1Q_{n+1}Operation
00QnQ_nNo change
010Reset
101Set
11Qn′Q_n'Toggle

Qn+1=JQn′+K′QnQ_{n+1} = JQ_n' + K'Q_n

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is the forbidden state in an SR flip-flop? Convert an SR flip-flop to a J-K flip-flop.

Answer

Forbidden state in an SR flip-flop

The input combination S=R=1S = R = 1 is forbidden (invalid). In a NOR-latch it forces both QQ and Q′Q' to 0 (in a NAND latch, to 1), so the outputs are not complementary. When the inputs return to S=R=0S = R = 0 together, the final state is unpredictable (it depends on the gate delays). Hence the condition SR=0SR = 0 must always be maintained.

Conversion of SR to JK flip-flop

We need the SR inputs as functions of J,KJ, K and the present state QQ.

JKQnQ_nQn+1Q_{n+1}SR
00000x
0011x0
01000x
011001
100110
1011x0
110110
111001

By K-maps:

S=JQ′,R=KQS = JQ', \qquad R = KQ

Circuit: two AND gates: one with inputs JJ and Q′Q' gives SS, the other with inputs KK and QQ gives RR. Their outputs go to the S and R inputs of the SR flip-flop, and the outputs QQ and Q′Q' are fed back. Because QQ and Q′Q' are never both 1, S=R=1S = R = 1 can never occur.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Differentiate between a ring counter and a Johnson counter.

Answer

Ring counterJohnson counter
Output of the last flip-flop (QQ) is fed back to the first flip-flop's input.Complemented output (Q′Q') of the last flip-flop is fed back to the first input.
An nn-bit counter has nn states (mod-nn).An nn-bit counter has 2n2n states (mod-2n2n).
Needs to be preset to start with a single 1 (e.g., 1000).Starts from all zeros (0000); no preset needed.
Sequence (4-bit): 1000, 0100, 0010, 0001.Sequence (4-bit): 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001.
Decoding of a state needs only one bit (single 1) so no gate is needed.Decoding of any state needs a 2-input gate.
Less efficient: uses nn flip-flops for nn states.More efficient: same flip-flops give twice the states.
Uses: sequencing and timing pulses.Uses: higher count with simple decoding, sequence generators.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Write short notes on any two: (a) ASCII code (b) logic micro-operations (c) state table.

Answer

(a) ASCII code

ASCII (American Standard Code for Information Interchange) is a 7-bit alphanumeric code (128 characters), often stored in 8 bits (with a parity or extended bit). It represents the digits, upper and lower case letters, punctuation and control characters. Examples: 'A' = 65 (1000001), 'a' = 97 (1100001), '0' = 48 (0110000). It is the standard for data exchange between computers and peripherals.

(b) Logic micro-operations

Logic micro-operations treat each bit of the registers separately as binary variables. Examples with registers AA and BB:

  • AND (mask): F=A∧BF = A \wedge B clears selected bits.
  • OR (selective set): F=A∨BF = A \vee B sets selected bits.
  • XOR (selective complement): F=A⊕BF = A \oplus B complements selected bits.
  • NOT (complement): F=A′F = A' complements all bits.

They are used to manipulate bits of data in registers, e.g., masking, inserting or deleting bits.

(c) State table

A state table lists the present states and inputs of a sequential circuit with the corresponding next states and outputs. Each row is one combination of present state and input. It is used with the excitation table to derive flip-flop input equations.

Present state QInput xNext stateOutput y
0000
0110
1010
1101

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Convert (591.62)10(591.62)_{10} into hexadecimal and octal.

Answer

Convert (591.62)10(591.62)_{10}.

To hexadecimal

Integer part (divide by 16):

  • 591÷16=36591 \div 16 = 36 remainder 1515 (F)
  • 36÷16=236 \div 16 = 2 remainder 44
  • 2÷16=02 \div 16 = 0 remainder 22

So 591=(24F)16591 = (24F)_{16}.

Fractional part (multiply by 16):

  • 0.62×16=9.92→90.62 \times 16 = 9.92 \to 9
  • 0.92×16=14.72→0.92 \times 16 = 14.72 \to E
  • 0.72×16=11.52→0.72 \times 16 = 11.52 \to B
  • 0.52×16=8.32→80.52 \times 16 = 8.32 \to 8

(591.62)10≈(24F.9EB8)16(591.62)_{10} \approx (24F.9EB8)_{16}

To octal

Integer part (divide by 8):

  • 591÷8=73591 \div 8 = 73 remainder 77
  • 73÷8=973 \div 8 = 9 remainder 11
  • 9÷8=19 \div 8 = 1 remainder 11
  • 1÷8=01 \div 8 = 0 remainder 11

So 591=(1117)8591 = (1117)_8.

Fractional part (multiply by 8):

  • 0.62×8=4.96→40.62 \times 8 = 4.96 \to 4
  • 0.96×8=7.68→70.96 \times 8 = 7.68 \to 7
  • 0.68×8=5.44→50.68 \times 8 = 5.44 \to 5
  • 0.44×8=3.52→30.44 \times 8 = 3.52 \to 3
  • 0.52×8=4.16→40.52 \times 8 = 4.16 \to 4

(591.62)10≈(1117.47534)8(591.62)_{10} \approx (1117.47534)_8

(The fractions do not terminate, so they are given approximately.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Design a combinational circuit with three inputs. The output is 1 when the binary value of the input is odd.

Answer

Problem: a combinational circuit with three inputs A,B,CA, B, C (AA = MSB, CC = LSB) whose output FF is 1 when the binary value of the input is odd.

Truth table

ABCDecimalF
00000
00111
01020
01131
10040
10151
11060
11171

F=Σm(1,3,5,7)F = \Sigma m(1, 3, 5, 7)

K-map

A \ BC00011110
00110
10110

All four 1s form a single quad (the column where C=1C = 1), in which AA and BB both change, so only CC remains.

F=CF = C

Logic diagram: no gates are needed; the output FF is connected directly to input CC. The inputs AA and BB do not affect the output. (As a check, a number is odd exactly when its least significant bit is 1.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 2+8 marks

What is counter? Design a 3-bit synchronous up-down counter along with state diagram and timing sequence.

Answer

Counter: a sequential circuit made of flip-flops that goes through a prescribed sequence of states on the application of clock pulses; it is used to count pulses, divide frequency and generate timing.

Design of 3-bit synchronous up-down counter (T flip-flops, Q2Q1Q0Q_2Q_1Q_0)

A control input MM selects the direction: M=1M = 1 up count, M=0M = 0 down count.

State diagram

Up   (M=1): 000 -> 001 -> 010 -> 011 -> 100 -> 101 -> 110 -> 111 -> 000
Down (M=0): 000 -> 111 -> 110 -> 101 -> 100 -> 011 -> 010 -> 001 -> 000

Toggle conditions

  • Q0Q_0 toggles on every clock pulse for both directions.
  • Q1Q_1 toggles when Q0=1Q_0 = 1 (up) or Q0=0Q_0 = 0 (down).
  • Q2Q_2 toggles when Q1Q0=11Q_1Q_0 = 11 (up) or Q1Q0=00Q_1Q_0 = 00 (down).

Excitation equations

T0=1T_0 = 1

T1=MQ0+M′Q0′=M⊙Q0T_1 = MQ_0 + M'Q_0' = M \odot Q_0

T2=MQ1Q0+M′Q1′Q0′T_2 = MQ_1Q_0 + M'Q_1'Q_0'

Partial state table

MPresent Q2Q1Q0Q_2Q_1Q_0NextT2T1T0T_2T_1T_0
1011100111
1101110011
0100011111
0010001011

Timing sequence

Clock012345678
Up count000001010011100101110111000
Down count000111110101100011010001000

Circuit: three T flip-flops with a common clock; T0T_0 is tied to logic 1; T1T_1 is driven by an XNOR gate with inputs MM and Q0Q_0; T2T_2 is driven by an OR gate of two 3-input AND gates, M⋅Q1⋅Q0M\cdot Q_1\cdot Q_0 and M′⋅Q1′⋅Q0′M'\cdot Q_1'\cdot Q_0'.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Perform following arithmetic operation: (a) 101101 + 011011 (b) 101111 - 010101

Answer

(a) 101101+011011101101 + 011011

  1 0 1 1 0 1     (45)
+ 0 1 1 0 1 1     (27)
-------------
1 0 0 1 0 0 0     (72)

Bit by bit from the right: 1+1=01+1 = 0 carry 1; 0+1+1=00+1+1 = 0 carry 1; 1+0+1=01+0+1 = 0 carry 1; 1+1+1=11+1+1 = 1 carry 1; 0+1+1=00+1+1 = 0 carry 1; 1+0+1=01+0+1 = 0 carry 1; final carry 1.

101101+011011=1001000101101 + 011011 = 1001000

(b) 101111−010101101111 - 010101

Using 2's complement: 1's complement of 010101010101 is 101010101010, add 1 to get 101011101011.

  1 0 1 1 1 1     (47)
+ 1 0 1 0 1 1
-------------
1 0 1 1 0 1 0

The carry-out (leftmost 1) is discarded, since the result is positive.

101111−010101=011010(26)101111 - 010101 = 011010 \quad (26)

Check: 47−21=26=01101047 - 21 = 26 = 011010.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Simplify (using K-map): F=(A+B+C+D′)(A+B+C′+D)(A+B′+C′+D′)(A+B′+C′+D)(A′+B′+C′+D)(A′+B+C+D′)(A′+B+C′+D)F = (A + B + C + D')(A + B + C' + D)(A + B' + C' + D')(A + B' + C' + D)(A' + B' + C' + D)(A' + B + C + D')(A' + B + C' + D)

Answer

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

Each sum term is a maxterm (the output is 0 there). Writing the variable as 0 if uncomplemented:

  • (A+B+C+D′)(A+B+C+D'): 0001, M1M_1
  • (A+B+C′+D)(A+B+C'+D): 0010, M2M_2
  • (A+B′+C′+D)(A+B'+C'+D): 0110, M6M_6
  • (A+B′+C′+D′)(A+B'+C'+D'): 0111, M7M_7
  • (A′+B+C+D′)(A'+B+C+D'): 1001, M9M_9
  • (A′+B+C′+D)(A'+B+C'+D): 1010, M10M_{10}
  • (A′+B′+C′+D)(A'+B'+C'+D): 1110, M14M_{14}

F=ΠM(1,2,6,7,9,10,14)F = \Pi M(1, 2, 6, 7, 9, 10, 14)

K-map (rows ABAB, columns CDCD in order 00, 01, 11, 10; zeros shown)

AB \ CD00011110
001010
011100
111110
101010

Grouping the zeros

  • Quad M2,M6,M10,M14M_2, M_6, M_{10}, M_{14} (column CD=10CD = 10): C=1C=1, D=0D=0, giving the sum term (C′+D)(C' + D)
  • Pair M1,M9M_1, M_9 (B=0B=0, C=0C=0, D=1D=1): (B+C+D′)(B + C + D')
  • Pair M6,M7M_6, M_7 (A=0A=0, B=1B=1, C=1C=1): (A+B′+C′)(A + B' + C')

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

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 1+4 marks

Define multiplexer. Implement 8 x 1 multiplexer using 2 x 1 multiplexer.

Answer

Multiplexer (MUX): a combinational circuit that selects one of many data inputs and passes it to a single output, using select lines. A 2n2^n-to-1 MUX has 2n2^n inputs and nn select lines.

8 x 1 MUX using 2 x 1 MUXes: seven 2 x 1 MUXes in three levels are required.

  • Level 1 (select S0S_0): M1 takes (I0,I1)(I_0, I_1), M2 takes (I2,I3)(I_2, I_3), M3 takes (I4,I5)(I_4, I_5), M4 takes (I6,I7)(I_6, I_7).
  • Level 2 (select S1S_1): M5 takes outputs of (M1, M2), M6 takes outputs of (M3, M4).
  • Level 3 (select S2S_2): M7 takes outputs of (M5, M6) and gives YY.
I0,I1 -> M1 --\
               M5 --\
I2,I3 -> M2 --/      \
 (S0)        (S1)     M7 --> Y
I4,I5 -> M3 --\      /  (S2)
               M6 --/
I6,I7 -> M4 --/

Check: for S2S1S0=011S_2S_1S_0 = 011: M2 (select S0=1S_0 = 1) passes I3I_3; M5 (select S1=1S_1 = 1) passes the output of M2; M7 (select S2=0S_2 = 0) passes the output of M5. Hence Y=I3Y = I_3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 2+3 marks

What is Flip Flop? Differentiate between Combinational circuit and Sequential Circuit.

Answer

Flip-flop: a flip-flop is a bistable sequential circuit having two stable states (0 and 1) that can store one bit of information. Its output changes state only on a clock edge or pulse, depending on the inputs, and remains until the next change. Types: SR, JK, D, T.

Combinational vs sequential circuit

Combinational circuitSequential circuit
Output depends only on the present inputs.Output depends on present inputs and past outputs (stored state).
Has no memory element.Has memory elements (flip-flops).
No feedback path.Has feedback from output to input.
Does not need a clock.Usually needs a clock (synchronous).
Faster and simpler.Slower and more complex.
Examples: adder, multiplexer, decoder.Examples: counter, register, flip-flop.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Realize JK flip-flop from RS flip-flop.

Answer

We need to make a JK flip-flop using an RS flip-flop, so the S and R inputs must be derived from J,KJ, K and the present output QQ.

Excitation table of RS flip-flop

Qn→Qn+1Q_n \to Q_{n+1}SR
0 → 00x
0 → 110
1 → 001
1 → 1x0

Conversion table

JKQnQ_nQn+1Q_{n+1}SR
00000x
0011x0
01000x
011001
100110
1011x0
110110
111001

K-maps (with the don't cares)

S=JQ′,R=KQS = JQ', \qquad R = KQ

Circuit

J --\
     AND -- S --[ RS      ]-- Q  ---+
Q' -/            [ flip-   ]        |
K --\            [ flop    ]-- Q' --+--(fed back)
     AND -- R --[         ]
Q --/
CLK -------------> CP

An AND gate (inputs JJ and Q′Q') feeds S and another AND gate (inputs KK and QQ) feeds R, with Q,Q′Q, Q' fed back. When J=K=1J = K = 1 the circuit toggles, and S=R=1S = R = 1 never occurs.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 1+4 marks

Define shifter. Design a 4-bit shifter circuit.

Answer

Shifter: a combinational circuit that transfers the contents of a register shifted left or right (or unchanged) by one position without using a clock; it is a part of the processor's ALU/datapath, built using multiplexers.

Design of a 4-bit shifter: the input is A3A2A1A0A_3A_2A_1A_0 and the output H3H2H1H0H_3H_2H_1H_0. Four 4 x 1 multiplexers with common select lines S1S0S_1S_0 are used, one per output bit.

Function table

S1S_1S0S_0OperationOutput H3H2H1H0H_3H_2H_1H_0
00No shift (transfer)A3A2A1A0A_3A_2A_1A_0
01Shift rightIR A3A2A1I_R\,A_3A_2A_1
10Shift leftA2A1A0 ILA_2A_1A_0\,I_L
11Clear0000

Here IRI_R and ILI_L are the serial inputs for the shift-right and shift-left cases.

Multiplexer inputs (inputs 0, 1, 2, 3 of each MUX)

OutputInput 0Input 1Input 2Input 3
H3H_3A3A_3IRI_RA2A_20
H2H_2A2A_2A3A_3A1A_10
H1H_1A1A_1A2A_2A0A_00
H0H_0A0A_0A1A_1ILI_L0
A3 A2 A1 A0 -> [4 x 4:1 MUX, select S1 S0] -> H3 H2 H1 H0
IR -> MUX3 input 1      IL -> MUX0 input 2

Example: A=1011A = 1011, S1S0=10S_1S_0 = 10 (shift left) with IL=0I_L = 0 gives H=0110H = 0110; S1S0=01S_1S_0 = 01 (shift right) with IR=0I_R = 0 gives H=0101H = 0101.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Write short notes on: (a) De-Multiplexer (b) Excitation table

Answer

(a) De-Multiplexer

A de-multiplexer (DEMUX) is a combinational circuit with one data input, nn select lines and 2n2^n outputs. It routes the single input to exactly one of the outputs, chosen by the binary value on the select lines. It is the reverse of a multiplexer ("one-to-many").

For a 1-to-4 DEMUX with input DD and selects S1S0S_1S_0:

S1S_1S0S_0Y0Y_0Y1Y_1Y2Y_2Y3Y_3
00DD000
010DD00
1000DD0
11000DD

Y0=D S1′S0′,Y1=D S1′S0,Y2=D S1S0′,Y3=D S1S0Y_0=D\,S_1'S_0',\quad Y_1=D\,S_1'S_0,\quad Y_2=D\,S_1S_0',\quad Y_3=D\,S_1S_0

Each output is a 3-input AND gate, so the circuit needs four AND gates and two inverters. A decoder with enable input works as a DEMUX, the enable being used as the data input. Uses: serial-to-parallel conversion, routing data to one of several registers, and memory/address selection.

(b) Excitation table

An excitation table of a flip-flop lists the required flip-flop inputs for each desired transition from the present state Q(t)Q(t) to the next state Q(t+1)Q(t+1). It is the inverse of the characteristic table and is used when designing sequential circuits (counters, state machines).

Q(t)Q(t)Q(t+1)Q(t+1)SR: S RS\,RJK: J KJ\,KD: DDT: TT
000 X0 X00
011 01 X11
100 1X 101
11X 0X 010

Here X is a don't-care. The don't-cares allow simpler input equations for the circuit being designed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 8+2 marks

Express the Boolean Function F=AB+B′CF=AB+B'C to sum of max terms with required truth tables. List two uses of sum of max terms.

Answer

Given F=AB+B′CF=AB+B'C.

Truth table

AABBCCABABB′CB'CFF
000000
001011
010000
011000
100000
101011
110101
111101

F=1F=1 for minterms 1, 5, 6, 7 and F=0F=0 for rows 0, 2, 3, 4.

Sum of maxterms (product of sums)

Each row with F=0F=0 gives a maxterm, in which a variable is complemented if it is 1 in that row:

  • Row 0 (000): M0=A+B+CM_0=A+B+C
  • Row 2 (010): M2=A+B′+CM_2=A+B'+C
  • Row 3 (011): M3=A+B′+C′M_3=A+B'+C'
  • Row 4 (100): M4=A′+B+CM_4=A'+B+C

F(A,B,C)=∏M(0,2,3,4)=(A+B+C)(A+B′+C)(A+B′+C′)(A′+B+C)F(A,B,C)=\prod M(0,2,3,4)=(A+B+C)(A+B'+C)(A+B'+C')(A'+B+C)

Check: F′=∑m(0,2,3,4)=A′B′C′+A′BC′+A′BC+AB′C′F'=\sum m(0,2,3,4)=A'B'C'+A'BC'+A'BC+AB'C', which is 1 exactly on the rows where F=0F=0.

Two uses of the maxterm (product-of-sums) form

  1. It can be implemented directly with two-level OR-AND logic (or NOR-NOR logic), which is useful when the function has fewer 0s than 1s.
  2. It is used to simplify a function by grouping the 0s in a K-map, which gives the complement F′F' in SOP form, and to find the complement of a function.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 3+7 marks

Differentiate between synchronous and asynchronous counter. Explain any one synchronous counter.

Answer

Difference between synchronous and asynchronous counters

Asynchronous (ripple) counterSynchronous counter
Clock is applied only to the first flip-flop; each later flip-flop is clocked by the output of the previous oneThe same clock pulse is applied to all flip-flops at once
Propagation delays add up, so the counter is slowAll flip-flops change together, so the delay is that of one flip-flop, and it is faster
Simple circuit with little extra logicNeeds extra combinational gates for the flip-flop inputs
Can show wrong intermediate (glitch) statesNo such transient states
Maximum clock frequency is limited by the number of stagesMaximum clock frequency is independent of the number of stages

3-bit synchronous binary up counter (using JK flip-flops)

The counter has three flip-flops Q2Q1Q0Q_2Q_1Q_0 driven by a common clock and counts 000→001→⋯→111→000000\to001\to\dots\to111\to000. A flip-flop toggles when all lower bits are 1.

Present Q2Q1Q0Q_2Q_1Q_0Next Q2Q1Q0Q_2Q_1Q_0J2K2J_2K_2J1K1J_1K_1J0K0J_0K_0
0000010 X0 X1 X
0010100 X1 XX 1
0100110 XX 01 X
0111001 XX 1X 1
100101X 00 X1 X
101110X 01 XX 1
110111X 0X 01 X
111000X 1X 1X 1

Simplifying with K-maps:

J0=K0=1,J1=K1=Q0,J2=K2=Q1Q0J_0=K_0=1,\qquad J_1=K_1=Q_0,\qquad J_2=K_2=Q_1Q_0

Circuit: FF0 has J=K=1J=K=1 so it toggles on every clock. FF1 has J=K=Q0J=K=Q_0 so it toggles when Q0=1Q_0=1. FF2 gets J=KJ=K from an AND gate with inputs Q1,Q0Q_1,Q_0, so it toggles when both lower bits are 1. All three clock inputs are tied to the same clock line. Because every flip-flop is clocked together, there is no ripple delay, and the counter can run at a higher clock frequency than a ripple counter.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 10 marks

Design a combinational circuit that generates 9's complement of a BCD number.

Answer

9's complement of a BCD digit

The 9's complement of a decimal digit NN is 9−N9-N. Let the BCD input be ABCDABCD (AA is the MSB) and the output be WXYZWXYZ. Inputs 1010 to 1111 are invalid in BCD, so they are don't-cares.

DigitABCDABCD9−N9-NWXYZWXYZ
0000091001
1000181000
2001070111
3001160110
4010050101
5010140100
6011030011
7011120010
8100010001
9100100000

Simplification (K-maps with don't-cares 10 to 15)

  • Z=1Z=1 for N=0,2,4,6,8N=0,2,4,6,8 so Z=D′Z=D'.
  • Y=1Y=1 for N=2,3,6,7N=2,3,6,7 so Y=CY=C.
  • X=1X=1 for N=2,3,4,5N=2,3,4,5. Grouping with don't-cares gives X=B′C+BC′=B⊕CX=B'C+BC'=B\oplus C.
  • W=1W=1 only for N=0,1N=0,1 so W=A′B′C′W=A'B'C'. The 0s at N=2,…,9N=2,\dots,9 need A′A', B′B' and C′C' all present, and the don't-cares cannot reduce it further.

W=A′B′C′,X=B⊕C,Y=C,Z=D′W=A'B'C',\quad X=B\oplus C,\quad Y=C,\quad Z=D'

Circuit

  • ZZ: one NOT gate on DD.
  • YY: a wire straight from CC.
  • XX: one XOR gate with inputs BB and CC.
  • WW: one 3-input NOR gate with inputs AA, BB, CC (since A′B′C′=(A+B+C)′A'B'C'=(A+B+C)').

The whole circuit needs only one NOT, one XOR and one NOR gate. Check: N=4N=4 (0100) gives W=0, X=1⊕0=1, Y=0, Z=1W=0,\ X=1\oplus0=1,\ Y=0,\ Z=1, which is 0101 = 5 = 9 - 4. For N=0N=0 (0000), W=1,X=0,Y=0,Z=1W=1,X=0,Y=0,Z=1 gives 1001 = 9.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Perform A-B with the given binary numbers using 1's complement. A=1010100, B=1000100.

Answer

Given A=1010100A=1010100 (=84=84) and B=1000100B=1000100 (=68=68). Compute A−BA-B using 1's complement.

Step 1: 1's complement of BB

B=1000100 ⇒ B‾=0111011B=1000100\ \Rightarrow\ \overline{B}=0111011

Step 2: add to AA

1010100+ 01110111 0001111\begin{array}{r} 1010100\\ +\ 0111011\\ \hline 1\,0001111 \end{array}

Step 3: end-around carry

A carry of 1 is produced out of the MSB, so the result is positive. Remove the carry and add it to the LSB:

0001111+1=00100000001111+1=0010000

A−B=00100002=1610A-B=0010000_2=16_{10}

Check: 84−68=1684-68=16.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Simplify the Boolean Function F in sum of products using the don't-care conditions d. F=B′C′D′+BCD′+ABCD′F=B'C'D'+BCD'+ABCD', d=B′CD′+A′BC′Dd=B'CD'+A'BC'D.

Answer

F=B′C′D′+BCD′+ABCD′F=B'C'D'+BCD'+ABCD' with d=B′CD′+A′BC′Dd=B'CD'+A'BC'D.

Minterms and don't-cares (order ABCDABCD)

  • B′C′D′B'C'D': 0000 and 1000, so m0,m8m_0,m_8
  • BCD′BCD': 0110 and 1110, so m6,m14m_6,m_{14}
  • ABCD′=1110ABCD'=1110: m14m_{14} (already included)
  • F=∑m(0,6,8,14)F=\sum m(0,6,8,14)
  • B′CD′B'CD': 0010 and 1010, so d2,d10d_2,d_{10}
  • A′BC′D=0101A'BC'D=0101: d5d_5
  • d=∑d(2,5,10)d=\sum d(2,5,10)

K-map (rows ABAB, columns CDCD)

AB\CDAB \backslash CD00011110
00100X
010X01
110001
10100X

Grouping

  • Quad of the corners m0,m2,m8,m10m_0,m_2,m_8,m_{10} (using d2,d10d_2,d_{10}): B′D′B'D'
  • Quad of the column CD=10CD=10: m2,m6,m14,m10m_2,m_6,m_{14},m_{10} (using d2,d10d_2,d_{10}): CD′CD'

F=B′D′+CD′F=B'D'+CD'

Both prime implicants are essential: B′D′B'D' is needed for m0,m8m_0,m_8 and CD′CD' for m6,m14m_6,m_{14}. The don't-care d5d_5 is not used.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Explain the concept of decoder with an example.

Answer

Decoder

A decoder is a combinational circuit that converts an nn-bit binary code on its inputs into a unique active output among 2n2^n output lines. Exactly one output is active (1, or 0 for active-low types) for each input combination. Many decoders also have an enable input EE. Each output is a minterm of the inputs, so a decoder can implement any Boolean function when OR gates are used on its outputs.

Example: 2-to-4 line decoder (inputs A,BA,B; outputs D0D_0 to D3D_3)

EEAABBD0D_0D1D_1D2D_2D3D_3
0XX0000
1001000
1010100
1100010
1110001

D0=E A′B′,D1=E A′B,D2=E AB′,D3=E ABD_0=E\,A'B',\quad D_1=E\,A'B,\quad D_2=E\,AB',\quad D_3=E\,AB

The circuit uses two NOT gates and four 3-input AND gates. If A,B=10A,B=10 and E=1E=1, only D2D_2 goes high.

Uses: memory address decoding, instruction decoding in a CPU, seven-segment display drivers, and implementing Boolean functions (for example a full adder from a 3-to-8 decoder with two OR gates: S=∑m(1,2,4,7)S=\sum m(1,2,4,7), C=∑m(3,5,6,7)C=\sum m(3,5,6,7)). Larger decoders can be built from smaller ones, e.g. a 3-to-8 decoder from two 2-to-4 decoders with enable inputs.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

List different memory types and explain basic memory operations.

Answer

Memory types

Memory can be classified as follows.

  1. Primary (main) memory
    • RAM (random access, volatile, read/write): SRAM (flip-flop based, fast, used for cache) and DRAM (capacitor based, needs refresh, used for main memory).
    • ROM (non-volatile, mostly read-only): masked ROM, PROM, EPROM (UV erasable), EEPROM (electrically erasable) and flash memory.
  2. Secondary memory: hard disk, SSD, optical disks and magnetic tape (non-volatile, large and slower).
  3. Cache memory: a small, very fast memory between the CPU and main memory.
  4. Registers: the fastest storage, inside the CPU.

Basic memory operations

A memory is a collection of storage cells organised as words, each having a unique address. It has an address bus (to select a word), a data bus, and control signals (Read/Write, Memory Enable).

  1. Write operation (store): the CPU places the address in the address register (MAR), the data in the data register (MDR), and activates the Write signal. The data is stored in the addressed word, which replaces its old contents. M[address]←dataM[\text{address}]\leftarrow \text{data}
  2. Read operation (load): the CPU places the address on the address lines and activates the Read signal. The addressed word is placed on the data lines and copied to the MDR. The contents of memory remain unchanged (non-destructive read). data←M[address]\text{data}\leftarrow M[\text{address}]

A memory with kk address lines and nn data lines holds 2k2^k words of nn bits. For example, k=10k=10 and n=8n=8 gives 1024×81024\times 8 bits, or 1 KB.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Explain JK flip flop with necessary diagram and truth table.

Answer

JK flip-flop

The JK flip-flop is a clocked flip-flop with two data inputs JJ and KK. It removes the invalid state of the SR flip-flop: J=K=1J=K=1 makes the output toggle. JJ acts like Set and KK like Reset.

Circuit diagram (using NAND gates)

A clocked SR flip-flop is made of two cross-coupled NAND gates with two input NAND gates. QQ is fed back to the gate for KK, and Q′Q' is fed back to the gate for JJ:

S=J⋅Q′,R=K⋅QS=J\cdot Q',\qquad R=K\cdot Q

Each steering gate also has the clock CLK as an input. The outputs are QQ and Q′Q'.

Truth table

CLKJJKKQ(t+1)Q(t+1)Operation
0 / not activeXXQQNo change
active00QQNo change (hold)
active010Reset
active101Set
active11Q′Q'Toggle

Characteristic equation

Q(t+1)=JQ′+K′QQ(t+1)=JQ'+K'Q

With J=K=1J=K=1 and a level-triggered clock, the output would oscillate (race-around condition) while the clock is high. This is avoided by using a master-slave or edge-triggered arrangement, so that the output changes only once per clock pulse.

Uses: counters, shift registers and frequency dividers (with J=K=1J=K=1 it divides the clock frequency by 2).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 2.5+2.5 marks

Perform the following conversion: (a) (0.625)10(0.625)_{10} to binary. (b) (173)8(173)_8 to decimal.

Answer

(a) (0.625)10(0.625)_{10} to binary

Multiply the fraction repeatedly by 2 and record the integer parts:

  • 0.625×2=1.25→10.625\times2=1.25\to 1
  • 0.25×2=0.5→00.25\times2=0.5\to 0
  • 0.5×2=1.0→10.5\times2=1.0\to 1

Reading downwards: (0.625)10=(0.101)2(0.625)_{10}=(0.101)_2.

Check: 12+18=0.5+0.125=0.625\tfrac12+\tfrac18=0.5+0.125=0.625.

(b) (173)8(173)_8 to decimal

(173)8=1×82+7×81+3×80=64+56+3=123(173)_8=1\times8^2+7\times8^1+3\times8^0=64+56+3=123

So (173)8=(123)10(173)_8=(123)_{10}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Explain processor registers and ALU connection through common buses with a suitable diagram.

Answer

Processor registers and ALU connection through common buses

A CPU has a number of registers (general-purpose registers R0 to Rn, the program counter PC, the instruction register IR, the memory address register MAR, the memory data register MDR, the accumulator, and the status register) and an ALU that performs arithmetic and logic operations. These are connected by internal buses.

Single-bus organisation

          +--------- Internal CPU bus ----------------+
          |      |       |        |         |         |
         PC     IR     R0..Rn    MAR       MDR        Y
                                   |         |        |
                                Address    Data        v
                                  bus      bus   +---- ALU ----+
                                                       |
                                                       Z
                                                       |
                                                    (to bus)

Operation

  1. Each register's output is connected to the bus through a tri-state gate (or bus multiplexer), and its input is loaded from the bus. A control signal (such as RioutR_{iout} or RiinR_{iin}) enables the transfer, and only one register may drive the bus at a time.
  2. The ALU has two inputs. One comes from the bus, and the other from a temporary register (Y) that holds the first operand. The ALU result is stored in a temporary register Z, because the bus is busy during the operation.
  3. For R3←R1+R2R3\leftarrow R1+R2:
    • R1outR1_{out}, YinY_{in}: copy R1 to Y.
    • R2outR2_{out}, ALU Add, ZinZ_{in}: ALU adds Y and the bus value and loads Z.
    • ZoutZ_{out}, R3inR3_{in}: copy the result to R3.
  4. The control unit generates these control signals in sequence.

A multiple-bus organisation (two or three buses) lets two operands be read and a result written in the same clock cycle, so instructions execute faster. The cost is more hardware. Common buses reduce the number of connections, since each register needs only one connection to the bus instead of separate paths to every other unit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 5 marks

Show that the dual of the exclusive-OR is equal to its complement.

Answer

To show: the dual of the exclusive-OR equals its complement

Exclusive-OR of xx and yy:

x⊕y=xy′+x′yx\oplus y=xy'+x'y

The dual of an expression is obtained by interchanging AND with OR (and 0 with 1), keeping the variables unchanged:

(x⊕y)d=(x+y′)(x′+y)(x\oplus y)^d=(x+y')(x'+y)

Expand the product:

(x+y′)(x′+y)=xx′+xy+y′x′+y′y(x+y')(x'+y)=xx'+xy+y'x'+y'y

Since xx′=0xx'=0 and yy′=0yy'=0:

(x⊕y)d=xy+x′y′(x\oplus y)^d=xy+x'y'

The complement of the XOR is the XNOR, which is equal to xy+x′y′xy+x'y'. We can check this using De Morgan's law:

(x⊕y)′=(xy′+x′y)′=(x′+y)(x+y′)=xy+x′y′(x\oplus y)'=(xy'+x'y)'=(x'+y)(x+y')=xy+x'y'

Therefore

(x⊕y)d=xy+x′y′=(x⊕y)′(x\oplus y)^d=xy+x'y'=(x\oplus y)'

Hence the dual of the exclusive-OR is equal to its complement (the equivalence function). Truth table check: x⊕yx\oplus y is 0,1,1,0 for xyxy = 00,01,10,11. The dual function xy+x′y′xy+x'y' is 1,0,0,1, which is the complement.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081.2 · 2.5+2.5 marks

Write short notes on (a) Universal gate. (b) Status register.

Answer

(a) Universal gate

A universal gate is a logic gate that can be used alone to implement any Boolean function (NOT, AND and OR). NAND and NOR are universal gates.

NAND implementations:

  • NOT: A′=(A⋅A)′A'=(A\cdot A)' (inputs tied together)
  • AND: AB=((AB)′)′AB=((AB)')' (NAND followed by a NAND used as inverter)
  • OR: A+B=(A′⋅B′)′A+B=(A'\cdot B')' (invert each input with a NAND, then NAND the results)

NOR implementations:

  • NOT: A′=(A+A)′A'=(A+A)'
  • OR: A+B=((A+B)′)′A+B=((A+B)')'
  • AND: AB=(A′+B′)′AB=(A'+B')'

They are preferred in IC fabrication because using one gate type simplifies design and manufacturing, and the gates need fewer transistors and are faster.

(b) Status register

The status register (flag register or program status word, PSW) is a CPU register whose individual bits (flags) record the conditions produced by the last ALU operation. The control unit uses them for conditional branching, and they can also be tested by software.

Common flags:

  • C (Carry): set if there is a carry out of the MSB.
  • S (Sign): set if the MSB of the result is 1 (negative).
  • Z (Zero): set if the result is zero.
  • V (Overflow): set if signed overflow occurs, i.e. the carries into and out of the MSB differ.

Some processors also have parity, auxiliary-carry and interrupt-enable flags.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BIT 2077 First Semester Introduction to Information Technology (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Introduction to Information Technology (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Introduction to Information Technology (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Introduction to Information Technology (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Introduction to Information Technology (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Introduction to Information Technology (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester C Programming (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester C Programming (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester C Programming (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester C Programming (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester C Programming (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester C Programming (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Digital Logic (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Digital Logic (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Digital Logic (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Digital Logic (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Digital Logic (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Digital Logic (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Basic Mathematics (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Basic Mathematics (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Basic Mathematics (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Basic Mathematics (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Basic Mathematics (TU IOST semester board exam, 2081 (BS), via StudyNp), TU BIT 2081.2 First Semester Basic Mathematics (TU IOST semester board exam, 2081.2 (BS), via StudyNp), TU BIT 2077 First Semester Sociology (TU IOST semester board exam, 2077 (BS), via StudyNp), TU BIT 2078 First Semester Sociology (TU IOST semester board exam, 2078 (BS), via StudyNp), TU BIT 2079 First Semester Sociology (TU IOST semester board exam, 2079 (BS), via StudyNp), TU BIT 2080 First Semester Sociology (TU IOST semester board exam, 2080 (BS), via StudyNp), TU BIT 2081 First Semester Sociology (TU IOST semester board exam, 2081 (BS), via StudyNp) and TU BIT 2081.2 First Semester Sociology (TU IOST semester board exam, 2081.2 (BS), via StudyNp). Answers are written for this site; check them against your class notes.