Unit-1: Digital Logic — STET Computer Science
Unit-1: ■■■■■■ ■■■■■ — STET ■■■■■■■■ ■■■■■ (Bilingual Notes)
These notes are concise, exam-oriented and bilingual (English + Hindi). They cover number
systems, codes, Boolean algebra, logic gates, K-maps, combinational & sequential circuits,
memory types, A/D-D/A and practice MCQs. ■■ ■■■■■ ■■■■■■■-■■■■■■ ■■ ■■■■■■■■ ■■■■ ■■■■■ ■■■
■■■■■■, ■■■, ■■■■■■ ■■■■■■■, ■■■■■ ■■■■■, K-■■■, ■■■■■■■■■■ ■ ■■■■■■■■■■■ ■■■■■■, ■
A/D-D/A ■■ ■■■■■■ MCQ ■■■■■ ■■■■
• Number systems / ■■■■■■ ■■■■■■■ — Binary, Octal, Decimal, Hexadecimal; conversions;
complements; signed representation
• Codes / ■■■ — BCD, Excess-3, Gray, ASCII (concept)
• Boolean Algebra / ■■■■■■ ■■■■■■■ — Laws, De Morgan, simplification, SOP/POS
• Logic Gates / ■■■■■ ■■■■■ — AND, OR, NOT, NAND, NOR, XOR, XNOR (truth tables)
• Karnaugh Map / K-■■■ — Grouping, don’t-cares, 2-4 variable maps
• Combinational Circuits / ■■■■■■ ■■■■■■ — Adders, MUX/DEMUX, Encoder/Decoder, Parity
• Sequential Circuits / ■■■■■■■■■ ■■■■■■ — SR, D, JK, T flip-flops; counters; registers
• Memory & PLD / ■■■■■■ ■■ PLD — RAM, ROM, EPROM, EEPROM, PLA, PLD
• A/D & D/A / A/D ■■ D/A — R-2R ladder, Flash ADC, SAR, Dual-slope
Digital Logic — Key Concepts / ■■■■■ ■■■■■■■■■
Decimal ↔ Binary: Repeated division (decimal→binary) and positional sum (binary→decimal). Binary
↔ Hex: Group bits in 4's. Binary ↔ Octal: Group bits in 3's. 1's complement: flip bits. 2's
complement: flip bits + 1. Range for n-bit 2's complement: −2^(n-1) to 2^(n-1)-1. ■■■■■■■■■ ■■■
■■■■■■■■■■ ■■ ■■■ ■■■-■■■ ■■■ ■■■■ ■■ ■■■■■■■■■ ■■■■ ■■■■■■ ■■ ■■■■■■ ■■■■■ 1 ■■ ■
■■■■■, 2 ■■ ■■■■ = 1 ■■ ■■■■ + 1■
Boolean Laws (cheat-sheet): Commutative, Associative, Distributive, Identity, Null, Complement,
De Morgan's laws, Absorption, Consensus. Useful forms: SOP (sum of products), POS (product of
sums).
Karnaugh Map: Draw 2x4 (3-var) or 4x4 (4-var) grid using Gray order. Group adjacent 1's in
powers of two. Use don't-care to expand groups. K-map example (3-var) grouping of m1,m3,m5,m7
forms a group-of-4 which reduces variables.
mbinational & Sequential Circuits / ■■■■■■ ■■ ■■■■■■■■■ ■■■■
Half adder: Sum = A ⊕ B, Carry = A·B. Full adder: Sum = A ⊕ B ⊕ Cin, Cout = AB + BCin + ACin.
Multiplexer: Selects one input by select lines. Decoder: n to 2^n outputs. Flip-flops: SR
(latch), D (data), JK (toggle when J=K=1), T (toggle when T=1). Design counters by creating
state table, excitation table and simplifying inputs.
Cheat Sheet — Quick Reference / ■■■
Quick Items: 1) 2's complement negative: invert + 1. 2) De Morgan: (AB)'=A'+B',
(A+B)'=A'B'. 3) K-map grouping: sizes 1,2,4,8... wrap allowed. 4) Universal gates:
NAND, NOR. 5) Full adder: Sum = A⊕B⊕Cin; Cout = AB + BCin + ACin.
ice MCQs (50) — Answers at end / ■■■■■■ MCQ (50) — ■■■■■ ■■■
1. 1. Which code has only one-bit change between consecutive numbers?
Ans: Gray code / ■■■■ ■■■ 23. 23. Which is faster: Flash ADC or SAR ADC?
Ans: Flash ADC
2. 2. 2's complement of 0101 is?
Ans: 1011 24. 24. Universal gates allow building any logic. Example?
Ans: NAND-only implementation
3. 3. Full adder has how many inputs?
Ans: 3 (A,B,Cin) / ■■■ 25. 25. Complement of (A+B)' by De Morgan?
Ans: A'B' (explain)
4. 4. XOR output is 1 when?
Ans: Odd number of 1s / ■■■■ 1 26. 26. What is SOP form?
Ans: OR of AND terms
5. 5. NAND is universal. True/False?
Ans: True / ■■■ 27. 27. What is POS form?
Ans: AND of OR terms
6. 6. Decimal 25 to binary?
Ans: 11001 28. 28. How many outputs for 3-to-8 decoder?
Ans: 8
7. 7. Binary 1010 to hex?
Ans: A 29. 29. Which gate is used in parity generation?
Ans: XOR
8. 8. A 4-to-1 MUX needs how many select lines?
Ans: 2 30. 30. What is propagation delay concern in ripple adder?
Ans: Carry propagation delay
9. 9. In K-map grouping, groups must be powers of two. True/False?
Ans: True 31. 31. What is the Boolean expression for XNOR?
Ans: (A⊕B)' or A·B + A'·B'
10. 10. Half adder carry expression?
Ans: A·B 32. 32. What is meant by 'don't care' in K-map?
Ans: Use to simplify groups / ■■■■■■■ ■■ ■■■ X
11. 11. A NOR gate is the complement of which?
Ans: OR 33. 33. Which family has lowest power?
Ans: CMOS
12. 12. 1's complement of 1001?
Ans: 0110 34. 34. What does 'minterm' mean?
Ans: Product term with all variables
13. 13. Range of 4-bit 2's complement?
Ans: -8 to +7 / -8 ■■ +7 35. 35. For 4-bit adder, max sum bits?
Ans: 5 bits (including final carry)
14. 14. Which flip-flop toggles when T=1?
Ans: T flip-flop 36. 36. What does 'MSB' stand for?
Ans: Most Significant Bit
15. 15. Full adder Cout expression?
Ans: AB + BCin + ACin 37. 37. Which flip-flop is edge triggered and stores D?
Ans: D Flip-Flop
16. 16. BCD for decimal 9?
Ans: 1001 38. 38. How many comparators in an n-bit flash ADC?
Ans: 2^n - 1
17. 17. Excess-3 of decimal 2?
Ans: 0101 39. 39. What is the simplifying result of A + A·B?
Ans: A (Absorption)
18. 18. How many minterms for 3 variables?
Ans: 8 40. 40. Which is true: (A·B)' = A' + B'?
Ans: True (De Morgan)
19. 19. What is a don’t-care?
Ans: Input combinations irrelevant / ■■■■■■■■■■ ■■■■■■■■■
41. 41. What is the output of XNOR for inputs (1,0)?
Ans: 0
20. 20. What does EEPROM stand for?
Ans: Electrically Erasable Programmable Read-Only Memory 42. 42. What do PLA and PLD stand for?
Ans: Programmable Logic Array / Programmable Logic Device
21. 21. Binary addition: 1011 + 0011 = ?
Ans: 1110 43. 43. What is the main use of ROM?
Ans: Store firmware / non-volatile storage
22. 22. Gray to binary: Gray 1110 -> binary?
Ans: 1011 (example from notes) 44. 44. What is a ripple counter?
Ans: Asynchronous counter where flip-flop output clocks next stage
Practice MCQs — Continued
45. 45. Which operation is easier in 2's complement?
Ans: Subtraction via addition
46. 46. What is the parity bit for 1011 (even parity)?
Ans: 1 (since three 1s -> parity 1 makes total 4)
47. 47. What is the dual of A + (B·C)?
Ans: A·(B + C) (dual by interchanging + and ·)
48. 48. What is Booth's algorithm used for?
Ans: Multiplication of signed integers
49. 49. What is characteristic equation of JK?
Ans: Q_next = J·Q' + Q·K'
50. 50. What is the binary for decimal 0x2F?
Ans: 0010 1111 / 47 decimal
Answer Key — MCQs / ■■■■■ ■■■■■
1. Gray code / ■■■■ ■■■
2. 1011
3. 3 (A,B,Cin) / ■■■
4. Odd number of 1s / ■■■■ 1
5. True / ■■■
6. 11001
7. A
8. 2
9. True
10. A·B
11. OR
12. 0110
13. -8 to +7 / -8 ■■ +7
14. T flip-flop
15. AB + BCin + ACin
16. 1001
17. 0101
18. 8
19. Input combinations irrelevant / ■■■■■■■■■■ ■■■■■■■■■
20. Electrically Erasable Programmable Read-Only Memory
21. 1110
22. 1011 (example from notes)
23. Flash ADC
24. NAND-only implementation
25. A'B' (explain)
26. OR of AND terms
27. AND of OR terms
28. 8
29. XOR
30. Carry propagation delay
31. (A⊕B)' or A·B + A'·B'
32. Use to simplify groups / ■■■■■■■ ■■ ■■■ X
33. CMOS
34. Product term with all variables
35. 5 bits (including final carry)
36. Most Significant Bit
37. D Flip-Flop
38. 2^n - 1
39. A (Absorption)
40. True (De Morgan)
41. 0
42. Programmable Logic Array / Programmable Logic Device
43. Store firmware / non-volatile storage
44. Asynchronous counter where flip-flop output clocks next stage
45. Subtraction via addition
46. 1 (since three 1s -> parity 1 makes total 4)
47. A·(B + C) (dual by interchanging + and ·)
48. Multiplication of signed integers
49. Q_next = J·Q' + Q·K'
50. 0010 1111 / 47 decimal