2080

BIT103 · TU past paper

Digital Logic 2080 question paper

The complete TU 2080 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. 110 marksBCD to excess-3 code converterAnswer

    Define BCD code. Design BCD to Excess-3 Code converter with truth table and logic diagram.[10]

    BCD to Excess-3 Code Converter

    Definition of BCD Code

    BCD (Binary Coded Decimal) is a binary encoding of decimal digits where each decimal digit (0-9) is represented by its 4-bit binary equivalent. Only 10 out of 16 possible 4-bit combinations (0000 to 1001) are valid; the remaining six (1010 to 1111) are invalid/don't-care states.

    DecimalBCD (8-4-2-1)
    00000
    10001
    ......
    91001

    Definition of Excess-3 Code

    Excess-3 (XS-3) is a non-weighted, self-complementing code obtained by adding 3 (0011) to each BCD digit.


    Truth Table: BCD to Excess-3

    Let BCD inputs be A, B, C, D (A = MSB, D = LSB) Let Excess-3 outputs be W, X, Y, Z (W = MSB, Z = LSB)

    DecimalABCDWXYZ
    000000011
    100010100
    200100101
    300110110
    401000111
    501011000
    601101001
    701111010
    810001011
    910011100
    10-15----XXXX

    (X = don't care)


    K-Map Simplification

    Output W (minterms: 5,6,7,8,9 + don't cares 10-15)

            CD
    AB    00  01  11  10
    00  |  0 | 0 | 0 | 0 |
    01  |  0 | 1 | 1 | 1 |
    11  |  X | X | X | X |
    10  |  1 | 1 | X | X |
    

    W = A + BC + BD


    Output X (minterms: 1,2,3,4,9 + don't cares 10-15)

            CD
    AB    00  01  11  10
    00  |  0 | 1 | 1 | 1 |
    01  |  1 | 0 | 0 | 0 |
    11  |  X | X | X | X |
    10  |  0 | 1 | X | X |
    

    X = B'C + B'D + BC'D'

    (Simplified: X = BC'D' + B'C + B'D)


    Output Y (minterms: 0,3,4,7,8 + don't cares 10-15)

            CD
    AB    00  01  11  10
    00  |  1 | 0 | 1 | 0 |
    01  |  1 | 0 | 1 | 0 |
    11  |  X | X | X | X |
    10  |  1 | 0 | X | X |
    

    Y = 1 at minterms 0, 3, 4, 7 and 8. On the map those cells fill the columns CD = 00 and CD = 11 for every value of AB, so the two groups are C'D' and CD, and the don't-care row AB = 11 is absorbed into them.

    Y = CD + C'D'

    (Y = C XNOR D = CD + C'D')


    Output Z (minterms: 0,2,4,6,8 + don't cares 10-15)

            CD
    AB    00  01  11  10
    00  |  1 | 0 | 0 | 1 |
    01  |  1 | 0 | 0 | 1 |
    11  |  X | X | X | X |
    10  |  1 | 0 | X | X |
    

    Z = D'


    Simplified Boolean Expressions

    OutputExpression
    WA + BC + BD
    XB'C + B'D + BC'D'
    YCD + C'D'
    ZD'

    Logic Diagram

    Inputs: A, B, C, D, with inverters supplying B', C' and D'
    
    W = A + BC + BD
      B ---+--[AND]--- BC ---+
      C ---+                 |
      B ---+--[AND]--- BD ---+--[OR]--- W
      D ---+                 |
      A ---------------------+
    
    X = B'C + B'D + BC'D'
      B' --+--[AND]--- B'C ---+
      C ---+                  |
      B' --+--[AND]--- B'D ---+--[OR]--- X
      D ---+                  |
      B ---+                  |
      C' --+--[AND]-- BC'D' --+
      D' --+
    
    Y = CD + C'D'
      C ---+--[AND]--- CD ----+
      D ---+                  +--[OR]--- Y
      C' --+--[AND]--- C'D' --+
      D' --+
    
    Z = D'
      D -------[NOT]--------- Z
    

    Only two-level AND-OR logic is needed for each output, and the inverters that produce B', C' and D' are shared across all four output networks. Y is the XNOR of C and D, so a single XNOR gate can replace its two AND gates and the OR gate.

  2. 210 marksCombinational circuit design methodologyAnswer

    Define combinational logic circuit. Design a combinational circuit whose input is a four-bit number and output is the 1's complement of the input number.[10]

    Combinational Logic Circuit and 1's Complement Design

    Definition of Combinational Logic Circuit (2 marks)

    A combinational logic circuit is a digital circuit in which the output at any instant of time depends only on the present input values and not on any previous inputs or outputs. There is no memory element involved; the circuit has no feedback path.

    Key characteristics:

    • Output is a pure function of current inputs only
    • No clock signal or storage elements (flip-flops) are used
    • Examples: Adder, Subtractor, Multiplexer, Encoder, Decoder

    General model: n input variables produce m output variables through a network of logic gates.


    Design of 1's Complement Combinational Circuit (8 marks)

    Step 1: Problem Statement

    • Input: A 4-bit binary number: A, B, C, D (where A is MSB, D is LSB)
    • Output: 1's complement of the input: W, X, Y, Z

    The 1's complement of a binary number is obtained by inverting (complementing) each bit individually.

    Input BitOutput Bit
    AW = A'
    BX = B'
    CY = C'
    DZ = D'

    Step 2: Truth Table

    ABCDW (A')X (B')Y (C')Z (D')
    00001111
    00011110
    00101101
    00111100
    01001011
    01011010
    01101001
    01111000
    10000111
    10010110
    10100101
    10110100
    11000011
    11010010
    11100001
    11110000

    Step 3: Boolean Expressions

    From the truth table, the output functions are simply:

    $$W = A'$$ $$X = B'$$ $$Y = C'$$ $$Z = D'$$

    Each output is the complement (NOT) of the corresponding input bit.


    Step 4: Logic Diagram

    The circuit requires four NOT gates (inverters), one for each input bit:

    A ----[NOT]---- W (A')
    
    B ----[NOT]---- X (B')
    
    C ----[NOT]---- Y (C')
    
    D ----[NOT]---- Z (D')
    

    Circuit Diagram:

            +-------+
    A ----->|  NOT  |-----> W = A'
            +-------+
    
            +-------+
    B ----->|  NOT  |-----> X = B'
            +-------+
    
            +-------+
    C ----->|  NOT  |-----> Y = C'
            +-------+
    
            +-------+
    D ----->|  NOT  |-----> Z = D'
            +-------+
    

    Step 5: Verification with Example

    Example: Input = 1010 (decimal 10)

    BitInputOutput (1's complement)
    A1W = 0
    B0X = 1
    C1Y = 0
    D0Z = 1

    Output = 0101 which is indeed the 1's complement of 1010. ✓


    Summary

    FeatureDescription
    Number of inputs4 (A, B, C, D)
    Number of outputs4 (W, X, Y, Z)
    Gates required4 NOT gates
    Boolean functionsW=A', X=B', Y=C', Z=D'
    Circuit typeCombinational (no memory, no feedback)

    Conclusion: The 1's complement of a 4-bit number is the simplest combinational circuit, requiring only four inverters, since each output bit is the logical complement of the corresponding input bit.

  3. 310 marksCounter design using flip-flopsAnswer

    Define parallel counter. Design MOD-12 synchronous up counter along with state diagram, timing sequence and timing diagram.[10]

    Parallel (Synchronous) Counter and MOD-12 Design


    Definition of Parallel (Synchronous) Counter

    A parallel counter (also called a synchronous counter) is a sequential digital circuit in which all flip-flops receive the clock pulse simultaneously. Unlike ripple (asynchronous) counters where each flip-flop triggers the next, in a synchronous counter the clock is applied in parallel to all flip-flops at the same time.

    Key features:

    • All flip-flops are clocked simultaneously
    • No propagation delay accumulation (faster operation)
    • Uses combinational logic (AND gates) to control flip-flop inputs
    • Suitable for high-speed applications

    MOD-12 Synchronous Up Counter Design

    A MOD-12 counter counts from 0 to 11 (0000 to 1011 in binary) and then resets to 0. It requires 4 flip-flops (since 2^4 = 16 > 12).


    Step 1: State Diagram

      0000 → 0001 → 0010 → 0011 → 0100 → 0101
        ↑                                      ↓
      1011 ← 1010 ← 1001 ← 1000 ← 0111 ← 0110
    

    States: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 → back to 0


    Step 2: State Table

    We use JK Flip-Flops (Q3 = MSB, Q0 = LSB).

    StateQ3Q2Q1Q0Next Q3Next Q2Next Q1Next Q0
    000000001
    100010010
    200100011
    300110100
    401000101
    501010110
    601100111
    701111000
    810001001
    910011010
    1010101011
    1110110000

    Step 3: JK Flip-Flop Excitation Table

    Recall JK excitation:

    Q(t)Q(t+1)JK
    000X
    011X
    10X1
    11X0

    Step 4: JK Input Table

    StateQ3Q2Q1Q0J3K3J2K2J1K1J0K0
    000000X0X0X1X
    100010X0X1XX1
    200100X0XX01X
    300110X1XX1X1
    401000XX00X1X
    501010XX01XX1
    601100XX0X01X
    701111XX1X1X1
    81000X00X0X1X
    91001X00X1XX1
    101010X00XX01X
    111011X10XX1X1

    States 1100 to 1111 never occur, so their entries are treated as don't-care conditions when the maps are simplified.


    Simplified Flip-Flop Input Equations

    Reading each column of the input table against the present state gives:

    $$J_0 = K_0 = 1$$

    $$J_1 = K_1 = Q_0$$

    $$J_2 = \overline{Q_3} \cdot Q_1 \cdot Q_0 \qquad K_2 = Q_1 \cdot Q_0$$

    $$J_3 = Q_2 \cdot Q_1 \cdot Q_0 \qquad K_3 = Q_1 \cdot Q_0$$

    The least significant stage toggles on every pulse, so its inputs are tied to logic 1. Q1 toggles whenever Q0 is high. Q2 is set only at state 0011 and cleared only at state 0111, and the factor Q̄3 is essential: without it the counter would set Q2 while leaving state 1011 and would run to MOD-16. Q3 is set on leaving 0111 and cleared on leaving 1011, which is what folds the count back to zero after 11 and makes the modulus 12.


    Logic Circuit

       +---+                                                     
       | 1 |----> J0, K0
       +---+
                    Q0 -------------------> J1, K1
    
                    Q1 ---+
                          +--[AND]--+------> K2  and  K3
                    Q0 ---+         |
                                    +--[AND with Q3']--> J2
                                    |
                                    +--[AND with Q2 ]--> J3
    
            +-------+   +-------+   +-------+   +-------+
       J0 ->|       |   |       |   |       |   |       |
            |  FF0  |   |  FF1  |   |  FF2  |   |  FF3  |
       K0 ->|       |   |       |   |       |   |       |
            +---+---+   +---+---+   +---+---+   +---+---+
                |           |           |           |
                Q0          Q1          Q2          Q3
                |           |           |           |
       CLK -----+-----------+-----------+-----------+
                (one common clock to all four flip-flops)
    

    All four flip-flops share one clock line, and only two AND gates plus one inverter are needed to build the input logic, since the term Q₁·Q₀ is reused by K₂ and K₃.


    Timing Sequence

    Clock pulseQ₃Q₂Q₁Q₀Count
    initial00000
    100011
    200102
    300113
    401004
    501015
    601106
    701117
    810008
    910019
    10101010
    11101111
    1200000 (recycles)

    Timing Diagram

    Pulse     1    2    3    4    5    6    7    8    9   10   11   12
            __   __   __   __   __   __   __   __   __   __   __   __
    CLK   _|  |_|  |_|  |_|  |_|  |_|  |_|  |_|  |_|  |_|  |_|  |_|  |_
    
    Q0    ‾‾‾‾‾_____‾‾‾‾‾_____‾‾‾‾‾_____‾‾‾‾‾_____‾‾‾‾‾_____‾‾‾‾‾_____
    
    Q1    _____‾‾‾‾‾‾‾‾‾‾__________‾‾‾‾‾‾‾‾‾‾__________‾‾‾‾‾‾‾‾‾‾_____
    
    Q2    _______________‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾_______________________
    
    Q3    _______________________________________‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾_____
    

    Q₀ divides the clock by two, Q₁ by four and Q₂ by eight for as long as the count is below 8, while Q₃ stays high through counts 8 to 11 and falls on the twelfth pulse. The Q₃ waveform therefore has a period of twelve clock pulses, which confirms the modulus.


    Conclusion

    A parallel counter clocks all its flip-flops together, so its maximum speed is set by one flip-flop delay plus one gate delay rather than by the sum of the delays in the chain. The MOD-12 design above uses four JK flip-flops with $J_0 = K_0 = 1$, $J_1 = K_1 = Q_0$, $J_2 = \overline{Q_3}Q_1Q_0$, $K_2 = Q_1Q_0$, $J_3 = Q_2Q_1Q_0$ and $K_3 = Q_1Q_0$, which produces the repeating sequence 0 to 11 and returns to 0000 on the twelfth clock pulse.

  4. 45 marksNAND and NOR gate realizationAnswer

    Why NAND and NOR gates are called Universal logic gates? Realize NOR as Universal logic gates. [5]

    NAND and NOR gates are called universal logic gates because any Boolean function or logic circuit can be implemented using only NAND gates or only NOR gates, without needing any other type of gate (AND, OR, NOT). In other words, the thre...

  5. 55 marksNumericalKarnaugh map simplificationAnswer

    Simplify: F = X Y Z' + X Z' + X' Y + X'' Y Z' using K-Map in both SOP and POS. [5]

    Function of three variables $X, Y, Z$: $$F = XYZ' + XZ' + X'Y + X''YZ'$$ Note $X'' = X$ (double complement), so: $$F = XYZ' + XZ' + X'Y + XYZ'$$ Expand each term over minterms $m(X,Y,Z)$: - $XYZ'$: $X=1,Y=1,Z=0 \Rightarrow m6$ - $XZ'$:

  6. 65 marksNumericalFunction implementation using ROMAnswer

    Define PLDs. Implement the given functions with ROM. F1 = (Σ(0,1,2)(\Sigma(0,1,2)(Σ(0,1,2), F2 = Σ(0,2,3)\Sigma(0,2,3)Σ(0,2,3) [5]

    • Function 1: $F1 = \Sigma(0, 1, 2)$ - Function 2: $F2 = \Sigma(0, 2, 3)$ - Maximum minterm index = 3, so minterms range $0$ to $3$ - Number of input variables $n$: since $2^n = 4$, we get $n = 2$ (call them $A, B$) - Number of output fu...
  7. 75 marksMaster-slave JK flip-flopAnswer

    Describe the clocked master-slave J-K flip-flop with its operation table. [5]

    A Master-Slave J-K flip-flop is a cascaded combination of two clocked SR flip-flops (or J-K stages) connected in series, designed to eliminate the race-around condition (indeterminate state) that occurs in a simple clocked J-K flip-flop ...

  8. 85 marksSR latch and clocked RS flip-flopAnswer

    What is forbidden state in SR flip flop? Convert SR to JK flip flop. [5]

    In an SR (Set-Reset) flip-flop, the inputs S and R must not be applied simultaneously as logic 1. When S = 1 and R = 1 at the same time, the output becomes indeterminate (unpredictable): both Q and Q' try to become 1 simultaneously, whic...

  9. 95 marksRing counter and Johnson counterAnswer

    Differentiate between ring counter and Johnson counter. [5]

    --- A ring counter is a shift register with the output of the last flip-flop connected directly (straight connection) back to the input of the first flip-flop. - Only one flip-flop is HIGH (1) at any given time; all others are LOW (0). -...

  10. 105 marksNumericalParallel-in parallel-out shift registerAnswer

    Explain the operation of 4-bit Parallel-In parallel-Out Shift register with data input 1010. [5]

    • Register type: 4-bit PIPO - Data input to load: $1010$ - Interpreting bits (MSB to LSB): $D3=1,\ D2=0,\ D1=1,\ D0=0$ --- A Parallel-In Parallel-Out (PIPO) shift register loads all data bits at the same time (parallel input) and makes a...
  11. 115 marksParity generator and checkerAnswer

    Write short notes on: (Any two) a.) ASCII Code b.)Logic micro operation c.) State table [5]

    --- ASCII stands for American Standard Code for Information Interchange. - It is a 7-bit character encoding standard used to represent text in computers and communication devices. - A 7-bit ASCII code can represent 2⁷ = 128 different cha...

  12. 125 marksNumericalBinary decimal octal hexadecimal conversioAnswer

    Convert $(591.62)_{10}$ into hexadecimal and octal number system. [5]

    • Decimal number: $(591.62){10}$ - Target bases: 16 (hex) and 8 (octal) --- Division Quotient Remainder Digit -------------------------------------- 591 ÷ 16 36 15 F 36 ÷ 16 2 4 4 2 ÷ 16 0 2 2 Reading bottom to top: