2081

BIT103 ยท TU past paper

Digital Logic 2081 question paper

The complete TU 2081 exam paper for Digital Logic (BIT103), all 12 questions with solved model answers written to the mark scheme.

Tap a question to open its answer.

  1. Q1.10 marksCombinational circuit design methodologyAnswer

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

    Design a combinational circuit with three inputs (A, B, C) where the output F = 1 when the binary value of the inputs is odd. --- Signal Description --------------------- A Most Significant Bit (MSB) B Middle Bit C Least Significant Bit (LSB) F Output (1 if binary value is odd) Key Observation: A...

  2. Q2.10 marksMagnitude comparator circuitsAnswer

    Define magnitude comparator?Design a 4-bit magnitude comparator circuit.[2+8]

    Magnitude Comparator

    Definition (2 marks)

    A magnitude comparator is a combinational logic circuit that compares two binary numbers and determines their relative magnitudes. Given two n-bit numbers A and B, the comparator produces three output signals:

    • A > B (output is HIGH when A is greater than B)
    • A = B (output is HIGH when A equals B)
    • A < B (output is HIGH when A is less than B)

    Design of 4-bit Magnitude Comparator (8 marks)

    Given

    Two 4-bit numbers:

    • A = Aโ‚ƒAโ‚‚Aโ‚Aโ‚€
    • B = Bโ‚ƒBโ‚‚Bโ‚Bโ‚€

    Step 1: Basic Bit Comparison

    For each bit position i, define:

    ConditionExpression
    Aแตข = Bแตขxแตข = AแตขBแตข + ฤ€แตข Bฬ„แตข (XNOR)
    Aแตข > BแตขAแตขBฬ„แตข
    Aแตข < Bแตขฤ€แตขBแตข

    So define equality bits:

    xโ‚ƒ = Aโ‚ƒBโ‚ƒ + ฤ€โ‚ƒBฬ„โ‚ƒ
    xโ‚‚ = Aโ‚‚Bโ‚‚ + ฤ€โ‚‚Bฬ„โ‚‚
    xโ‚ = Aโ‚Bโ‚ + ฤ€โ‚Bฬ„โ‚
    xโ‚€ = Aโ‚€Bโ‚€ + ฤ€โ‚€Bฬ„โ‚€
    

    Step 2: Derive Output Expressions

    Equality Output: (A = B)

    All bit pairs must be equal:

    (A = B) = xโ‚ƒ ยท xโ‚‚ ยท xโ‚ ยท xโ‚€
    

    Greater Than Output: (A > B)

    A > B if the most significant differing bit of A is 1 and B is 0:

    (A > B) = Aโ‚ƒBฬ„โ‚ƒ
             + xโ‚ƒยทAโ‚‚Bฬ„โ‚‚
             + xโ‚ƒยทxโ‚‚ยทAโ‚Bฬ„โ‚
             + xโ‚ƒยทxโ‚‚ยทxโ‚ยทAโ‚€Bฬ„โ‚€
    

    Less Than Output: (A < B)

    A < B if the most significant differing bit of B is 1 and A is 0:

    (A < B) = ฤ€โ‚ƒBโ‚ƒ
             + xโ‚ƒยทฤ€โ‚‚Bโ‚‚
             + xโ‚ƒยทxโ‚‚ยทฤ€โ‚Bโ‚
             + xโ‚ƒยทxโ‚‚ยทxโ‚ยทฤ€โ‚€Bโ‚€
    

    Note: Alternatively, (A < B) = NOT(A > B) + NOT(A = B), i.e., (A < B) = (A > B)' ยท (A = B)'


    Step 3: Logic Circuit Block Diagram

    Aโ‚ƒ,Bโ‚ƒ โ”€โ”€โ–บ [XNOR]โ”€โ”€โ–บ xโ‚ƒ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    Aโ‚‚,Bโ‚‚ โ”€โ”€โ–บ [XNOR]โ”€โ”€โ–บ xโ‚‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ| AND โ”€โ”€โ–บ (A=B)
    Aโ‚,Bโ‚ โ”€โ”€โ–บ [XNOR]โ”€โ”€โ–บ xโ‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    Aโ‚€,Bโ‚€ โ”€โ”€โ–บ [XNOR]โ”€โ”€โ–บ xโ‚€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    
    For (A > B):
    Aโ‚ƒBฬ„โ‚ƒ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    xโ‚ƒยทAโ‚‚Bฬ„โ‚‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ| OR โ”€โ”€โ–บ (A>B)
    xโ‚ƒยทxโ‚‚ยทAโ‚Bฬ„โ‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    xโ‚ƒยทxโ‚‚ยทxโ‚ยทAโ‚€Bฬ„โ‚€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    
    For (A < B):
    ฤ€โ‚ƒBโ‚ƒ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    xโ‚ƒยทฤ€โ‚‚Bโ‚‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ| OR โ”€โ”€โ–บ (A<B)
    xโ‚ƒยทxโ‚‚ยทฤ€โ‚Bโ‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    xโ‚ƒยทxโ‚‚ยทxโ‚ยทฤ€โ‚€Bโ‚€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ|
    

    Step 4: Verification Example

    Let A = 1010 (10) and B = 0110 (6):

    BitABxแตข
    3100
    2010
    1111
    0001
    • (A = B) = xโ‚ƒยทxโ‚‚ยทxโ‚ยทxโ‚€ = 0ยท0ยท1ยท1 = 0 โœ“
    • (A > B) = Aโ‚ƒBฬ„โ‚ƒ = 1ยท1 = 1 โœ“ (since MSB of A is 1, MSB of B is 0)
    • (A < B) = ฤ€โ‚ƒBโ‚ƒ = 0ยท0 = 0 โœ“

  3. Q3.10 marksUp-down countersAnswer

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

    Counter: 3-bit Synchronous Up-Down Counter


    What is a Counter? [2 marks]

    A counter is a sequential logic circuit that goes through a prescribed sequence of states upon the application of input pulses (clock pulses). It is used to count the number of occurrences of an event or to generate a specific sequence of states.

    Key features:

    • Built using flip-flops (usually JK or D flip-flops)
    • Can be synchronous (all flip-flops clocked simultaneously) or asynchronous (ripple counter)
    • Can count up, down, or both (up-down counter)

    3-bit Synchronous Up-Down Counter [8 marks]

    Concept

    • When UP/DOWN (M) = 1 โ†’ counter counts UP: 0โ†’1โ†’2โ†’3โ†’4โ†’5โ†’6โ†’7โ†’0
    • When UP/DOWN (M) = 0 โ†’ counter counts DOWN: 7โ†’6โ†’5โ†’4โ†’3โ†’2โ†’1โ†’0โ†’7
    • Uses JK flip-flops: Qโ‚‚ (MSB), Qโ‚, Qโ‚€ (LSB)

    State Diagram

             M=1 (UP)                    M=0 (DOWN)
        
        000 โ†’ 001 โ†’ 010 โ†’ 011 โ†’ 100 โ†’ 101 โ†’ 110 โ†’ 111 โ†’ 000
         โ†‘                                                  |
         |__________________________________________________|
        
        000 โ† 001 โ† 010 โ† 011 โ† 100 โ† 101 โ† 110 โ† 111 โ† 000
    

    State Diagram (circular):

                  M=1 (UP direction)
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ†“                                          |
       000 โ†’(M=1)โ†’ 001 โ†’(M=1)โ†’ 010 โ†’(M=1)โ†’ 011   |
        โ†‘                                    โ†“    |
       111 โ†(M=1)โ† 110 โ†(M=1)โ† 101 โ†(M=1)โ† 100  |
        |                                          โ†‘
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  M=0 (DOWN direction, reverse)
    

    State Transition Table

    Present StateMNext State
    Qโ‚‚ Qโ‚ Qโ‚€Qโ‚‚' Qโ‚' Qโ‚€'
    0 0 01 (UP)0 0 1
    0 0 110 1 0
    0 1 010 1 1
    0 1 111 0 0
    1 0 011 0 1
    1 0 111 1 0
    1 1 011 1 1
    1 1 110 0 0
    0 0 00 (DOWN)1 1 1
    0 0 100 0 0
    0 1 000 0 1
    0 1 100 1 0
    1 0 000 1 1
    1 0 101 0 0
    1 1 001 0 1
    1 1 101 1 0

    JK Flip-Flop Excitation Table (Reference)

    Q โ†’ Q'JK
    0 โ†’ 00X
    0 โ†’ 11X
    1 โ†’ 0X1
    1 โ†’ 1X0

    Deriving Boolean Expressions

    For Qโ‚€ (LSB):

    • Qโ‚€ always toggles on every clock pulse (both up and down)
    • Jโ‚€ = Kโ‚€ = 1

    For Qโ‚:

    • Qโ‚ toggles when Qโ‚€ = 1 (counting up, M=1)
    • Qโ‚ toggles when Qโ‚€ = 0 (counting down, M=0)

    $$J_1 = K_1 = M \cdot Q_0 + \overline{M} \cdot \overline{Q_0}$$

    This can be written as:

    $$J_1 = K_1 = \overline{M \oplus Q_0}$$

    For Qโ‚‚:

    • Qโ‚‚ toggles when Qโ‚ = 1 AND Qโ‚€ = 1 (counting up, M=1)
    • Qโ‚‚ toggles when Qโ‚ = 0 AND Qโ‚€ = 0 (counting down, M=0)

    $$J_2 = K_2 = M \cdot Q_1 \cdot Q_0 + \overline{M} \cdot \overline{Q_1} \cdot \overline{Q_0}$$


    Summary of Excitation Equations

    Flip-FlopJK
    FFโ‚€11
    FFโ‚MยทQโ‚€ + Mฬ„ยทQฬ„โ‚€MยทQโ‚€ + Mฬ„ยทQฬ„โ‚€
    FFโ‚‚MยทQโ‚ยทQโ‚€ + Mฬ„ยทQฬ„โ‚ยทQฬ„โ‚€MยทQโ‚ยทQโ‚€ + Mฬ„ยทQฬ„โ‚ยทQฬ„โ‚€

    In every flip-flop J equals K, so each stage either holds its value or toggles, which is exactly the behaviour a binary counter needs. Writing the two mode terms with an exclusive-OR gives the compact forms:

    $$J_0 = K_0 = 1$$

    $$J_1 = K_1 = \overline{M \oplus Q_0}$$

    $$J_2 = K_2 = \overline{M \oplus Q_0} \cdot \overline{M \oplus Q_1}$$

    The third expression is the same function as the sum-of-products form above, because the AND of the two agreement terms is true only when M, Qโ‚€ and Qโ‚ all agree.


    Logic Circuit

                         M (1 = UP, 0 = DOWN)
                         |
                         +----------------+-----------------------+
                         |                |                       |
                         v                v                       v
       +-----+     +-----+------+   +-----+-------+       +-------+---------+
       |  1  |     | control for |  | control for |       |  control for    |
       +--+--+     |    FF1      |  |    FF2      |       |  (uses Q0, Q1)  |
          |        | M.Q0+M'.Q0' |  | M.Q1.Q0 +   |       +-------+---------+
          |        +------+------+  | M'.Q1'.Q0'  |               |
          |               |         +------+------+               |
          v               v                v                      v
      +---+---+       +---+---+        +---+---+
      |  FF0  |       |  FF1  |        |  FF2  |
      | J0 K0 |       | J1 K1 |        | J2 K2 |
      +---+---+       +---+---+        +---+---+
        |   |           |   |            |   |
        Q0  Q0'         Q1  Q1'          Q2  Q2'
        |   |           |   |
        +---+-----------+---+---------------> to the control gates above
          ^               ^                ^
          |               |                |
      CLK +---------------+----------------+
          (all three flip-flops clocked together)
    

    Each control block is two AND gates feeding an OR gate, and the same signal drives both J and K of its flip-flop. The single clock line reaching all three flip-flops is what makes the counter synchronous.


    Timing Sequence

    Counting up with M = 1, starting from 000:

    Clock pulseQโ‚‚Qโ‚Qโ‚€Decimal
    initial0000
    10011
    20102
    30113
    41004
    51015
    61106
    71117
    80000 (recycles)

    Counting down with M = 0, starting from 111:

    Clock pulseQโ‚‚Qโ‚Qโ‚€Decimal
    initial1117
    11106
    21015
    31004
    40113
    50102
    60011
    70000
    81117 (recycles)

    Timing Diagram (M = 1, up count)

    Pulse      1     2     3     4     5     6     7     8
            __    __    __    __    __    __    __    __
    CLK   _|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__
    
    Q0    โ€พโ€พโ€พโ€พโ€พโ€พ______โ€พโ€พโ€พโ€พโ€พโ€พ______โ€พโ€พโ€พโ€พโ€พโ€พ______โ€พโ€พโ€พโ€พโ€พโ€พ______
    
    Q1    ______โ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พ____________โ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พ______
    
    Q2    __________________โ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พโ€พ______
    

    Qโ‚€ changes on every clock pulse, Qโ‚ at half that rate and Qโ‚‚ at a quarter, so the three waveforms together read as the binary count 000 to 111. With M = 0 the same waveforms appear in reverse order, giving the down count.


    Conclusion

    A 3-bit synchronous up-down counter needs three JK flip-flops driven by a common clock, with the mode line M steering each stage through the agreement terms MยทQ + Mฬ„ยทQฬ„. Because all flip-flops switch on the same clock edge, the counter is free of the cumulative propagation delay of a ripple counter and can be operated at a much higher frequency.

  4. Q4.5 marksNumericalBinary decimal octal hexadecimal conversioAnswer

    Convert (257)โ‚ˆ into hexadecimal and decimal number system. [5]

    Convert (257)โ‚ˆ to Decimal and Hexadecimal

    Given Data

    • Number: $(257)_8$ (octal, base 8)
    • Required: convert to hexadecimal (base 16) and decimal (base 10)

    Part 1: Octal to Decimal

    Multiply each digit by its positional weight (power of 8):

    $$ (257)_8 = 2 \times 8^2 + 5 \times 8^1 + 7 \times 8^0 $$

    $$ = 2 \times 64 + 5 \times 8 + 7 \times 1 $$

    $$ = 128 + 40 + 7 = 175 $$

    $$ \boxed{(257)8 = (175){10}} $$


    Part 2: Octal to Hexadecimal (via Binary)

    Step 1: Convert each octal digit to 3-bit binary

    Octal Digit3-bit Binary
    2010
    5101
    7111

    $$ (257)_8 = (010\ 101\ 111)_2 = (10101111)_2 $$

    Step 2: Regroup binary into groups of 4 (from right)

    $$ 10101111 \rightarrow 1010\ 1111 $$

    (No padding needed here since 8 bits = two groups of 4.)

    4-bit GroupHexadecimal
    1010A
    1111F

    Answer

    $$ \boxed{(257)8 = (AF){16}} $$

    Verification (decimal check): $$ (AF){16} = 10 \times 16 + 15 = 160 + 15 = 175 = (175){10} \checkmark $$


    Summary

    FromToResult
    $(257)_8$Decimal$(175)_{10}$
    $(257)_8$Hexadecimal$(AF)_{16}$
  5. Q5.5 marksNumericalBinary arithmetic operationsAnswer

    Perform following arithmetic operation: a) $101101 + 011011$ b) $101111 - 010101$ [5]

    • a) $101101 + 011011$ - b) $101111 - 010101$ --- Rules: $0+0=0$, $0+1=1$, $1+0=1$, $1+1=10$, $1+1+1=11$ Step-by-step (right to left): Position A B Carry In Sum Carry Out ------------------ 1 (LSB) 1 1 0 0 1 2 0 1 1 0 1 3 1 0 1 0 1 4 1 1 1 1 1 5 0 1 1 0 1 6 (MSB) 1 0 1 0 1 Verification (Decimal):...
  6. Q6.5 marksNumericalKarnaugh map simplificationAnswer

    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)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)[5]

    K-Map Simplification of POS Expression

    Given

    $$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)$$

    For a maxterm, uncomplemented variable = 0, complemented variable = 1.

    Sum TermABCDMaxterm
    $A+B+C+D'$0001$M_1$
    $A+B+C'+D$0010$M_2$
    $A+B'+C'+D'$0111$M_7$
    $A+B'+C'+D$0110$M_6$
    $A'+B'+C'+D$1110$M_{14}$
    $A'+B+C+D'$1001$M_9$
    $A'+B+C'+D$1010$M_{10}$

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

    Step 2: K-Map (place 0 at maxterm positions)

               CD
    AB      00   01   11   10
     00  |  1  |  0  |  1  |  0  |     (m0=1, m1=0, m3=1, m2=0)
     01  |  1  |  1  |  0  |  0  |     (m4=1, m5=1, m7=0, m6=0)
     11  |  1  |  1  |  1  |  0  |     (m12=1,m13=1,m15=1,m14=0)
     10  |  1  |  0  |  1  |  0  |     (m8=1, m9=0, m11=1,m10=0)
    

    The zeros are at cells 1, 2, 6, 7, 9, 10, 14.

    Step 3: Group the 0s (for POS)

    List of zero cells:

    CellABCD
    10001
    20010
    60110
    70111
    91001
    101010
    141110

    Group A: {1, 9} (pair): B=0, C=0, D=1; A varies. For a sum term (0โ†’variable, 1โ†’complement): $B + C + D'$

    Group B: {2, 6, 10, 14} (quad): C=1, D=0; A and B vary. Sum term: $C' + D$

    Group C: {6, 7} (pair): A=0, B=1, C=1; D varies. Sum term: $A + B' + C'$

    Check coverage:

    • Cell 1 โ†’ A
    • Cell 9 โ†’ A
    • Cell 2 โ†’ B
    • Cell 6 โ†’ B, C
    • Cell 10 โ†’ B
    • Cell 14 โ†’ B
    • Cell 7 โ†’ C

    All seven zeros covered. Each group is essential:

    • {1,9} is the only group covering cell 1 and 9.
    • {6,7} is the only group covering cell 7.
    • {2,6,10,14} covers 2, 10, 14 (needed for 2 and 10 which no other prime implicant covers as a larger group).

    Final Simplified POS

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

  7. Q7.5 marksMultiplexer implementation using smaller mAnswer

    Define multiplexer. Implement 8 ร— 1 multiplexer using 2 ร— 1 multiplexer. [1+4]

    Multiplexer: Definition and Implementation

    Definition of Multiplexer

    A multiplexer (MUX) is a combinational circuit that selects one of many input lines and forwards it to a single output line based on select lines. It is also called a data selector.

    • An n-input multiplexer has:
      • 2^n data input lines
      • n select lines
      • 1 output line

    Implementing 8ร—1 MUX Using 2ร—1 MUXes

    Key Idea

    • An 8ร—1 MUX has: 8 data inputs (I0-I7), 3 select lines (S2, S1, S0), and 1 output
    • A 2ร—1 MUX has: 2 data inputs, 1 select line, 1 output

    How Many 2ร—1 MUXes Are Needed?

    To build an 8ร—1 MUX from 2ร—1 MUXes:

    StageMUXes RequiredOutput Lines
    Stage 1 (Level 1)4 ร— (2ร—1 MUX)4 outputs
    Stage 2 (Level 2)2 ร— (2ร—1 MUX)2 outputs
    Stage 3 (Level 3)1 ร— (2ร—1 MUX)1 output (final)

    Total = 4 + 2 + 1 = 7 two-input MUXes


    Circuit Description

    Data Inputs        Stage 1 (S0)      Stage 2 (S1)     Stage 3 (S2)
    -----------        ------------      ------------     ------------
    
    I0 โ”€โ”
        โ”œโ”€ MUX1 โ”€โ”€โ”
    I1 โ”€โ”˜  (S0)  โ”‚
                  โ”œโ”€ MUX5 โ”€โ”€โ”
    I2 โ”€โ”         โ”‚  (S1)   โ”‚
        โ”œโ”€ MUX2 โ”€โ”€โ”˜         โ”‚
    I3 โ”€โ”˜  (S0)             โ”œโ”€ MUX7 โ”€โ”€โ”€โ”€ Y (Output)
                             โ”‚   (S2)
    I4 โ”€โ”                   โ”‚
        โ”œโ”€ MUX3 โ”€โ”€โ”         โ”‚
    I5 โ”€โ”˜  (S0)  โ”‚         โ”‚
                  โ”œโ”€ MUX6 โ”€โ”€โ”˜
    I6 โ”€โ”         โ”‚  (S1)
        โ”œโ”€ MUX4 โ”€โ”€โ”˜
    I7 โ”€โ”˜  (S0)
    

    Operation (Truth Table of Selection)

    S2S1S0Selected Input
    000I0
    001I1
    010I2
    011I3
    100I4
    101I5
    110I6
    111I7

    Working Principle

    1. Stage 1 (controlled by S0):

      • MUX1 selects between I0 and I1
      • MUX2 selects between I2 and I3
      • MUX3 selects between I4 and I5
      • MUX4 selects between I6 and I7
    2. Stage 2 (controlled by S1):

      • MUX5 selects between outputs of MUX1 and MUX2
      • MUX6 selects between outputs of MUX3 and MUX4
    3. Stage 3 (controlled by S2):

      • MUX7 selects between outputs of MUX5 and MUX6 to give the final output Y

    Summary

    An 8ร—1 MUX can be implemented using seven 2ร—1 MUXes arranged in three stages, where each stage is controlled by one select line (S0, S1, S2 respectively), progressively narrowing 8 inputs down to 1 output.

  8. Q8.5 marksFlip-flop characteristic tables and equatiAnswer

    What is Flip Flop? Differentiate between Combinational circuit and Sequential Circuit. [2+3]

    Flip Flop, Combinational vs Sequential Circuits


    What is a Flip Flop? [2 marks]

    A Flip Flop is a basic bistable sequential logic circuit that can store one bit of binary information (either 0 or 1). It has two stable states and can remain in either state indefinitely until a triggering signal (clock pulse) causes it to change state.

    Key characteristics:

    • It is a memory element -- it remembers its previous output.
    • It is clock-triggered (edge or level triggered).
    • It has two outputs: Q (normal output) and Q' (complemented output).

    Common types: SR Flip Flop, D Flip Flop, JK Flip Flop, T Flip Flop.


    Difference between Combinational and Sequential Circuit [3 marks]

    FeatureCombinational CircuitSequential Circuit
    DefinitionOutput depends only on the present inputsOutput depends on present inputs AND past outputs (states)
    MemoryNo memory element is usedHas memory elements (flip flops, latches)
    FeedbackNo feedback pathFeedback path is present
    ClockDoes not require a clock signalGenerally requires a clock signal
    SpeedFaster (no clock dependency)Relatively slower
    ExamplesAdder, Subtractor, Multiplexer, Decoder, EncoderFlip Flops, Registers, Counters, Shift Registers
    DesignDesigned using logic gates onlyDesigned using logic gates plus flip flops

    Summary

    A combinational circuit is memoryless -- its output is a pure function of current inputs only. A sequential circuit has memory -- its output is a function of both current inputs and the current state (stored in flip flops), making flip flops the fundamental building block of all sequential circuits.

  9. Q9.5 marksJK flip-flop design and operationAnswer

    Realize JK flip-flop from RS flip-flop. [5]

    Realizing JK Flip-Flop from RS Flip-Flop

    Review of Both Flip-Flops

    RS Flip-Flop Truth Table

    SRQ(next)Remarks
    00QNo change
    010Reset
    101Set
    11XForbidden

    JK Flip-Flop Truth Table

    JKQ(next)Remarks
    00QNo change
    010Reset
    101Set
    11Q'Toggle

    Derivation

    The key difference is that JK = 11 toggles the output, whereas SR = 11 is forbidden.

    We need to find expressions for S and R in terms of J, K, and the current state Q.

    Mapping Table

    Compare each input combination and find required S, R inputs:

    JKQQ(next)SR
    00000X
    0011X0
    01000X
    011001
    100110
    1011X0
    110110
    111001

    S and R values are derived from the RS flip-flop excitation table (what S, R must be to achieve the required Q(next) from current Q).


    K-Map Simplification for S

    Variables: J, K, Q

    JK \ Q01
    000X
    0100
    1110
    101X

    Grouping 1s and X (don't cares):

    $$\boxed{S = J \cdot Q'}$$


    K-Map Simplification for R

    Variables: J, K, Q

    JK \ Q01
    00X0
    01X1
    1101
    1000

    Grouping 1s and X (don't cares):

    $$\boxed{R = K \cdot Q}$$


    Final Result

    The conversion equations are:

    $$S = J \cdot Q' \qquad R = K \cdot Q$$

    Logic Circuit Diagram

            +-------+
    J ------|       |
            | AND   |----> S ----+
    Q' -----|       |            |        Q
            +-------+            |   +--------+
                                 +-->|        |---> Q
            +-------+            |   | RS F/F |
    K ------|       |            +-->|        |---> Q'
            | AND   |----> R ----+   +--------+
    Q  -----|       |                    |
            +-------+                    |
                 ^                       |
                 |                       |
                 +----------- Q ---------+
    

    The current output Q is fed back: Q' feeds the S-gate and Q feeds the R-gate, eliminating the forbidden state and enabling toggle operation.


    Summary

    ConditionS = JQ'R = KQRS Behavior
    J=0, K=000No change
    J=0, K=10QReset when Q=1
    J=1, K=0Q'0Set when Q=0
    J=1, K=1Q'QEither Set or Reset (never both 1 simultaneously), achieving toggle

    This ensures SR = 11 never occurs, successfully realizing a JK flip-flop from an RS flip-flop.

  10. Q10.5 marksNumericalSerial-in serial-out shift registerAnswer

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

    Shift Register: Definition and 4-bit SISO Operation

    Given

    • Register type: 4-bit Serial-In Serial-Out (SISO)
    • Number of flip-flops: 4
    • Data input: 1011
    • Marks distribution: 1 (definition) + 4 (operation)

    No values missing. The entry convention (MSB-first vs LSB-first) is not specified; I will state the convention used explicitly.


    Solution

    Definition of Shift Register (1 mark)

    A shift register is a sequential logic circuit made of a cascade of flip-flops (usually D flip-flops) connected in series, in which the stored data bits are shifted one position from one flip-flop to the next on every clock pulse. It is used for temporary storage of data and for serial/parallel data conversion.


    4-bit SISO Shift Register (4 marks)

    Circuit Description

    Four D flip-flops are connected in cascade. The serial input feeds FF0; the output $Q$ of each flip-flop drives the $D$ input of the next; all flip-flops share a common clock. Data appears serially at $Q_3$.

    Serial                                                    Serial
    Input  -->[ FF0 ]-->[ FF1 ]-->[ FF2 ]-->[ FF3 ]--> Output
      D       Q0         Q1         Q2         Q3
                        CLK (common)
    

    Entry convention (chosen): Data 1011 is entered MSB first, so bits enter in order 1, 0, 1, 1.


    State Table (shift right, right-most bit entered first at FF0)

    Shift direction. On each clock: new bit -> Q0, old Q0 -> Q1, old Q1 -> Q2, old Q2 -> Q3, old Q3 -> out.

    ClockInput DQ0Q1Q2Q3Serial Out
    Initial--0000--
    1110000
    2001000
    3110100
    4111011

    Verification of shifting

    • Clock 1: D=1 -> Q0=1, rest 0. State = 1000 โœ“
    • Clock 2: D=0 -> Q0=0, old Q0(1)->Q1. State = 0100 โœ“
    • Clock 3: D=1 -> Q0=1, old Q0(0)->Q1, old Q1(1)->Q2. State = 1010 โœ“
    • Clock 4: D=1 -> Q0=1, old Q0(1)->Q1, old Q1(0)->Q2, old Q2(1)->Q3. State = 1101; the bit leaving Q3 is the old Q3, which is 0.

    At the end of clock 4 the register holds the whole word, because the bit entered at clock 1 has been clocked through all four stages and now sits in Q3. Shifting it back out takes three further pulses, so a full load and unload of an n = 4 stage register takes 2n - 1 = 7 clock pulses in total.

    Read-out phase (feeding 0s after loading):

    ClockInputQ0Q1Q2Q3Serial Out
    4 (loaded)11101--
    5001101 (last bit out)
    6000110
    7000011
    8000001 (first bit out)

    So after loading in 4 pulses, the data is retrieved serially over the next 4 pulses. It is worth noting that at clock 4 the bit sitting at Q3 is the LSB-side bit that was loaded first, but the systematic read-out still requires clocks 5 to 8.


    Key Characteristics

    FeatureDescription
    Data entry1 bit/clock (serial)
    Data output1 bit/clock (serial)
    Pulses to load 4 bits4
    Pulses to read 4 bits4 more
    Main useTime delay / data buffering

    Final Result

    The 4-bit SISO register loads 1011 in 4 clock pulses. Register state sequence: 0000 -> 1000 -> 0100 -> 1010 -> 1101. The stored data is then read out serially over the next 4 pulses. Note that "serial output = 1 at clock 4" is imprecise, since full retrieval needs clocks 5 to 8.

  11. Q11.5 marksShifter circuitsAnswer

    Define shifter. Design a 4-bit shifter circuit. [1+4]

    Shifter: Definition and 4-bit Design


    Definition of Shifter (1 mark)

    A shifter is a combinational logic circuit that shifts the bits of a binary input word either to the left or to the right by one or more bit positions. It can also perform logical shift, arithmetic shift, or circular (rotate) operations depending on the control inputs.


    Design of a 4-bit Shifter Circuit (4 marks)

    Overview

    A basic 4-bit combinational shifter accepts:

    • A 4-bit input: D3, D2, D1, D0 (D3 = MSB, D0 = LSB)
    • A control signal: S (shift direction)
      • S = 0 โ†’ Shift Left (each bit moves one position toward MSB; LSB filled with 0)
      • S = 1 โ†’ Shift Right (each bit moves one position toward LSB; MSB filled with 0)

    Truth Table / Operation

    SY3Y2Y1Y0Operation
    0D2D1D00Shift Left by 1
    10D3D2D1Shift Right by 1

    Boolean Expressions for Each Output

    Using a 2-to-1 MUX at each output bit:

    $$Y_3 = \bar{S} \cdot D_2 + S \cdot 0 = \bar{S} \cdot D_2$$

    $$Y_2 = \bar{S} \cdot D_1 + S \cdot D_3$$

    $$Y_1 = \bar{S} \cdot D_0 + S \cdot D_2$$

    $$Y_0 = \bar{S} \cdot 0 + S \cdot D_1 = S \cdot D_1$$


    Circuit Diagram (Gate Level)

    Each output bit is implemented using a 2-to-1 MUX (two AND gates + one OR gate):

    D3 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 AND โ”€โ”€โ”
    S  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     |
                                       OR โ”€โ”€ Y2
    Sฬ„  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     |
                                 AND โ”€โ”€โ”˜
    D1 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    
    (Similar structure for Y3, Y1, Y0)
    

    Complete structure:

             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚           4-bit Shifter                     โ”‚
             โ”‚                                             โ”‚
    D3 โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€ [AND] โ”€โ”€(SยทD3)โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Y2      โ”‚
             โ”‚       โ†‘                                     โ”‚
             โ”‚       S                                     โ”‚
             โ”‚                                             โ”‚
    D2 โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€ [AND] โ”€โ”€(Sฬ„ยทD2)โ”€โ”€[OR]โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Y3     โ”‚
             โ”‚                        โ†‘                   โ”‚
             โ”‚       0 โ”€โ”€[AND]โ”€โ”€(Sยท0)โ”€โ”˜                   โ”‚
             โ”‚                                             โ”‚
    D1 โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€ [AND] โ”€โ”€(Sฬ„ยทD1)โ”€โ”€[OR]โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Y2     โ”‚
             โ”‚                        โ†‘                   โ”‚
             โ”‚    D3โ”€โ”€[AND]โ”€โ”€(SยทD3)โ”€โ”€โ”€โ”˜                   โ”‚
             โ”‚                                             โ”‚
    D0 โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€ [AND] โ”€โ”€(Sฬ„ยทD0)โ”€โ”€[OR]โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Y1     โ”‚
             โ”‚                        โ†‘                   โ”‚
             โ”‚    D2โ”€โ”€[AND]โ”€โ”€(SยทD2)โ”€โ”€โ”€โ”˜                   โ”‚
             โ”‚                                             โ”‚
      0 โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€ [AND] โ”€โ”€(Sฬ„ยท0) โ”€โ”€[OR]โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Y0     โ”‚
             โ”‚                        โ†‘                   โ”‚
             โ”‚    D1โ”€โ”€[AND]โ”€โ”€(SยทD1)โ”€โ”€โ”€โ”˜                   โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    

    Summary Table

    OutputS=0 (Shift Left)S=1 (Shift Right)
    Y3D20
    Y2D1D3
    Y1D0D2
    Y00D1

    Key Points

    • Each output bit uses one 2-to-1 MUX controlled by S.
    • Total: 4 MUX units (each built from 2 AND gates + 1 OR gate + 1 NOT gate shared).
    • The circuit is purely combinational (no clock or memory elements).
    • The vacated bit position is filled with logic 0 (logical shift).
  12. Q12.5 marksDemultiplexer circuitsAnswer

    Write short notes on: a) De-Multiplexer b) Excitation table [0+2.5+2.5]

    A De-Multiplexer is a combinational logic circuit that takes a single input line and routes it to one of several output lines based on the selection inputs. - It is the reverse operation of a Multiplexer. - A DEMUX with n selection lines can route the input to 2โฟ output lines. - Also called a dat...