DLD - Digital Logic Design, Past Papers, UOS Main Campus

Digital Logic and Design Past Paper 2015 – BS IT 2nd Term UOS (CMP-2210)

ProgramBS IT
Term2nd
Year2015
Course codeCMP-2210
AnswersSolved ✓

University of Sargodha BS IT 2nd term Digital Logic & Design (CMP-2210) paper, 2015 exam (80 marks, 2:30 hours). The paper is retyped below without the handwritten ticks, followed by solved answers for all 16 short questions and all six subjective questions: demultiplexer/decoder, a NOR-only circuit, the tabulation method, BCD to 8 4 −2 −1 conversion, the full subtractor and a K-map. All Boolean results were checked with SymPy.

Solved answers

Q1 – Short answers (16 × 2)

1. 6006 in 8 4 −2 −1 code. Each decimal digit is coded separately: 6 = 8 − 2 → 1010, 0 → 0000. So 6006 = 1010 0000 0000 1010.

2. When tabulation is better than K-map. When there are more than 4–5 variables (K-maps become hard to draw and read), when a systematic, computer-programmable method is needed, and when all prime implicants must be found reliably (Quine-McCluskey method).

3. To Excess-5. Excess-5 = value + 5 (0101). i) 1010 (10) + 0101 = 1111; ii) 0110 (6) + 0101 = 1011.

4. (x + y)(x + y). = x + yy (distributive law) = x + 0 = x (one literal).

5. 2’s complement of 10111000101. 1’s complement: 01000111010; add 1: 01000111011.

6. Gate implementation. F = A·(B+C)·(D+E) = A + (B + C) + (D + E) = A + B + C + D + E (De Morgan). Implementation: an inverter on A, two OR gates for (B + C) and (D + E), and a final OR gate combining A, (B + C) and (D + E). (Equivalently, an AND gate fed by A, (B+C), (D+E) followed by an inverter.)

7. POS of Π(0,1,2,3,4,6,8,9,10,11,12,15). F is 1 only at minterms 5, 7, 13, 14. Minimised POS: F = B (A + D)(C + D)(A + C + D) (checked with SymPy).

8. (x + y) = xy by truth table.

xyx+yx+yxyxy
0001111
0110100
1010010
1110000
Columns 4 and 7 are identical – De Morgan’s theorem is proved.

9. SR latch with NAND gates. Two cross-coupled NAND gates; inputs are active-low S and R. Q = NAND(S, Q), Q = NAND(R, Q). S = 0 sets Q = 1, R = 0 resets Q = 0, both 1 = hold, both 0 = invalid.

S' ---|NAND|---+---- Q
   +--|    |   |
   |          \/
   |          /\
   +--|    |   |
R' ---|NAND|---+---- Q' 

10. Simplify A·B·D + A·B·D. = AB(D + D) = AB.

11. (777)8 to hex. 7778 = 111 111 1112 = 1 1111 1111 = (1FF)16 (= 511 decimal).

12. Negative-NAND gate. An OR gate with inverted (bubbled) inputs: A + B = AB. By De Morgan it is equivalent to a NAND gate; output is 1 when any input is 0.

13. Half subtractor. Difference D = A ⊕ B, Borrow Bo = AB. Logic: one XOR gate for D and an AND gate with A inverted for borrow.

ABDBo
0000
0111
1010
1100

14. (101101)10 to binary. 101101 (decimal) = 110001010111011012 (= 65536 + 32768 + 2048 + 512 + 256 + 64 + 32 + 8 + 4 + 1).

15. XNOR as a comparator. XNOR output = 1 when both inputs are equal (00 or 11) and 0 when they differ, so it acts as a 1-bit equality comparator; ANDing XNOR outputs of each bit pair compares multi-bit numbers.

16. Encoder. A combinational circuit with 2n input lines and n output lines that outputs the binary code of the active input, e.g. 8-to-3 (octal-to-binary) encoder; a priority encoder handles several active inputs.

Q2 – Demultiplexer and 2-to-4 decoder with enable

A demultiplexer (DEMUX) takes one input line and sends it to one of 2n output lines selected by n select lines (one-to-many). A decoder with an enable input works as a demultiplexer: the enable E is the data input and the decoder inputs are the select lines.

2-to-4 decoder with enable: outputs D0 = E·A·B, D1 = E·A·B, D2 = E·A·B, D3 = E·A·B.

EABD0D1D2D3
0××0000
1001000
1010100
1100010
1110001
          +---------------+
  A ----->|               |---> D0
  B ----->|  2-to-4 line  |---> D1
          |   decoder     |---> D2
  E ----->| (enable/data) |---> D3
          +---------------+
(As a 1-to-4 DEMUX: E = data input, A B = select lines)

Q3 – F = A(B + CD) + BC + BC with NOR gates

Simplify first: BC + BC = B; AB is absorbed by B. So F = B + ACD (checked with SymPy).

Write ACD = A + C + D (a NOR of A, C and D).

  1. NOR1 (used as inverter): D = NOR(D, D).
  2. NOR2: X = NOR(A, C, D) = ACD.
  3. NOR3: Y = NOR(B, X) = B + X.
  4. NOR4 (inverter): F = NOR(Y, Y) = B + X.

So four NOR gates implement F = B + ACD.

Q4 – Tabulation (Quine-McCluskey) method

The tabulation method groups minterms by the number of 1s, repeatedly combines terms that differ in one bit to find all prime implicants, and then uses a prime-implicant chart to choose a minimum cover. It is systematic and suitable for computers and many variables.

F(A,B,C,D) = Σ(0, 1, 2, 4, 6, 8, 9, 10, 11, 14, 15).

Group (no. of 1s)MintermsFirst combinationSecond combination
00 (0000)0,1 (000−) ✓; 0,2 (00−0) ✓; 0,4 (0−00) ✓; 0,8 (−000) ✓0,2,4,6 (0−−0); 0,1,8,9 (−00−); 0,2,8,10 (−0−0)
11, 2, 4, 81,9; 2,6; 2,10; 4,6; 8,9; 8,10 ✓2,6,10,14 (−−10); 8,9,10,11 (10−−)
26, 9, 106,14; 9,11; 10,11; 10,14 ✓10,11,14,15 (1−1−)
311, 1411,15; 14,15 ✓
415

Prime implicants: AD (0,2,4,6), BC (0,1,8,9), BD (0,2,8,10), CD (2,6,10,14), AB (8,9,10,11), AC (10,11,14,15).

Essential PIs: AD (only one covering 4), BC (only one covering 1), AC (only one covering 15). Together they cover 0,1,2,4,6,8,9,10,11,14,15 – all minterms.

F = AD + BC + AC (verified with SymPy).

Q5 – BCD to 8, 4, −2, −1 code converter

DecimalBCD A B C D8 4 −2 −1: w x y z
000000000
100010111
200100110
300110101
401000100
501011011
601101010
701111001
810001000
910011111

Inputs 1010–1111 are invalid BCD and are used as don’t-cares (minterms 10–15). Mapping each output on a 4-variable K-map:

  • w = Σ(5,6,7,8,9) + d(10–15) → w = A + BC + BD
  • x = Σ(1,2,3,4,9) + d → x = BC + BD + BCD
  • y = Σ(1,2,5,6,9) + d → y = CD + CD = C ⊕ D
  • z = Σ(1,3,5,7,9) + d → z = D

(All four expressions were minimised with SymPy using the don’t-cares.)

Q6 – Full subtractor

A full subtractor subtracts two bits A − B and a borrow-in Bin from the previous stage, giving Difference D and Borrow-out Bout.

ABBinDBout
00000
00111
01011
01101
10010
10100
11000
11111

K-maps give D = A ⊕ B ⊕ Bin and Bout = AB + ABin + B·Bin.

Using two half subtractors and an OR gate: HS1 subtracts A − B: D1 = A ⊕ B, B1 = AB. HS2 subtracts D1 − Bin: D = D1 ⊕ Bin, B2 = D1Bin. Then Bout = B1 + B2 (OR gate).

A ---+-----+            +-----+
     | HS1 |-- D1 ------>| HS2 |------> D
B ---+-----+            |     |
        | B1     Bin --->+-----+
        |                   | B2
        +------>[ OR ]<-----+------> Bout

Q7 – Karnaugh map

A Karnaugh map is a grid of 2n cells, arranged in Gray code so adjacent cells differ by one variable. Groups of 1, 2, 4, 8 adjacent 1s (wrapping around edges) give simplified product terms.

F(w,x,y,z) = Σ(0,1,2,4,5,6,8,9,12,13,14).

wx \ yz00011110
001 (0)1 (1)0 (3)1 (2)
011 (4)1 (5)0 (7)1 (6)
111 (12)1 (13)0 (15)1 (14)
101 (8)1 (9)0 (11)0 (10)
  • Columns yz = 00 and 01 (8 cells) → y
  • Cells 0, 2, 4, 6 (w = 0, z = 0) → wz
  • Cells 4, 6, 12, 14 (x = 1, z = 0) → xz

F = y + wz + xz (verified with SymPy).

Save this paper for offline studyDownload the question paper, or save the paper together with all solved answers as a PDF.
↓ Download Paper (JPG)
Have another year of DLD - Digital Logic Design?

Upload a photo in 10 seconds — no form to fill. We clean it, solve it and credit you.

Missing years for this subject
202420232022

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.