Blog
Digital Logic Design BS Mid Past Paper Fall 2013 – UOS Main Campus
University of Sargodha main campus Digital Logic Design mid-term examination for the BS program, Fall semester 2013 (20 marks, 60 minutes). Retyped from the original paper, with solved answers below.
Solved answers
Q1 – Single-bit error detection for 4-bit messages (8)
Use a parity bit. Since only one bit can be wrong, a single (even) parity bit is enough to detect it.
- Generator (sender): P = D₃ ⊕ D₂ ⊕ D₁ ⊕ D₀ — three 2-input XOR gates. The 5-bit message D₃D₂D₁D₀P always has an even number of 1s.
- Checker (receiver): E = D₃ ⊕ D₂ ⊕ D₁ ⊕ D₀ ⊕ P — four 2-input XOR gates in a chain or tree. E = 0 means no error; E = 1 means a single-bit error (the output can drive an alarm lamp for the crew).
Example: data 1011 → P = 1 → sent 10111. If it arrives as 10011, E = 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 1 = 1 → error detected.
Q2 – BCD to 8, 4, −2, −1 code converter (8)
| Decimal | BCD (A B C D) | 8 4 −2 −1 (w x y z) |
|---|---|---|
| 0 | 0000 | 0000 |
| 1 | 0001 | 0111 |
| 2 | 0010 | 0110 |
| 3 | 0011 | 0101 |
| 4 | 0100 | 0100 |
| 5 | 0101 | 1011 |
| 6 | 0110 | 1010 |
| 7 | 0111 | 1001 |
| 8 | 1000 | 1000 |
| 9 | 1001 | 1111 |
Inputs 1010–1111 are don’t cares. K-map results:
- w = A + BC + BD
- x = B’C + B’D + BC’D’
- y = C ⊕ D
- z = D
Check: BCD 0101 (5) → w = 1, x = 0, y = 1, z = 1 → 1011 = 8 − 2 − 1 = 5 ✓. Draw the circuit with AND gates for each product term, OR gates for w and x, one XOR gate for y, and a wire for z.
Q3 – Minimize (4)
a) x’ + xy + xz’ + xy’z’ → x’ + xy = x’ + y; x’ + xz’ = x’ + z’; xy’z’ is covered by z’. Result: x’ + y + z’ (3 literals).
b) x’y + xy’ + xyz’ + x’y’z → minterms 1, 2, 3, 4, 5, 6 (everything except 000 and 111). Result: xy’ + yz’ + x’z (an equally minimal form is x’y + y’z + xz’).
