Getting ready for the midterm of CS302 (Digital Logic Design)? Here is everything in one place: solved MCQs, subjective questions with answers and short notes and key terms, gathered from past papers and files shared by students. No duplicates and all the answers are checked and verified. Use the tabs above to switch between Objective, Subjective and Short Notes & Key Terms, and tap Show answer only after you have tried the question yourself. Best of luck with your exam!
Part 1: Objective (MCQs)
Q1. The caveman number system is a Base ______ number system.
- 2
- 5
- 10
- 16
Show answer
Answer: (b) 5
Q2. The first least significant digit in the decimal number system has
- position 0 and weight equal to 1
- position 1 and weight equal to 0
- position 1 and weight equal to 10
- position 0 and weight equal to 10
Show answer
Answer: (a) position 0 and weight equal to 1
Q3. In the binary number "10011" the weight of the most significant digit is ____
- 2^4 (2 raise to power 4)
- 2^3 (2 raise to power 3)
- 2^0 (2 raise to power 0)
- 2^1 (2 raise to power 1)
Show answer
Answer: (a) 2^4 (2 raise to power 4)
Q4. In the binary number "1100.111", the first bit to the right of the binary point has the weight
- 1/2 (1 divided by 2)
- 1/4 (1 divided by 4)
- 0
- 1
Show answer
Answer: (a) 1/2 (1 divided by 2)
Why: No answer key was marked on the source screenshot; 1/2 (2^-1) follows directly from the positional weights.
Q5. The Unsigned Binary representation can only represent positive binary numbers.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q6. The binary value "1010110" is equivalent to decimal __________
- 86
- 87
- 88
- 89
Show answer
Answer: (a) 86
Q7. The decimal equivalent of the binary number "10011" is
- 19
- 99
- 29
- None of the given options
Show answer
Answer: (a) 19
Q8. The binary value "11011" is equivalent to the hexadecimal number __________
- 1B
- 1C
- 1D
- 1E
Show answer
Answer: (a) 1B
Q9. Sum-of-Weights method is used __________
- to convert from one number system to other
- to encode data
- to decode data
- to convert from serial to parallel data
Show answer
Answer: (a) to convert from one number system to other
Q10. In the Repeated-Division method, the decimal number to be converted is divided by the ______.
- Minimum range value of target number system
- 2
- Base number
- Maximum range value of target number system
Show answer
Answer: (c) Base number
Q11. The maximum digit that can be used in the unsigned octal system is _______
- 1
- 7
- 9
- 16
Show answer
Answer: (b) 7
Why: One source key marks option (a) 1, which is wrong. Octal digits run from 0 to 7.
Q12. Adding the two octal numbers "36" and "71" results in ________
- 213
- 127
- 345
- 123
Show answer
Answer: (b) 127
Why: 6+1 = 7; 3+7 = 12 (octal) = write 2, carry 1; so the sum is 127 in octal.
Q13. Which of the following is the hexadecimal equivalent of 28?
- 1A
- 1C
- 1D
- 1B
Show answer
Answer: (b) 1C
Q14. Which of the numbers is not a valid hexadecimal number?
- 1234
- ABCD
- 1001
- DEFH
Show answer
Answer: (d) DEFH
Q15. The Extended ASCII code (American Standard Code for Information Interchange) is a _____ code
- 2-bit
- 7-bit
- 8-bit
- 16-bit
Show answer
Answer: (c) 8-bit
Q16. The Extended ASCII code represents ________ unique codes.
- 256
- 255
- 128
- 127
Show answer
Answer: (a) 256
Q17. The decimal "8" is represented as ________ using Gray code.
- 11
- 1100
- 1000
- 1010
Show answer
Answer: (b) 1100
Q18. The decimal "17" in BCD will be represented as ________
- 11101
- 11011
- 10111
- 11110
Show answer
Answer: (c) 10111
Why: 17 = 0001 0111 in BCD, i.e. 10111.
Q19. A BCD to 7-segment decoder has ____ inputs and ____ outputs.
- 3, 7
- 4, 7
- 7, 3
- 7, 4
Show answer
Answer: (b) 4, 7
Q20. Consider a 7-segment display. Which segments will be ON for the digit 1?
- b, c
- a, b
- a, b, c
- b, c, d
Show answer
Answer: (a) b, c
Q21. A decimal-to-BCD encoder has ________ outputs.
- 2
- 4
- 10
- 16
Show answer
Answer: (b) 4
Q22. Suppose we want to transmit the data "10001101" and an even-parity scheme is used to detect errors. The parity bit added to this data will be ________
- Parity bit is not needed in this case.
- Both "0" and "1" can be used
- "0"
- "1"
Show answer
Answer: (c) "0"
Why: The data already has four 1s (an even count), so the even-parity bit is 0.
Q23. The values that exceed the specified range cannot be correctly represented and are considered as ________
- Overflow
- Carry
- Parity
- Sign value
Show answer
Answer: (a) Overflow
Q24. The range of Excess-8 code is from ______ to ______
- +7 to -8
- +8 to -7
- +9 to -8
- -9 to +8
Show answer
Answer: (a) +7 to -8
Q25. Excess-8 code assigns ______ to "-8".
- 1110
- 1100
- 1000
- 0000
Show answer
Answer: (d) 0000
Q26. In ANSI/IEEE Standard 754, the mantissa is represented by _________ bits
- 8-bits
- 16-bits
- 23-bits
- 64-bits
Show answer
Answer: (c) 23-bits
Why: One source key marks 32 bits, which is the total width of the format. The 32-bit single-precision format uses 1 sign bit + 8 exponent bits + 23 mantissa bits.
Q27. 2's complement of any binary number can be calculated by
- adding 1's complement twice
- adding 1 to 1's complement
- subtracting 1 from 1's complement.
- calculating 1's complement and inverting Most significant bit
Show answer
Answer: (b) adding 1 to 1's complement
Q28. Consider the binary number "100101". Its 2's complement will be __________
- 100110
- 011011
- 100111
- 011010
Show answer
Answer: (b) 011011
Why: 1's complement = 011010; adding 1 gives 011011.
Q29. 2's complement of 5 (in 4 bits) is
- 1101
- 1011
- 0101
- 1100
Show answer
Answer: (b) 1011
Why: One source key marks 0101, which is 5 itself, not its 2's complement. 5 = 0101, 1's complement = 1010, add 1 = 1011.
Q30. The 4-bit 2's complement representation of "+5" is _____________
- 1010
- 1110
- 1011
- 0101
Show answer
Answer: (d) 0101
Why: One source key marks 1011, which is the 2's complement of 5 (i.e. -5). A positive number keeps its plain binary form, so +5 = 0101.
Q31. The 4-bit 2's complement representation of "-7" is _____________
- 0111
- 1111
- 1001
- 0110
Show answer
Answer: (c) 1001
Q32. 2's complement of the hexadecimal number B70A is
- B70B
- B709
- 48F6
- 48F5
Show answer
Answer: (c) 48F6
Why: 1's complement = 48F5; add 1 = 48F6.
Q33. The difference 111 - 001 equals
- 100
- 111
- 001
- 110
Show answer
Answer: (d) 110
Q34. An adder circuit can be used to perform the subtraction operation.
- True
- False
Show answer
Answer: (a) True
Q35. The three fundamental gates are ____________
- AND, NAND, XOR
- OR, AND, NAND
- NOT, NOR, XOR
- NOT, OR, AND
Show answer
Answer: (d) NOT, OR, AND
Q36. The AND gate performs a logical __________ function
- Addition
- Subtraction
- Multiplication
- Division
Show answer
Answer: (c) Multiplication
Q37. The OR gate performs Boolean ___________.
- multiplication
- subtraction
- division
- addition
Show answer
Answer: (d) addition
Q38. The output of an AND gate is one when _______
- All of the inputs are one
- Any of the inputs is one
- Any of the inputs is zero
- All the inputs are zero
Show answer
Answer: (a) All of the inputs are one
Q39. A NAND gate's output is LOW if
- all inputs are LOW
- all inputs are HIGH
- any input is LOW
- any input is HIGH
Show answer
Answer: (b) all inputs are HIGH
Q40. A NOR gate's output is HIGH if
- all inputs are HIGH
- any input is HIGH
- any input is LOW
- all inputs are LOW
Show answer
Answer: (d) all inputs are LOW
Q41. NOR gate is formed by connecting _________
- OR gate and then NOT gate
- NOT gate and then OR gate
- AND gate and then OR gate
- OR gate and then AND gate
Show answer
Answer: (a) OR gate and then NOT gate
Why: One source key marks (c) AND then OR, which is wrong. NOR = OR followed by NOT.
Q42. A NOR gate can be used to perform the operations of AND, OR and NOT gates.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Why: One source key says FALSE. NOR (like NAND) is a universal gate, so the statement is TRUE.
Q43. What will be the output of a 3-input NAND gate for the input values A=1, B=0, C=1?
- Zero
- One
- Undefined
- No output, as input is invalid
Show answer
Answer: (b) One
Why: The source screenshot marks 'Zero', which is wrong: A.B.C = 1.0.1 = 0, and the NAND inverts it, giving 1.
Q44. The output of the expression F = A.B.C will be Logic ________ when A=1, B=0, C=1.
- Undefined
- One
- Zero
- No output as input is invalid.
Show answer
Answer: (c) Zero
Q45. The output of the expression F = A+B+C will be Logic ________ when A=0, B=1, C=1. (The symbol + represents the OR gate.)
- Undefined
- One
- Zero
- 10 (binary)
Show answer
Answer: (b) One
Why: One source screenshot marks '10 (binary)', which is wrong. 0+1+1 = 1 in Boolean OR.
Q46. The expression F = A+B+C describes the operation of a 3-input ______ gate.
- OR
- AND
- NOT
- NAND
Show answer
Answer: (a) OR
Q47. A quantity having continuous values is a/an ______ quantity.
- digital
- binary
- analog
- natural
Show answer
Answer: (c) analog
Q48. TTL based devices work with a DC supply of ____ volts.
- +10
- +5
- +3
- 3.3
Show answer
Answer: (b) +5
Q49. In the CMOS 5 V series, the input voltage for a logic HIGH signal (VIH) is in the range of ______ volts.
- 3.5 to 5
- 4.5 to 5
- 0 to 5
- 0 to 3.5
Show answer
Answer: (a) 3.5 to 5
Q50. High level noise margin (VNH) of CMOS 5 volt series circuits is _____________
- 0.3 V
- 0.5 V
- 0.9 V
- 3.3 V
Show answer
Answer: (c) 0.9 V
Q51. One advantage TTL has over CMOS is that TTL is
- less expensive
- not sensitive to electrostatic discharge
- faster
- more widely available
Show answer
Answer: (b) not sensitive to electrostatic discharge
Q52. Fan-out is specified in terms of
- voltage
- current
- watt
- unit loads
Show answer
Answer: (d) unit loads
Q53. Generally, the power dissipation of _______ devices remains constant throughout their operation.
- TTL
- CMOS 3.5 series
- CMOS 5 series
- Power dissipation of all circuits increases with time.
Show answer
Answer: (a) TTL
Q54. Which one is true?
- Power consumption of TTL is higher than of CMOS
- Power consumption of CMOS is higher than of TTL
- Both TTL and CMOS have the same power consumption
- Power consumption of both CMOS and TTL depends on the number of gates in the circuit.
Show answer
Answer: (a) Power consumption of TTL is higher than of CMOS
Q55. The 3.3 V CMOS series is characterized by __________ and _________ as compared to the 5 V CMOS series.
- Low switching speeds, high power dissipation
- Fast switching speeds, high power dissipation
- Fast switching speeds, very low power dissipation
- Low switching speeds, very low power dissipation
Show answer
Answer: (c) Fast switching speeds, very low power dissipation
Q56. "74ALS" stands for
- Advanced Low-frequency Schottky TTL
- Advanced Low-dissipation Schottky TTL
- Advanced Low-Power Schottky TTL
- Advanced Low-propagation Schottky TTL
Show answer
Answer: (c) Advanced Low-Power Schottky TTL
Q57. An important application of the AND gate is its use in counter circuits.
- True
- False
Show answer
Answer: (a) True
Q58. Systems having memory elements are called ______ circuits.
- Simplex
- Combinational
- Sequential
- Quadrantal
Show answer
Answer: (c) Sequential
Q59. Sequential circuits have storage elements.
- True
- False
Show answer
Answer: (a) True
Q60. The complement of a variable is always
- 1
- 0
- The inverse of the variable
- None
Show answer
Answer: (c) The inverse of the variable
Q61. Which of the following rules states that if one input of an AND gate is always 1, the output is equal to the other input?
- A + 1 = 1
- A + A = A
- A.A = A
- A.1 = A
Show answer
Answer: (d) A.1 = A
Why: One source key marks (c) A.A = A, which is the idempotent law. The rule described is A.1 = A.
Q62. Which one of the following is NOT a valid rule of Boolean algebra?
- A = A'
- AA = A
- A + 1 = 1
- A + 0 = A
Show answer
Answer: (a) A = A'
Q63. The expression _________ is an example of the Commutative Law for Multiplication.
- AB+C = A+BC
- A(B+C) = B(A+C)
- AB = BA
- A+B = B+A
Show answer
Answer: (c) AB = BA
Q64. A.(B.C) = (A.B).C is an expression of __________
- De Morgan's Law
- Distributive Law
- Commutative Law
- Associative Law
Show answer
Answer: (d) Associative Law
Q65. A.(B + C) = A.B + A.C is the expression of _________________
- De Morgan's Law
- Commutative Law
- Distributive Law
- Associative Law
Show answer
Answer: (c) Distributive Law
Q66. According to De Morgan's theorem: (A+B+C)' = ______________
- A.B.C
- A+(B.C)'
- A'.B'.C'
- A.B'+C
Show answer
Answer: (c) A'.B'.C'
Q67. (A+B).(A+C) = ___________
- B+C
- A+BC
- AB+C
- AC+B
Show answer
Answer: (b) A+BC
Q68. The Boolean expression A + BC equals
- (A' + B)(A' + C)
- (A + B)(A + C)
- (A + B)(A' + C)
- none of the above
Show answer
Answer: (b) (A + B)(A + C)
Q69. A + A'B = ________
- A
- B
- A.B
- A+B
Show answer
Answer: (d) A+B
Q70. A product term is 0 when ______________
- Any of the literals is 1
- At least two literals are 1
- All the literals are 1
- Any of the literals is 0
Show answer
Answer: (d) Any of the literals is 0
Q71. The Boolean expression AB'CD' is
- a sum term
- a product term
- a literal term
- always 1
Show answer
Answer: (b) a product term
Q72. The Boolean expression A + B' + C is
- a sum term
- a literal term
- a product term
- a complemented term
Show answer
Answer: (a) a sum term
Q73. The Boolean expression X = AB + CD represents
- two ORs ANDed together
- a 4-input AND gate
- two ANDs ORed together
- an exclusive-OR
Show answer
Answer: (c) two ANDs ORed together
Q74. A logic circuit with output X = A'BC + AB' consists of ________.
- two AND gates, two OR gates, two inverters
- three AND gates, two OR gates, one inverter
- two AND gates, one OR gate, two inverters
- two AND gates, one OR gate
Show answer
Answer: (c) two AND gates, one OR gate, two inverters
Q75. To implement the expression AB'CD + ABC'D + ABCD', it takes one OR gate and
- three AND gates and three inverters
- three AND gates and four inverters
- three AND gates
- one AND gate
Show answer
Answer: (a) three AND gates and three inverters
Q76. A'B + A'BC' + AC is an example of ________
- Product of sum form
- Sum of product form
- De Morgan's law
- Associative law
Show answer
Answer: (b) Sum of product form
Q77. An example of an SOP expression is
- A + B(C + D)
- A'B + AC' + AB'C
- (A' + B + C)(A + B' + C)
- both (a) and (b)
Show answer
Answer: (b) A'B + AC' + AB'C
Q78. (A+B)(A+B'+C)(A'+C) is an example of ______________
- Product of sum form
- Sum of product form
- De Morgan's law
- Associative law
Show answer
Answer: (a) Product of sum form
Q79. Determine the values of A, B, C and D that make the sum term A' + B + C' + D equal to zero.
- A = 1, B = 0, C = 0, D = 0
- A = 1, B = 0, C = 1, D = 0
- A = 0, B = 1, C = 0, D = 0
- A = 1, B = 0, C = 1, D = 1
Show answer
Answer: (b) A = 1, B = 0, C = 1, D = 0
Q80. The binary value 1010 is converted to the product term A'BC'D.
- TRUE
- FALSE
Show answer
Answer: (b) FALSE
Why: 1010 gives A B' C D', i.e. AB'CD', not A'BC'D.
Q81. A standard SOP form has __________ terms that have all the variables in the domain of the expression.
- Sum
- Product
- Max
- Composite
Show answer
Answer: (b) Product
Q82. A standard POS form has __________ terms that have all the variables in the domain of the expression.
- Sum
- Product
- Min
- Composite
Show answer
Answer: (a) Sum
Q83. The binary values for the standard SOP expression ABCD' + A'BCD' + A'B'C'D are ___________
- 1110 + 0110 + 0001
- 1011 + 1111 + 1011
- 0001 + 1001 + 1110
- 1010 + 1110 + 0101
Show answer
Answer: (a) 1110 + 0110 + 0001
Q84. Determine the binary values of the variables for the standard POS expression (A + B' + C)(A' + B + C')
- (1+0+1)(0+1+0)
- (0+1+0)(1+0+1)
- (1+0+0)(0+0+1)
- (0+1+0)(1+1+0)
Show answer
Answer: (b) (0+1+0)(1+0+1)
Why: The source screenshot marks option (a), which is wrong. In a POS term a plain variable maps to 0 and a complemented variable to 1: (A+B'+C) -> (0+1+0) and (A'+B+C') -> (1+0+1).
Q85. Identify the Boolean expression that is in standard POS form.
- (A + B')(A' + B + C')
- A'BC + AB'C'
- (A + B' + C')(A + B + C)
- (A + B)(A + C')
Show answer
Answer: (c) (A + B' + C')(A + B + C)
Why: The source screenshot marks option (a), but its first sum term has no C, so it is not standard. Option (c) has all three variables in every sum term.
Q86. Following is a standard POS expression: (A+B'+C+D')(A+B'+C+D)(A+B+C'+D')(A+B+C+D')(A+B'+C'+D)
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q87. The minterm expansion for F(A,B,C) = (A+B+C)(A+B'+C')(A'+B+C')(A'+B'+C) is
- F(A,B,C) = Pi M(0,3,5,6)
- F(A,B,C) = Summation m(0,3,5,6)
- F(A,B,C) = Summation m(1,2,4,7)
Show answer
Answer: (c) F(A,B,C) = Summation m(1,2,4,7)
Why: The four sum terms are maxterms M0, M3, M5, M6, so the function is Pi M(0,3,5,6). Its minterm (SOP) expansion uses the remaining minterms: Sum m(1,2,4,7). A source key marks option (a), which is the maxterm form, not the minterm expansion.
Q88. A non-standard POS is converted into a standard POS by using the rule _____
- A + A' = 1
- A.A' = 0
- 1 + A = 1
- A + B = B + A
Show answer
Answer: (b) A.A' = 0
Why: A missing variable is added to a sum term as (A.A' = 0) and then expanded. A + A' = 1 is the rule used for converting SOP terms.
Q89. A SOP expression is equal to 1 ______________
- All the variables in domain of expression are present
- At least one variable in domain of expression is present.
- When one or more product terms in the expression are equal to 0.
- When one or more product terms in the expression are equal to 1.
Show answer
Answer: (d) When one or more product terms in the expression are equal to 1.
Q90. When two or more sum terms are multiplied by Boolean multiplication, the result is a ______ expression.
- SOP
- Boolean
- POS
Show answer
Answer: (c) POS
Q91. A SOP expression having a domain of 3 variables will have a truth table with ____ combinations of inputs and corresponding output values.
- 2
- 4
- 8
- 16
Show answer
Answer: (c) 8
Q92. For a standard SOP expression, a ______ is placed in the K-map cell corresponding to each product term (minterm) present in the expression.
- 0
- 1
- X (don't care condition)
- Any of given option depending on SOP term.
Show answer
Answer: (b) 1
Q93. Which of the following simplification methods is intended to be used for Boolean expressions having more than four variables?
- Boolean Algebra and rules
- Karnaugh Map
- Quine-McCluskey
- De Morgan's Theorem
Show answer
Answer: (c) Quine-McCluskey
Q94. A Karnaugh map is similar to a truth table because it presents all the possible values of input variables and the resulting output of each value.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q95. The 3-variable Karnaugh map (K-map) has _______ cells for minterms or maxterms.
- 4
- 8
- 12
- 16
Show answer
Answer: (b) 8
Q96. The 4-variable Karnaugh map (K-map) has _______ cells for minterms or maxterms.
- 4
- 8
- 12
- 16
Show answer
Answer: (d) 16
Q97. A 5-variable Karnaugh map has ______ cells.
- 16
- 32
- 64
- None
Show answer
Answer: (b) 32
Q98. In a 4-variable K-map, a 2-variable product term is produced by
- a 2-cell group of 1s
- an 8-cell group of 1s
- a 4-cell group of 1s
- a 4-cell group of 0s
Show answer
Answer: (c) a 4-cell group of 1s
Q99. When four 1s are taken as a group on a Karnaugh map, the number of variables eliminated from the output expression is/are ______
- 1
- 2
- 3
- 4
Show answer
Answer: (b) 2
Why: No key was marked on the source screenshot. A group of 4 cells eliminates 2 variables (2^2 = 4).
Q100. On a Karnaugh map, grouping the 0s produces
- a POS expression
- a SOP expression
- a "don't care" condition
- AND-OR logic
Show answer
Answer: (a) a POS expression
Q101. Simplifying a POS (product of sums) expression requires the grouping of ______
- 0s
- 1s
- Don't care
- Both 0s and 1s
Show answer
Answer: (a) 0s
Q102. The cell marked 6 in a 4-variable K-map represents minterm 6 or maxterm 6 having the following binary values of variables A, B, C and D.
- A=1, B=1, C=0, D=0
- A=0, B=1, C=1, D=0
- A=0, B=0, C=1, D=1
- A=1, B=0, C=0, D=1
Show answer
Answer: (b) A=0, B=1, C=1, D=0
Q103. A comparator circuit has multiple inputs and _____ outputs.
- 2
- 3
- 4
- 7
Show answer
Answer: (b) 3
Q104. The output A < B is set to 1 when the input combination is __________
- A=10, B=01
- A=11, B=01
- A=01, B=01
- A=01, B=10
Show answer
Answer: (d) A=01, B=10
Q105. The binary numbers A = 1100 and B = 1001 are applied to the inputs of a comparator. What are the output levels?
- A > B = 1, A < B = 0, A = B = 1
- A > B = 0, A < B = 1, A = B = 0
- A > B = 1, A < B = 0, A = B = 0
- A > B = 0, A < B = 1, A = B = 1
Show answer
Answer: (c) A > B = 1, A < B = 0, A = B = 0
Why: Some handouts print the first option with a typing mistake (A < B twice). A=1100 (12) is greater than B=1001 (9), so only A > B is 1.
Q106. Which gate is best used as a basic comparator?
- NOR
- OR
- exclusive-OR
- AND
Show answer
Answer: (c) exclusive-OR
Q107. Two 2-bit comparator circuits can be connected to form a single 4-bit comparator.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q108. An alternate method of implementing comparators that allows them to be easily cascaded without the need for extra logic gates is ________
- Using a single comparator
- Using iterative circuit based comparators
- Connecting comparators in vertical hierarchy
- Extra logic gates are always required.
Show answer
Answer: (b) Using iterative circuit based comparators
Q109. The adjacent-1s detector circuit will have an active-low output for the input
- 1101
- 1010
- 0110
- 1011
Show answer
Answer: (b) 1010
Q110. Circuits having a bubble at their outputs are considered to have an active-low output.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q111. A particular half-adder has ______ inputs and ________ output(s).
- 3, 1
- 3, 2
- 2, 1
- 2, 2
Show answer
Answer: (d) 2, 2
Q112. The half-adder logic circuit contains _____ XOR gate(s).
- 1
- 2
- 4
- 6
Show answer
Answer: (a) 1
Q113. The half-adder logic circuit contains 2 XOR gates.
- TRUE
- FALSE
Show answer
Answer: (b) FALSE
Q114. A particular full adder has ______ inputs and ______ output(s).
- 2, 3
- 2, 2
- 3, 2
- 3, 3
Show answer
Answer: (c) 3, 2
Q115. What are the sum and the carry (Cout) of a full adder when A = 1, B = 1 and Cin = 0?
- Sum = 0, Cout = 1
- Sum = 1, Cout = 0
- Sum = 1, Cout = 1
- Sum = 0, Cout = 0
Show answer
Answer: (a) Sum = 0, Cout = 1
Q116. Which circuit has the following Sum and CarryOut expressions? Sum = A xor B xor C; CarryOut = C(A xor B) + AB
- Half Adder
- Full Adder
- 3-bit parallel adder
- MSI adder circuit
Show answer
Answer: (b) Full Adder
Q117. What are the values of sum and carry out when two 4-bit binary numbers (1011 and 1111) are applied to a 4-bit parallel adder and the carry input is 1?
- Sum = 0111, Cout = 0
- Sum = 1111, Cout = 1
- Sum = 1011, Cout = 1
- Sum = 1100, Cout = 1
Show answer
Answer: (c) Sum = 1011, Cout = 1
Why: No key was marked on the source screenshot. 1011 + 1111 + 1 = 11011, i.e. sum 1011 with a carry out of 1.
Q118. If two numbers in BCD representation generate an invalid BCD number, then the binary ________ is added to the result.
- 1001
- 0110
- 1111
- 1100
Show answer
Answer: (b) 0110
Q119. ______ single-digit BCD adders can be cascaded together to form a 2-digit BCD adder.
- Three
- Two
- One
- Four
Show answer
Answer: (b) Two
Q120. The function to be performed by the processor is selected by a set of inputs known as ________
- Function Select Inputs
- Micro Operation selectors
- OPCODE selectors
- None of the given options
Show answer
Answer: (a) Function Select Inputs
Q121. For a 3-to-8 decoder, how many 2-to-4 decoders will be required?
- 4
- 3
- 2
- 1
Show answer
Answer: (c) 2
Q122. The active-high and active-low enable inputs of a 3-to-8 decoder are as follows:
- One active-high and the remaining two are active-low.
- Two active-high and the remaining one is active-low.
- All active high
- All active low
Show answer
Answer: (a) One active-high and the remaining two are active-low.
Q123. A 3-to-8 decoder can be used to implement standard SOP and POS Boolean expressions.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q124. If "1110" is applied at the input of a BCD-to-decimal decoder, which output pin will be activated?
- 2nd
- 3rd
- 4th
- No output will be activated
Show answer
Answer: (d) No output will be activated
Why: One source key marks (c) 4th. 1110 (14) is not a valid BCD code, so no output is activated.
Q125. The ________ encoder is used as a keypad encoder.
- 2-to-8 encoder
- 4-to-16 encoder
- BCD-to-Decimal
- Decimal-to-BCD Priority
Show answer
Answer: (d) Decimal-to-BCD Priority
Why: One source key marks BCD-to-Decimal, which is a decoder, not an encoder.
Q126. How many data select lines are required for selecting eight inputs?
- 1
- 2
- 3
- 4
Show answer
Answer: (c) 3
Q127. A multiplexer circuit has _____ input(s) and _____ output(s).
- Single, single
- Single, multiple
- Multiple, single
- Multiple, multiple
Show answer
Answer: (c) Multiple, single
Why: One source screenshot marks 'Multiple, multiple', which is wrong. A multiplexer selects one of many inputs for a single output.
Q128. The main use of the multiplexer is to
- Select data from multiple sources and route it to a single destination
- Select data from a single source and route it to multiple destinations
- Select data from a single source and route to a single destination
- Select data from multiple sources and route to multiple destinations
Show answer
Answer: (a) Select data from multiple sources and route it to a single destination
Q129. 8-bit parallel data can be converted into serial data by using a ________ multiplexer
- 4-to-2
- 4-to-4
- 8-to-1
- 8-to-4
Show answer
Answer: (c) 8-to-1
Q130. Two 2-input, 4-bit multiplexers 74X157 can be connected to implement a ____ multiplexer.
- 4-input, 8-bit
- 4-input, 16-bit
- 2-input, 8-bit
- 2-input, 4-bit
Show answer
Answer: (c) 2-input, 8-bit
Why: One source key says 2-input, 4-bit. Two 4-bit chips with a common select line make a 2-input, 8-bit multiplexer.
Q131. The four outputs of two 4-input multiplexers, connected to form a 16-input multiplexer, are connected together through a 4-input __________ gate
- AND
- OR
- NAND
- XOR
Show answer
Answer: (b) OR
Q132. In a 16-input multiplexer, the decoder inputs ____ and ____ enable one of the four multiplexers.
- C, D
- A, D
- B, C
- A, B
Show answer
Answer: (a) C, D
Q133. Which logic gate is used to connect the two active-low enable inputs of the two 4-input multiplexers to form the C input of an 8-input multiplexer?
- OR gate
- XOR gate
- AND gate
- NOT gate
Show answer
Answer: (d) NOT gate
Q134. The ______ select input(s) of the two 4-input multiplexers are common in a dual 4-input multiplexer.
- Three
- Two
- Four
- One
Show answer
Answer: (b) Two
Q135. A demultiplexer has
- one input and several outputs
- one input and one output
- several inputs and several outputs
- several inputs and one output
Show answer
Answer: (a) one input and several outputs
Q136. A demultiplexer is not available commercially.
- TRUE
- FALSE
Show answer
Answer: (a) TRUE
Q137. A demultiplexer can also be used as a
- Deselector
- Decoder
- Distributer
- Encoder
Show answer
Answer: (c) Distributer
Q138. The Quad Multiplexer has _____ outputs
- 4
- 8
- 16
- 12
Show answer
Answer: (a) 4
Why: One source key marks 16. A quad multiplexer has four outputs.
Q139. The PROM consists of a fixed non-programmable ____________ gate array configured as a decoder.
- AND
- OR
- NOT
- XOR
Show answer
Answer: (a) AND
Q140. The Programmable Array Logic (PAL) has a ____ AND array and a ____ OR array.
- Fixed, programmable
- Programmable, fixed
- Fixed, fixed
- Programmable, programmable
Show answer
Answer: (b) Programmable, fixed
Q141. Tri-state buffer is basically a/an _________ gate.
- AND
- OR
- NOT
- XOR
Show answer
Answer: (c) NOT
Why: Some source keys mark XOR. The handout describes the tri-state buffer as a NOT gate with a control line that disconnects the output.
Q142. When the control line of a tri-state buffer is high, the buffer operates like a ________ gate
- AND
- OR
- NOT
- XOR
Show answer
Answer: (c) NOT
Q143. The ABEL symbol for the OR operation is
- &
- !
- #
- $
Show answer
Answer: (c) #
Q144. The ABEL symbol for the XOR operation is
- $
- #
- !
- &
Show answer
Answer: (a) $
Q145. A' is written in ABEL as ________.
- @A
- !A
- $A
- #A
Show answer
Answer: (b) !A
Q146. The ABEL notation equivalent to the Boolean expression A+B is:
- A & B
- A ! B
- A # B
- A $ B
Show answer
Answer: (c) A # B
Q147. In ABEL the variable A is treated separately from variable a.
- True
- False
Show answer
Answer: (a) True
Q148. All ABEL equations must end with ________
- '.' (a dot)
- '$' (a dollar symbol)
- ';' (a semicolon)
- 'endl' (keyword 'endl')
Show answer
Answer: (c) ';' (a semicolon)
Q149. A source file that is created in ABEL has ____________ sections.
- five
- four
- three
- two
Show answer
Answer: (c) three
Q150. ABEL is an acronym for
- Advanced Broadband Enabled Longitude
- Advanced Boolean Equation Language
- None of the given options
- Advanced Boolean Expression Language
Show answer
Answer: (d) Advanced Boolean Expression Language
Q151. GAL is an acronym for ________.
- Generic Analysis Logic
- Giant Array Logic
- General Array Logic
- Generic Array Logic
Show answer
Answer: (d) Generic Array Logic
Why: Some source keys mark Giant or General Array Logic. The handout and the marked quiz answer give Generic Array Logic.
Q152. GAL can be reprogrammed because instead of fuses ________ logic is used in it.
- E2CMOS
- TTL
- CMOS+
- None of the given options
Show answer
Answer: (a) E2CMOS
Q153. ________ uses E2CMOS technology, which is Electrically Erasable CMOS, instead of bipolar technology and fusible links.
- PLA
- PAL
- PROM
- GAL
Show answer
Answer: (d) GAL
Q154. ________ come in different configurations and are identified by a unique number.
- GAL
- PLAs
- EPROM
- PALs
Show answer
Answer: (d) PALs
Q155. The GAL22V10 has ____ inputs.
- 22
- 10
- 44
- 20
Show answer
Answer: (a) 22
Why: One source key marks 10. The 22V10 has 22 inputs and up to 10 outputs.
Q156. OLMC stands for ________.
- Output Logic Macro Cells
- Output Logic Micro Cells
- Ordered Logic Macro Cells
- Ordered Logic Micro Cells
Show answer
Answer: (a) Output Logic Macro Cells
Q157. A standard interface for programming the In-System PLD consists of ________.
- 2-wire
- 4-wire
- 8-wire
- 16-wire
Show answer
Answer: (b) 4-wire
Why: This is the 4-wire JTAG interface (key from the marked quiz screenshot).
Q158. A latch has _____ stable states
- One
- Two
- Three
- Four
Show answer
Answer: (b) Two
Q159. A latch retains its state unless ___________
- Power is turned off
- Input is changed
- Output is changed
- Clock pulse is changed
Show answer
Answer: (b) Input is changed
Q160. An S-R latch can be implemented by using _________ gates
- AND, OR
- NAND, NOR
- NAND, XOR
- NOT, XOR
Show answer
Answer: (b) NAND, NOR
Why: One quiz screenshot marks AND, OR, which is wrong; the S-R latch is built from cross-coupled NAND or NOR gates.
Q161. If an active-HIGH S-R latch has a 0 on the S input and a 1 on the R input and then the R input goes to 0, the latch will be ________.
- SET
- RESET
- Clear
- Invalid
Show answer
Answer: (b) RESET
Why: Some older past-paper keys say SET. With S=0, R=1 the latch is reset (Q=0), and when R returns to 0 it holds that state, so it stays RESET.
Q162. At S = 0 and R = 1, an active-HIGH S-R latch is in ________ condition.
- SET
- RESET
- Invalid
- No change
Show answer
Answer: (b) RESET
Q163. If an S-R latch has a 1 on the S input and a 0 on the R input and then the S input goes to 0, the latch will be
- set
- reset
- invalid
- clear
Show answer
Answer: (a) set
Q164. 110/10 = _______________
- 11
- 10
- 101
- 111
Show answer
Answer: (a) 11
Why: 110 divided by 10 is 11, whether read as binary (6 / 2 = 3 = 11) or as decimal (110 / 10 = 11). No key was marked in the source; this is worked out.
Q165. The simplest and most commonly used decoder is the ___________ decoder.
- n to 2^n
- (n-1) to (2^n - 1)
- n to 2^n - 1
Show answer
Answer: (a) n to 2^n
Why: An n-to-2^n decoder (for example 2-to-4 or 3-to-8) has n inputs and 2^n outputs. The source prints 2^n as '2n', so the powers have been restored. No key was marked in the source.
Q166. The capability that allows PLDs to be programmed after they have been placed in the circuit is called ______________.
- REPM
- ISP
- ICP
- EEPM
Show answer
Answer: (b) ISP
Why: ISP = In-System Programming. No key was marked in the source.
Q167. The basic building block of a logic circuit is a ____________.
- Logic gate
- Flip-flop
- An adder
- A comparator
Show answer
Answer: (a) Logic gate
Why: Logic circuits are built from logic gates. No key was marked in the source.
Q168. If we add "723" and "134" by first converting them into floating point notation (d.ddd x 10^n form) and then adding them, the exponent of the result will be ________
- 0
- 1
- 2
- 3
Show answer
Answer: (c) 2
Why: 7.23 x 10^2 + 1.34 x 10^2 = 8.57 x 10^2, so the exponent is 2 (if the numbers are written as 0.723 x 10^3 the exponent would be 3, so use the handout's d.ddd form).
Q169. The OLMC consists of a ________.
- Encoder
- Decoder
- Logic Gate
- Flip-Flop
Show answer
Answer: (d) Flip-Flop
Why: Only one source key (a marked quiz screenshot) was available for this question.
Q170. The OLMC of the GAL16V8 is _______ to the OLMC of the GAL22V10
- Similar
- Different
- Similar with some enhancements
- Depends on the type of PALs input size
Show answer
Answer: (c) Similar with some enhancements
Why: Source keys differ: one handout marks 'Similar', another (with a page reference) marks 'Similar with some enhancements'. The second matches the lecture text.
Q171. Using a multiplexer as a parallel-to-serial converter requires ___________ connected to the multiplexer
- A parallel to serial converter circuit
- A counter circuit
- A BCD to Decimal decoder
- A 2-to-8 bit decoder
Show answer
Answer: (b) A counter circuit
Why: Source keys disagree. A counter is needed to drive the select lines in sequence so each parallel input is sent out one after another.
Part 2: Subjective Questions
Q1. Provide some of the inputs for which the adjacent 1s detector circuit has an active-high output. (2 marks)
The adjacent-1s detector takes a 4-bit input ABCD and its output is 1 whenever two neighbouring bits (AB, BC or CD) are both 1. The output is 1 for these inputs:
- 0011
- 0110
- 0111
- 1011
- 1100
- 1101
- 1110
- 1111
For every other input (for example 0000, 0101 or 1010) the output is 0. The simplified expression is F = AB + BC + CD.
Q2. Draw the truth table of a NOR based S-R latch. (2 marks)
The NOR latch is made of two cross-coupled NOR gates (Q = (R + Q')' and Q' = (S + Q)'). Its inputs are active-high.
| S | R | Q (next) | Q' (next) | Condition |
|---|---|---|---|---|
| 0 | 0 | No change | No change | Hold (latched) |
| 0 | 1 | 0 | 1 | Reset |
| 1 | 0 | 1 | 0 | Set |
| 1 | 1 | 0 | 0 | Invalid |
Q3. Draw the truth table of a NAND based S-R latch. (2 marks)
The NAND latch is made of two cross-coupled NAND gates. Its inputs are active-low, so the roles of 0 and 1 are swapped compared with the NOR latch.
| S | R | Q (next) | Q' (next) | Condition |
|---|---|---|---|---|
| 1 | 1 | No change | No change | Hold (latched) |
| 0 | 1 | 1 | 0 | Set |
| 1 | 0 | 0 | 1 | Reset |
| 0 | 0 | 1 | 1 | Invalid |
With S = R = 1 the previous output is maintained, which is why S and R of a NAND latch must not both be 0 at the same time.
Q4. Draw the circuit diagram of a NOR based S-R latch. (3 marks)
Two NOR gates are cross-coupled: the output of each gate is fed back to one input of the other gate.
R --> [ NOR 1 ] --> Q (second input of NOR 1 is Q') S --> [ NOR 2 ] --> Q' (second input of NOR 2 is Q) Q = (R + Q')' Q' = (S + Q)'
So the upper gate takes R and Q' and produces Q, and the lower gate takes S and Q and produces Q'. The truth table is given in the earlier question on the NOR based S-R latch.
Q5. Explain the S-R latch. What do you mean by bistable devices? (5 marks)
A bistable circuit has two stable output states and stays in whichever one it was put in until an input forces it to change. One state is called set (Q = 1, Q' = 0) and the other reset (Q = 0, Q' = 1). The simplest bistable device is the set-reset (S-R) latch.
- Activating S sets the latch (Q = 1); activating R resets it (Q = 0).
- With both inputs inactive the latch holds (remembers) its previous state, so it acts as a 1-bit memory.
- Activating S and R together is the invalid condition, because Q and Q' are forced to the same value and the final state is unpredictable when both are released.
- A latch has no clock: its output reacts as soon as its inputs change. It can be built from two cross-coupled NAND gates (active-low inputs) or two NOR gates (active-high inputs).
Q6. For a two-bit comparator circuit, specify the inputs for which the output A > B is set to 1. (3 marks)
A = A1A0 and B = B1B0. A > B is 1 for these six combinations (written as A B):
- 01 00
- 10 00
- 10 01
- 11 00
- 11 01
- 11 10
Q7. For a two-bit comparator circuit, specify the inputs for which the output A < B is set to 1. (3 marks)
A < B is 1 for these six combinations (written as A B):
- 00 01
- 00 10
- 00 11
- 01 10
- 01 11
- 10 11
Q8. For a two-bit comparator circuit, specify all the inputs for which the output A = B is set to 1. (3 marks)
A = B is 1 when both 2-bit numbers are identical, i.e. for the four combinations:
- 00 00
- 01 01
- 10 10
- 11 11
Q9. Draw the function table of a two-bit comparator, map it to a K-map and derive the expression for X > Y. (10 marks)
Inputs are X1X0 and Y1Y0; outputs are X<Y, X=Y and X>Y.
| X1 X0 | Y1 Y0 | X<Y | X=Y | X>Y |
|---|---|---|---|---|
| 00 | 00 | 0 | 1 | 0 |
| 00 | 01 | 1 | 0 | 0 |
| 00 | 10 | 1 | 0 | 0 |
| 00 | 11 | 1 | 0 | 0 |
| 01 | 00 | 0 | 0 | 1 |
| 01 | 01 | 0 | 1 | 0 |
| 01 | 10 | 1 | 0 | 0 |
| 01 | 11 | 1 | 0 | 0 |
| 10 | 00 | 0 | 0 | 1 |
| 10 | 01 | 0 | 0 | 1 |
| 10 | 10 | 0 | 1 | 0 |
| 10 | 11 | 1 | 0 | 0 |
| 11 | 00 | 0 | 0 | 1 |
| 11 | 01 | 0 | 0 | 1 |
| 11 | 10 | 0 | 0 | 1 |
| 11 | 11 | 0 | 1 | 0 |
K-map for X > Y (rows X1X0, columns Y1Y0):
| X1X0 \ Y1Y0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | 0 |
| 01 | 1 | 0 | 0 | 0 |
| 11 | 1 | 1 | 0 | 1 |
| 10 | 1 | 1 | 0 | 0 |
Groups of 1s: the 4-cell block (rows 11 and 10, columns 00 and 01) gives X1 Y1'; the pair in column 00 (rows 01 and 11) gives X0 Y1' Y0'; the pair in row 11 (columns 00 and 10, wrapping around) gives X1 X0 Y0'.
X > Y = X1 Y1' + X0 Y1' Y0' + X1 X0 Y0'
Q10. One of the ABEL entry methods uses logic equations. Explain it with at least one example. (5 marks)
In the logic-equation method the circuit is described directly with Boolean equations. Rules:
- Variable names can be any combination of letters and digits. ABEL is case sensitive, so A and a are different variables.
- Every equation must end with a semicolon (;).
- Operators: ! = NOT, & = AND, # = OR, $ = XOR.
Example: the Boolean expression F = AB' + AC + (BD)' is written in ABEL as
F = A & !B # A & C # !(B & D);
(The complement of the whole product BD is written with ! in front of the bracketed product.)
Q11. Explain carry propagation in a parallel binary adder. (5 marks)
A parallel binary adder is built by connecting as many 1-bit full adders as there are bits. The carry output of each full adder is connected to the carry input of the next more significant adder.
In a 4-bit adder the most significant adder (A3, B3, C3) cannot produce a correct sum until it receives the carry C3 from the adder below it, which in turn waits for C2, and so on back to the least significant adder. The carry therefore has to ripple through every full adder, so the total delay grows with the number of bits.
To reduce this delay, look-ahead carry circuits compute each carry directly from the inputs using the generate term G = A.B and the propagate term P = A xor B, with C(next) = G + P.C. The 74XX283 and 74XX181 ICs use this idea.
Q12. Name any two modes in which PALs are programmed. (1 marks)
PALs (such as the 16V8) can be programmed in these three modes; any two are enough:
- Simple mode
- Complex mode
- Registered mode
Q13. Explain combinational function devices. (2 marks)
Digital circuits built by combining logic gates whose output depends only on the present inputs (no memory) are called combinational circuits. Standard, ready-made combinational function devices include comparators, decoders, encoders, multiplexers, demultiplexers and adders; basic gate combinations such as XOR, XNOR, NAND and NOR are also treated as combinational function devices.
Q14. Differentiate between the hexadecimal and octal number systems. (3 marks)
| Octal | Hexadecimal | |
|---|---|---|
| Base | 8 | 16 |
| Digits used | 0 to 7 | 0 to 9 and A to F (A=10 ... F=15) |
| Binary grouping | 3 bits per digit | 4 bits per digit |
| Example | 345 (octal) = 011 100 101 | 1B7 (hex) = 0001 1011 0111 |
Both are used instead of long binary strings because conversion from binary is easy: group the bits in threes (octal) or fours (hex) and convert each group.
Q15. Explain the Sum-of-Weights method for hexadecimal to decimal conversion with at least one example. (5 marks)
Each hex digit is multiplied by its weight (a power of 16 based on its position, starting from 16^0 at the right), and the products are added.
Example: convert 1B7 (hex) to decimal. B = 11.
| Digit | Weight | Product |
|---|---|---|
| 7 | 16^0 = 1 | 7 x 1 = 7 |
| B (11) | 16^1 = 16 | 11 x 16 = 176 |
| 1 | 16^2 = 256 | 1 x 256 = 256 |
Sum = 7 + 176 + 256 = 439, so 1B7 (hex) = 439 (decimal).
Q16. Explain the Sum-of-Weights method with an example for octal to decimal conversion. (5 marks)
Each octal digit is multiplied by its weight (a power of 8 depending on its position, starting from 8^0 at the right) and the products are added.
Example: convert 345 (octal) to decimal.
| Digit | Weight | Product |
|---|---|---|
| 5 | 8^0 = 1 | 5 x 1 = 5 |
| 4 | 8^1 = 8 | 4 x 8 = 32 |
| 3 | 8^2 = 64 | 3 x 64 = 192 |
Sum = 5 + 32 + 192 = 229, so 345 (octal) = 229 (decimal).
Q17. Briefly state the basic principle of the Repeated Division-by-2 method. (1 marks)
To convert a decimal integer to binary, divide the number repeatedly by 2 and note each remainder, until the quotient becomes 0. The remainders, read from the last one (MSB) to the first one (LSB), form the binary number. Example: 25 gives remainders 1, 0, 0, 1, 1, so 25 = 11001.
Q18. Briefly state the basic principle of the Repeated Multiplication-by-2 method. (1 marks)
It is used to convert a decimal fraction to binary. The fraction is multiplied by 2; the integer part (0 or 1) of the result is noted, and the remaining fraction is multiplied by 2 again. This is repeated until the fraction becomes 0. The integer digits, read from top to bottom, form the binary fraction. Example: 0.625 x 2 = 1.25 (1), 0.25 x 2 = 0.5 (0), 0.5 x 2 = 1.0 (1), so 0.625 = 0.101.
Q19. Add -13 and +7 by converting them into binary. Your result must be in binary. (3 marks)
Use 8-bit 2's complement numbers.
- +13 = 00001101; its 1's complement is 11110010; adding 1 gives 11110011, so -13 = 11110011.
- +7 = 00000111.
11110011 (-13) + 00000111 (+7) -------- 11111010
The result 11111010 is negative (sign bit 1). Its magnitude is the 2's complement 00000110 = 6, so the answer is -6 = 11111010.
Q20. How can an SOP expression be converted into a POS expression? (3 marks)
For a standard (canonical) expression, the minterms present in the SOP form are exactly the ones absent from the POS form, and the other way round.
- Write the binary values (minterm numbers) of the product terms in the standard SOP expression.
- The binary values that are NOT present are the maxterms of the equivalent POS expression.
- Write a sum term for each of those values (a 0 gives the plain variable, a 1 gives the complemented variable) and multiply the sum terms.
Example: F(A,B,C) = Sum m(1,2,4,7) = Pi M(0,3,5,6) = (A+B+C)(A+B'+C')(A'+B+C')(A'+B'+C).
Q21. Write the truth tables of the NOR, NAND and XOR gates. (3 marks)
| A | B | NOR | NAND | XOR |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 |
Q22. Draw the function table of an 8-to-3 encoder (and explain it). (5 marks)
An encoder does the opposite of a decoder: exactly one of its 2^n inputs is active at a time, and the output is the binary code of that input. The 8-to-3 encoder has inputs I0 to I7 and outputs A2 A1 A0.
| Active input | A2 | A1 | A0 |
|---|---|---|---|
| I0 | 0 | 0 | 0 |
| I1 | 0 | 0 | 1 |
| I2 | 0 | 1 | 0 |
| I3 | 0 | 1 | 1 |
| I4 | 1 | 0 | 0 |
| I5 | 1 | 0 | 1 |
| I6 | 1 | 1 | 0 |
| I7 | 1 | 1 | 1 |
From the table: A2 = I4 + I5 + I6 + I7, A1 = I2 + I3 + I6 + I7, A0 = I1 + I3 + I5 + I7. So the circuit is just three 4-input OR gates (I0 needs no gate).
Q23. Explain the tri-state buffer with the help of a block diagram (and draw its circuit symbol). (5 marks)
A tri-state buffer is a NOT gate with an extra control line that can disconnect the output from the input.
control (enable)
|
input ---------|>o--------- output- When the control line is high, the buffer is enabled and works like a NOT gate (output = input').
- When the control line is low, the output is disconnected from the input and the output is in a high-impedance (third) state.
- It is used to disconnect devices that share a common output line (a bus). In a PAL the output of the OR array passes through a tri-state buffer, so the output pin can be enabled or disabled.
Q24. The control input of a tri-state buffer can be connected in four different ways. Name any three of them. (3 marks)
This answer was not found in the shared handouts; it is a model answer from the lecture idea that the control line decides whether the output is enabled:
- Connected to a fixed logic level (always enabled, or always disabled).
- Connected to an external control (enable) input pin of the device.
- Driven by the output of a product term (AND gate) from the AND array, so each output is enabled by a logic function.
- Driven by another signal or by the output of another device (for example an address decoder on a bus).
Q25. Why is a 2-bit comparator called a parallel comparator? (2 marks)
A 2-bit comparator compares all the bits of the two numbers at the same time (simultaneously), not one bit after the other, so it is called a parallel comparator. To compare larger numbers, external logic is needed to cascade two such comparators into a 4-bit comparator.
Q26. Explain at least two advantages of a circuit having low power consumption. (2 marks)
- The circuit can run from batteries instead of mains supply, so it is suitable for portable devices.
- Less heat is produced, so gates can be packed tightly to reduce circuit size without needing fans or heat sinks.
Note: TTL devices dissipate roughly constant power, while CMOS power depends on the frequency of operation.
Q27. Name the four OLMC configurations. (2 marks)
The Output Logic Macro Cell (OLMC) of a GAL can be programmed in four configurations:
- Combinational mode with active-low output
- Combinational mode with active-high output
- Registered mode with active-low output
- Registered mode with active-high output
Q28. Explain "test vector" in the context of ABEL. (3 marks)
Once the logic design has been entered, its operation is verified with test vectors. A test vector specifies the inputs and the outputs expected for them. The software simulates the circuit by applying the test vectors and checking the outputs. Test vectors are essentially a truth table; for example, the test vector for a 2-bit comparator is the same as its function table.
Q29. Once the logic circuit design has been entered, its operation is verified using test vectors. Write two major roles of test vectors. (2 marks)
- They verify (simulate) the design before it is committed to the PLD: the stated inputs are applied and the outputs are compared with the expected ones.
- If a flaw is found, the design is debugged and recompiled. Once the design is final, the tools produce a documentation file and a fuse-map file, which is downloaded to the programmer to program the PLD in its socket.
Q30. How can a PLD be programmed? (1 marks)
A PLD is programmed with the help of a computer running programming software. The computer is connected to a programmer socket in which the PLD is inserted. PLDs can also be programmed while installed on a circuit board (in-system programming).
Q31. How many input and output bits does a half-adder contain? (1 marks)
A half-adder has 2 input bits (A and B) and 2 output bits (Sum = A xor B and Carry = A.B).
Q32. Explain the difference between a 1-to-4 demultiplexer and a 2-to-4 binary decoder. (2 marks)
The two circuits are almost the same. The only difference is the extra data input line of the 1-to-4 demultiplexer: this line, which carries the data to be distributed, is used as the enable line of the 2-to-4 decoder. The two select lines choose which of the four outputs receives the data (demultiplexer) or which output becomes active (decoder).
Q33. Name the three declarations that are included in the declaration section of the module created when an ABEL input (source) file is created. (3 marks)
- Device declaration (the PLD to be programmed, e.g. 'P22V10')
- Pin declarations
- Set declarations
Q34. When an ABEL input (source) file is created, a module is created which has three sections. Name these three sections. (3 marks)
- Declarations: device, pin and set declarations.
- Logic descriptions: Boolean equations, truth tables (and the other methods of describing the logic).
- Test vectors: used to simulate the circuit and check its operation.
Q35. Explain with an example how noise affects the operation of a CMOS AND gate circuit. (5 marks)
Take two 5 V CMOS AND gates connected one after the other. Both inputs of the first gate are at logic high, so its output is guaranteed to be logic high, say 4.6 V (inside the valid VOH range of 4.4 to 5 V).
The second gate recognises any input of 3.5 V or more as logic high (VIH). If noise is added to the connecting wire, the input of the second gate becomes 4.6 V minus the noise. A noise dip of up to 0.9 V (the high-level noise margin, 4.4 V - 3.5 V) is always tolerated. With the 4.6 V output of this example even a 1.1 V dip leaves 3.5 V, which is still a valid high. A bigger dip pushes the voltage below 3.5 V, the second gate may read a low, and the circuit gives a wrong output.
That is why logic families guarantee noise margins: the output levels of one gate and the input levels expected by the next are separated by a safety band.
Q36. Explain the SOP based implementation of the adjacent 1s detector circuit. (10 marks)
The detector takes a 4-bit input ABCD. The output is 1 when two neighbouring bits are both 1, i.e. for 0011, 0110, 0111, 1011, 1100, 1101, 1110 and 1111 (minterms 3, 6, 7, 11, 12, 13, 14, 15).
Direct SOP implementation: one AND gate for each of the 8 minterms (eight 4-input AND gates), all fed into an 8-input OR gate, with inverters for the complemented literals (10 if every complemented literal is inverted separately, 4 if the inverters are shared).
Simplified using a K-map:
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 1 | 0 |
| 01 | 0 | 0 | 1 | 1 |
| 11 | 1 | 1 | 1 | 1 |
| 10 | 0 | 0 | 1 | 0 |
Groups: AB (the whole 11 row), BC (the 4 cells where B = C = 1) and CD (the 4 cells where C = D = 1). So F = AB + BC + CD.
The simplified circuit needs only three 2-input AND gates and one 3-input OR gate (four gates), so it is cheaper, smaller and uses less power. Its propagation delay is about two gate delays.
Q37. How can standard Boolean expressions be converted into truth table format? (1 marks)
Take the binary value of each term in the standard expression: each product term of a standard SOP gives an input combination where the output is 1 (all other rows are 0); each sum term of a standard POS gives an input combination where the output is 0 (all other rows are 1). A standard SOP or POS expression can likewise be read back from a truth table.
Q38. Explain the AND gate and some of its uses. (5 marks)
The AND gate gives output 1 only when all its inputs are 1; if any input is 0 the output is 0 (it performs Boolean multiplication).
| A | B | Y = A.B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
- Combining several signals: the output is TRUE only if all of them are TRUE (for example a safety interlock).
- Enabling or inhibiting a signal (one input acts as an enable).
- Building decoders, product terms of SOP expressions and counter circuits.
NAND gates are used more often in practice because they need fewer components and can also act as an inverter.
Q39. Explain the OR gate and some of its uses. (5 marks)
The OR gate gives output 1 when any one or more of its inputs is 1; the output is 0 only when all inputs are 0 (it performs Boolean addition).
| A | B | Y = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
- Combining several signals: the output is TRUE if any of them is TRUE (for example an alarm triggered by any sensor).
- Summing the product terms of an SOP expression.
- Combining the outputs of multiplexers and encoders.
NOR gates are used more often in practice because they need fewer components and can also act as an inverter.
Q40. Write down different situations where we need sequential circuits. (2 marks)
Digital circuits that use memory elements, so that the output depends on the present input and also on previously stored information, are sequential circuits. They are needed wherever something has to be remembered or counted:
- Counters and timers (for example a counter that counts down from 10 to 0 and then switches off a washing machine or microwave oven).
- Storing data: registers and memory.
- Digital clocks and watches, traffic-light controllers and other state-based control systems.
- Synchronising operations with a clock.
Q41. Which device performs an operation that is the opposite of the decoder function? (1 marks)
The encoder. A decoder activates one of its outputs for a binary input code, whereas an encoder accepts an active level on one of its inputs and generates the matching binary (or BCD) code at its output.
Q42. Write the uses of a multiplexer. (2 marks)
A multiplexer (data selector) is a digital switch with several inputs and one output. Uses:
- Selecting and routing data from many sources to one destination, for example sending the contents of one of several registers to the ALU inputs.
- Parallel-to-serial conversion of data.
- Combining many audio signals onto one line in the telephone network (time-division multiplexing).
- Row and column addressing of dynamic memory over the same address lines.
- Implementing logic functions (logic function generator).
Q43. Write any two advantages of Boolean expressions. (2 marks)
- The function and operation of a logic circuit can be determined from its Boolean expression without building the circuit.
- Large and complex circuits can be simplified with Boolean expressions, giving an equivalent circuit with fewer gates that performs the same function.
Q44. Explain the implementation of an odd-parity generator circuit by drawing its function table, mapping it to a K-map and simplifying the expression. (10 marks)
The odd-parity generator output P is chosen so that the total number of 1s in ABCD plus P is odd. So P = 1 when ABCD contains an even number of 1s.
| ABCD | P | ABCD | P |
|---|---|---|---|
| 0000 | 1 | 1000 | 0 |
| 0001 | 0 | 1001 | 1 |
| 0010 | 0 | 1010 | 1 |
| 0011 | 1 | 1011 | 0 |
| 0100 | 0 | 1100 | 1 |
| 0101 | 1 | 1101 | 0 |
| 0110 | 1 | 1110 | 0 |
| 0111 | 0 | 1111 | 1 |
K-map (rows AB, columns CD):
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 1 | 0 |
| 01 | 0 | 1 | 0 | 1 |
| 11 | 1 | 0 | 1 | 0 |
| 10 | 0 | 1 | 0 | 1 |
The 1s form a checkerboard, so no two 1s are adjacent and the K-map gives no grouping: the SOP form needs eight 4-literal product terms. The pattern is the XNOR/XOR pattern, so the expression is simplified with XOR gates:
P = (A xor B xor C xor D)' = (A xor B) xnor (C xor D)
The circuit needs just two XOR gates (A xor B, C xor D) and one XNOR gate.
Q45. Explain the operation of the odd-parity generator circuit with the help of a timing diagram. (5 marks)
The circuit has two XOR gates (A xor B and C xor D) whose outputs go to an XNOR gate that gives P. The timing diagram shows the 4-bit data ABCD changing in successive intervals:
| Interval | ABCD | XOR outputs | P (XNOR) |
|---|---|---|---|
| t0 | 0000 | 0, 0 | 1 |
| t1 | 0001 | 0, 1 | 0 |
| t2 | 0010 | 0, 1 | 0 |
| t3 | 0011 | 0, 0 | 1 |
| t4 | 0100 | 1, 0 | 0 |
The XNOR output is 1 when the two XOR outputs are equal, which happens exactly when the data has an even number of 1s. Adding P makes the total number of 1s odd in every interval.
Q46. What is an 8-bit adder/subtracter circuit and what does it do? (3 marks)
Two 4-bit 74LS283 adders are cascaded to form an 8-bit parallel adder: the carry out of the lower adder is connected to the carry in of the upper adder. Each adder's B inputs pass through a 1's complement circuit (XOR gates or AND-OR gates) controlled by an Add/Subtract select input:
- Add/Subtract = 0: B passes unchanged and the circuit adds A + B.
- Add/Subtract = 1: B is complemented and the same select line is connected to the carry-in of the first adder (adding 1), so the circuit computes A + B' + 1 = A - B using 2's complement.
Q47. Draw the function table of a 3-to-8 decoder. (3 marks)
The 74XX138 3-to-8 decoder has three inputs (A2 A1 A0) and eight active-low outputs. It also has three enable inputs (one active-high and two active-low) that must all be active for the decoder to work.
| A2 | A1 | A0 | Active (low) output |
|---|---|---|---|
| 0 | 0 | 0 | Y0 |
| 0 | 0 | 1 | Y1 |
| 0 | 1 | 0 | Y2 |
| 0 | 1 | 1 | Y3 |
| 1 | 0 | 0 | Y4 |
| 1 | 0 | 1 | Y5 |
| 1 | 1 | 0 | Y6 |
| 1 | 1 | 1 | Y7 |
The selected output goes to 0 and all others stay at 1. If the enables are not all active, every output stays 1.
Q48. How many possible outputs does a decoder of 3 inputs contain? (2 marks)
A decoder with n inputs has 2^n outputs, so a 3-input decoder has 2^3 = 8 outputs (a 3-to-8 decoder).
Q49. How can we use a 3-to-8 decoder to implement SOP expressions? (2 marks)
A 3-to-8 decoder generates all eight minterms of three variables, one on each output. To implement an SOP function:
- Connect the three variables A, B, C to the decoder inputs and enable the decoder.
- Take the outputs that correspond to the minterms present in the expression. The 74XX138 outputs are active-low, so feed these outputs into a NAND gate (a NAND of active-low terms gives the OR of the minterms).
Example: F(A,B,C) = Sum m(1,2,4,7) = NAND(Y1, Y2, Y4, Y7). For a POS expression, an AND gate of the active-low outputs of the maxterms is used.
Q50. Describe a 16-bit ALU. (5 marks)
A 16-bit ALU is built by cascading four 4-bit ALUs. Each 4-bit ALU has a built-in look-ahead carry generator that removes the delay of the carry rippling through its parallel adder. However, when several 4-bit units are cascaded, the carry out of one unit still ripples into the next one, so the carry out of the last (most significant) unit is delayed. For large ALUs this delay is large. The 74XX181 and 74XX381 ICs avoid the problem by providing group carry look-ahead.
Q51. Draw the block diagram of a 4-bit BCD adder. (3 marks)
A BCD adder adds two BCD digits and gives a BCD result. It uses two 4-bit binary adders and a correction circuit:
A3..A0 --+--> [ 4-bit adder 1 ] --> S3 S2 S1 S0 (binary sum) Cin
B3..B0 --+ |
v K = Cout1 + S3.S2 + S3.S1
[ 4-bit adder 2 ] adds 0 K K 0 (0110) when K = 1
|
BCD sum Z3..Z0, carry out = KIf the binary sum is 9 or less and there is no carry, K = 0 and the sum is already valid BCD. If the sum is invalid (1010 to 1111) or a carry is produced, K = 1 and 0110 is added to correct it.
Q52. Consider a logic circuit for a 4-bit binary number ABCD. The circuit gives output 0 for adjacent 0s in the number. Draw the Karnaugh map of the circuit and derive the simplified POS expression. (5 marks)
The output F is 0 when two neighbouring bits are both 0, i.e. when A=B=0, B=C=0 or C=D=0. This gives F = 0 for minterms 0, 1, 2, 3, 4, 8, 9 and 12, and F = 1 for the rest.
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | 0 |
| 01 | 0 | 1 | 1 | 1 |
| 11 | 0 | 1 | 1 | 1 |
| 10 | 0 | 0 | 1 | 1 |
Grouping the 0s: AB = 00 (row 00) gives (A + B); BC = 00 (cells 0, 1, 8, 9) gives (B + C); CD = 00 (column 00, cells 0, 4, 8, 12) gives (C + D).
F = (A + B)(B + C)(C + D)
Q53. Map the following POS expression on a Karnaugh map: (A'+B'+C+D)(A'+B+C'+D')(A+B+C'+D)(A'+B'+C'+D')(A+B+C'+D') (5 marks)
Each sum term gives one 0 on the map: set the variables that make the term 0 (plain variable = 0, complemented variable = 1).
- (A'+B'+C+D): A=1, B=1, C=0, D=0 = 1100 = cell 12
- (A'+B+C'+D'): 1011 = cell 11
- (A+B+C'+D): 0010 = cell 2
- (A'+B'+C'+D'): 1111 = cell 15
- (A+B+C'+D'): 0011 = cell 3
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 1 | 0 (m3) | 0 (m2) |
| 01 | 1 | 1 | 1 | 1 |
| 11 | 0 (m12) | 1 | 0 (m15) | 1 |
| 10 | 1 | 1 | 0 (m11) | 1 |
All other cells are 1. For reference, grouping the 0s gives F = (A+B+C')(A'+C'+D')(A'+B'+C+D).
Q54. Using a Karnaugh map, minimise the following POS expression: (B+C+D)(A+B+C'+D)(A'+B+C+D')(A+B'+C+D)(A'+B'+C+D) (5 marks)
Find the cells where each sum term is 0:
- (B+C+D): B=C=D=0 (A can be 0 or 1) = cells 0 and 8
- (A+B+C'+D): 0010 = cell 2
- (A'+B+C+D'): 1001 = cell 9
- (A+B'+C+D): 0100 = cell 4
- (A'+B'+C+D): 1100 = cell 12
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 1 | 1 | 0 |
| 01 | 0 | 1 | 1 | 1 |
| 11 | 0 | 1 | 1 | 1 |
| 10 | 0 | 0 | 1 | 1 |
Groups of 0s: the column CD = 00 (cells 0, 4, 8, 12) gives (C + D); cells 0 and 2 (A=0, B=0, D=0) give (A + B + D); cells 8 and 9 (A=1, B=0, C=0) give (A' + B + C).
F = (C + D)(A + B + D)(A' + B + C)
Q55. Derive the simplified Boolean equation from a Karnaugh map in which cells m3, m7, m11, m13, m14 and m15 contain 1. (3 marks)
The function is F(A,B,C,D) = Sum m(3, 7, 11, 13, 14, 15). (The cells are read from the quiz figure.)
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 1 | 0 |
| 01 | 0 | 0 | 1 | 0 |
| 11 | 0 | 1 | 1 | 1 |
| 10 | 0 | 0 | 1 | 0 |
- Column CD = 11 (cells 3, 7, 11, 15): CD
- Cells 13 and 15 (A=1, B=1, D=1): ABD
- Cells 14 and 15 (A=1, B=1, C=1): ABC
F = CD + ABD + ABC
Q56. Simplify the following Boolean expressions using Boolean algebraic rules: (i) (A+B)(A+B') (ii) (A+B)'(A'+B')' (5 marks)
(i) (A+B)(A+B') = A + BB' (distributive law) = A + 0 = A
(ii) By De Morgan's theorem (A+B)' = A'B' and (A'+B')' = AB. So the expression is A'B'.AB = (A'A)(B'B) = 0 . 0 = 0
Q57. Multiplexers can be used as a "Logic Function Generator". Draw only the circuit diagram and function table based on three variables. (5 marks)
An 8-to-1 multiplexer has 3 select inputs (S2 S1 S0) and 8 data inputs (I0 to I7). If A, B, C are applied to the select inputs, each data input corresponds to one minterm, so any 3-variable function can be produced by tying each data input to 1 or 0 as the truth table requires.
Example: F(A,B,C) = Sum m(1, 2, 4, 7).
| A | B | C | F | Data input |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | I0 = 0 |
| 0 | 0 | 1 | 1 | I1 = 1 |
| 0 | 1 | 0 | 1 | I2 = 1 |
| 0 | 1 | 1 | 0 | I3 = 0 |
| 1 | 0 | 0 | 1 | I4 = 1 |
| 1 | 0 | 1 | 0 | I5 = 0 |
| 1 | 1 | 0 | 0 | I6 = 0 |
| 1 | 1 | 1 | 1 | I7 = 1 |
+-------------+
0 -- I0 | |
1 -- I1 | |
1 -- I2 | 8-to-1 |
0 -- I3 | MUX |---- F
1 -- I4 | |
0 -- I5 | |
0 -- I6 | |
1 -- I7 | |
+--S2-S1-S0---+
A B CThe select inputs are driven by the input variables, and the multiplexer output is the function F.
Q58. What are PLDs? How are they classified? (5 marks)
Programmable logic devices (PLDs) are ICs containing arrays of AND and OR gates that the user programs to implement a required logic function. They replace many SSI and MSI chips, saving board space and reducing the number of devices in a design.
- PROM: fixed AND array (a decoder) and programmable OR array.
- PLA (Programmable Logic Array): programmable AND and OR arrays.
- PAL (Programmable Array Logic): programmable AND array and fixed OR array; programmed by blowing fuses.
- GAL (Generic Array Logic): like a PAL but reprogrammable (E2CMOS technology) with programmable output logic macro cells (OLMCs).
Q59. Draw the function table of a half-adder circuit. (2 marks)
A half-adder adds two 1-bit numbers A and B. It has 2 inputs and 2 outputs: Sum = A XOR B and Carry = A.B.
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Q60. What is the difference between a BCD-to-decimal decoder and a binary 4-to-16 decoder? (2 marks)
The operation is the same. The only difference is that the BCD-to-decimal decoder has ten output pins instead of sixteen, and its input is a valid BCD number (0000 to 1001). The six invalid codes 1010 to 1111 do not activate any output.
Q61. Explain the BCD-to-decimal decoder. (3 marks)
It has 4 inputs (a BCD digit) and 10 outputs, one for each decimal digit 0 to 9. For a valid BCD input exactly one output is activated, the one whose number equals the decimal value of the input. It works like a binary 4-to-16 decoder with only ten outputs.
The invalid BCD codes 1010, 1011, 1100, 1101, 1110 and 1111 do not activate any of the ten outputs.
Q62. Explain the major uses of decoder circuits. (3 marks)
Decoders have two major uses in computer systems:
- Selection of peripheral devices and memory: a computer has many internal and external devices (hard disk, CD drive, modem, printer, memory chips). Each is selected by a different code, and a decoder (address decoder) turns that code into a single select line that enables the right device.
- Instruction decoder: a program is a sequence of instruction codes. The hardware decodes each code to find which operation must be carried out and activates the corresponding control line.
Q63. PALs come in different configurations and are identified by a unique number. Identify the parts of this number. (5 marks)
A PAL part number is built as: PAL + (number of inputs) + (output type letter) + (number of outputs), optionally followed by suffixes.
- The prefix PAL.
- Two digits: the number of inputs.
- A letter: L = active-low outputs, H = active-high outputs, P = programmable polarity.
- One or two digits: the number of outputs.
- Optional suffixes giving the speed, package type and temperature range.
Example: PAL16L8 = a PAL with 16 inputs, active-low outputs and 8 outputs.
Q64. Draw the function table of a 2-to-4 decoder. (2 marks)
A 2-to-4 decoder has two inputs (I1, I0) and four outputs (O0 to O3). Exactly one output is 1 for each input combination (active-high outputs shown).
| I1 | I0 | O0 | O1 | O2 | O3 |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 |
Q65. Explain the 8-input multiplexer with the help of a circuit diagram and function table. (5 marks)
An 8-input (8-to-1) multiplexer has eight data inputs D0 to D7, three select lines S2 S1 S0 and one output Y. The select lines choose which data input is passed to the output.
| S2 | S1 | S0 | Output Y |
|---|---|---|---|
| 0 | 0 | 0 | D0 |
| 0 | 0 | 1 | D1 |
| 0 | 1 | 0 | D2 |
| 0 | 1 | 1 | D3 |
| 1 | 0 | 0 | D4 |
| 1 | 0 | 1 | D5 |
| 1 | 1 | 0 | D6 |
| 1 | 1 | 1 | D7 |
Circuit: each data input Di goes to its own 4-input AND gate together with the select lines (or their complements) that make up minterm i. The eight AND outputs are combined by an 8-input OR gate, giving Y = S2'S1'S0'D0 + S2'S1'S0D1 + ... + S2S1S0D7. Three NOT gates provide the complemented select lines.
Q66. What is meant by ABEL? (2 marks)
ABEL stands for Advanced Boolean Expression Language. It is a hardware description language used to implement logic designs in programmable logic devices (PLDs). The design is entered as Boolean equations, truth tables or state diagrams, compiled, tested with test vectors and then downloaded to the PLD.
Q67. Why is it preferable to use another method instead of a 5-variable K-map? (2 marks)
The Karnaugh map becomes difficult to manage when the number of variables exceeds four: the map has many cells, and finding redundant terms is no longer obvious. The Quine-McCluskey method is better here: it is an exhaustive tabular search in which each minterm is compared with every other minterm to remove single variables, and it can be programmed on a computer.
Q68. Draw the circuit diagram of a 2-input, 8-bit multiplexer. (3 marks)
Use two 74X157 chips (each is a 2-input, 4-bit multiplexer). Connections:
- Chip 1 handles bits 0 to 3 and chip 2 handles bits 4 to 7.
- Data inputs: A0 to A7 go to the 1A inputs of the two chips (4 bits each) and B0 to B7 go to the 1B inputs.
- Both chips share the same select line S (and the same enable line), so S = 0 passes the A byte and S = 1 passes the B byte.
- The four outputs of each chip together form the 8-bit output Y0 to Y7.
Q69. Write the uses of a demultiplexer. (5 marks)
A demultiplexer connects one source to many destinations. Two common uses:
- Routing the ALU output to registers: the ALU output is connected to the data input of the demultiplexer and each demultiplexer output goes to one register. The select lines decide which register stores the result.
- Reconstruction of parallel data from serial data: a serial stream is applied to the data input while a counter drives the select lines, so each bit is sent to a different output and the bits appear together as parallel data.
- It is also available as a decoder/demultiplexer chip that can be configured as either one.
Q70. What is a two-bit comparator? Explain with at least one example. (3 marks)
A 2-bit comparator compares two 2-bit numbers A (A1A0) and B (B1B0). It has three outputs: A > B, A = B and A < B. Exactly one of them is 1 for any input.
Example: A = 10 (decimal 2) and B = 01 (decimal 1). Then A > B = 1, A = B = 0 and A < B = 0.
Q71. Define a decoder. (2 marks)
A decoder has multiple inputs and multiple outputs. It accepts a multi-bit code at its inputs and activates one (or more) of its outputs to indicate that this code is present. An n-to-2^n decoder activates exactly one of its 2^n outputs.
Q72. Why must the S and R inputs of a NAND-based S-R latch not be applied together in the invalid combination? (2 marks)
The NAND-based S-R latch has active-low inputs. When S = 0 and R = 0 together, both NAND outputs are forced to 1, so Q and Q' are both 1. This breaks the rule that the two outputs are complements, and when the inputs return to 1 together the final state cannot be predicted. So S = R = 0 is the invalid state and must be avoided.
Note: this question is often recalled as 'logic high'. For the NAND latch the forbidden state is both inputs LOW; both inputs HIGH is the hold (no change) state. For the NOR latch it is the other way round: both inputs HIGH is forbidden.
Q73. Why are two 4-bit parallel adders required to add two BCD digits? (2 marks)
The first 4-bit adder adds the two BCD digits (and the carry from the previous digit). The result is a valid BCD digit only if it is 9 or less with no carry. If the sum is greater than 1001 or a carry is produced, the digit is invalid and 0110 (6) must be added to correct it. The second 4-bit adder adds this correction, and the carry goes to the next digit.
Example: 8 + 5. First adder: 1000 + 0101 = 1101 (13, invalid). Second adder: 1101 + 0110 = 1 0011, that is BCD 0001 0011 = 13.
Q74. Write down the hexadecimal equivalent of each binary number: (a) 10001001 (b) 001001111000 (c) 000101010111 (3 marks)
Group the bits in fours from the right and replace each group with its hex digit.
| Binary | Groups of 4 | Hex |
|---|---|---|
| 10001001 | 1000 1001 | 89 |
| 001001111000 | 0010 0111 1000 | 278 |
| 000101010111 | 0001 0101 0111 | 157 |
Q75. How many inputs and outputs does the GAL16V8 have? (3 marks)
The GAL16V8 is a 20-pin device. It has 8 dedicated input pins and 8 pins that can be used as inputs or outputs (through the output logic macro cells), so it can have up to 16 inputs and up to 8 outputs. The name says it: 16 = maximum inputs, V = variable output type, 8 = number of outputs.
Q76. What is the difference between a BCD-to-7-segment decoder and a binary decoder? (3 marks)
- BCD-to-7-segment decoder: 4 inputs (a BCD digit) and 7 outputs (segments a to g). Several outputs are active together to light the segments that form the digit, and invalid BCD codes are not used.
- Binary decoder (n-to-2^n): n inputs and 2^n outputs, and only one output is active for each input code.
Q77. Briefly explain floating-point numbers. (3 marks)
Floating-point notation represents very large and very small numbers using a sign, a mantissa (the significant digits) and an exponent (the power of the base). Example: 723 = 7.23 x 10^2, with mantissa 7.23 and exponent 2.
In the IEEE 754 standard a single-precision number uses 32 bits (1 sign bit, 8 exponent bits, 23 mantissa bits) and a double-precision number uses 64 bits (1, 11 and 52 bits).
Q78. Why do we use BCD? (2 marks)
BCD (Binary Coded Decimal) encodes each decimal digit separately with 4 bits, so numbers are converted to and from decimal very easily without long arithmetic. This is ideal for devices that show decimal digits, such as calculators, digital clocks and meters. Its drawbacks are that it needs more bits than pure binary and that BCD addition needs a correction step.
Q79. What is the difference between a NAND-based and a NOR-based S-R latch? (2 marks)
| NAND latch | NOR latch | |
|---|---|---|
| Active inputs | Active-LOW | Active-HIGH |
| Set (Q = 1) | S = 0, R = 1 | S = 1, R = 0 |
| Reset (Q = 0) | S = 1, R = 0 | S = 0, R = 1 |
| No change | S = 1, R = 1 | S = 0, R = 0 |
| Invalid | S = 0, R = 0 | S = 1, R = 1 |
Q80. How can an adder circuit be used to perform subtraction? (2 marks)
Subtraction is done by adding the 2's complement: A - B = A + (2's complement of B) = A + B' + 1. The bits of B are inverted (1's complement) and 1 is added as the carry-in.
Example (4-bit): 7 - 3. B = 0011, B' = 1100. 0111 + 1100 + 1 = 1 0100. The carry-out is discarded, so the result is 0100 = 4.
In hardware, XOR gates on the B inputs invert B when a SUB control is 1, and the same SUB signal is connected to the carry-in. This gives an adder/subtracter.
Q81. Which gate can be used as a comparator? (1 marks)
The XNOR gate. Its output is 1 when its two inputs are equal, so it compares two 1-bit numbers for equality. (An XOR gate gives 1 when the inputs differ.) A 2-bit equality check uses two XNOR gates followed by an AND gate.
Q82. For a two-bit comparator circuit, specify all the inputs for which the output A = B is set to zero. (3 marks)
A = B is 1 only for 00 00, 01 01, 10 10 and 11 11. It is 0 for the remaining 12 input combinations (A B):
00 01, 00 10, 00 11, 01 00, 01 10, 01 11, 10 00, 10 01, 10 11, 11 00, 11 01, 11 10.
Q83. Draw the circuit diagram of a NAND-based S-R latch. (3 marks)
Two NAND gates are cross-coupled:
- Gate 1 inputs: S and Q'. Its output is Q.
- Gate 2 inputs: R and Q. Its output is Q'.
- The output of each gate is fed back to an input of the other gate.
The inputs S and R are active-low: S = 0 sets the latch (Q = 1), R = 0 resets it (Q = 0), S = R = 1 holds the state, and S = R = 0 is invalid.
Q84. Draw the block diagram of a PAL. (3 marks)
Signal flow of a PAL, from left to right:
- Inputs pass through input buffers that give each input in true and complemented form.
- A programmable AND array: every product term can connect to any input line through a fuse (blown fuses remove a connection).
- A fixed OR array: each output OR gate collects a fixed group of product terms.
- Output stage (buffer, optionally a tri-state buffer or an inverter) gives the outputs.
So a PAL = programmable AND array + fixed OR array.
Q85. State whether the expression (A+C).(C+D).(B+C+D) is SOP or POS. (2 marks)
It is a POS (product of sums) expression: it is a product (AND) of sum (OR) terms. Since not every term contains all the variables, it is a non-standard POS.
Part 3: Short Notes & Key Terms
- ABEL
- Advanced Boolean Expression Language: a language used to describe logic for programming simple PLDs.
- Adder
- A digital circuit that forms the sum and carry of two or more binary numbers.
- Analog
- A signal or quantity that varies continuously, unlike a digital signal that has discrete levels.
- Binary Coded Decimal (BCD)
- A code in which each decimal digit 0 to 9 is written with its own four bits (8-4-2-1 weights).
- Bistable
- A circuit with two stable states; the simplest one is the S-R latch.
- CMOS
- Complementary metal-oxide semiconductor: a logic technology with high integration and very low power dissipation.
- Combinational logic
- Logic whose output depends only on the present inputs; it has no memory elements.
- Comparator
- A circuit that compares two binary numbers and indicates whether A > B, A = B or A < B.
- Decoder
- A circuit that uses a binary code to activate one of several outputs.
- Demultiplexer
- The opposite of a multiplexer: one data input is routed to one of several outputs (also called a data distributor).
- Encoder
- A circuit that converts an active input line into its binary (or BCD) code; the opposite of a decoder.
- Excess-8 code
- A signed code in which 8 is added to the number, so the range is +7 to -8 and -8 is represented as 0000.
- Fan-out
- The number of gate inputs (unit loads) that the output of a gate can drive.
- GAL
- Generic Array Logic: a reprogrammable PLD (E2CMOS) with a programmable AND array, fixed OR array and output logic macro cells.
- Gray code
- A code in which successive numbers differ in only one bit; the Gray code of decimal 8 is 1100.
- Half-adder
- Adds two bits and gives a sum (A xor B) and a carry (A.B); it cannot accept a carry input.
- Full adder
- Adds two bits and an input carry: 3 inputs and 2 outputs (sum and carry out).
- Karnaugh map
- A grid of cells, one per input combination, used to simplify Boolean expressions systematically by grouping adjacent 1s (SOP) or 0s (POS).
- Latch
- A bistable circuit that stores one bit and holds its state until its inputs change.
- Mantissa
- The magnitude (fraction) part of a floating-point number; it is 23 bits in the IEEE 754 single-precision format.
- Multiplexer
- A digital switch with several inputs and one output that selects one input under the control of select lines (a data selector).
- NAND / NOR gate
- Universal gates: NAND is AND followed by NOT, NOR is OR followed by NOT. Either can build any logic function.
- OLMC
- Output Logic Macro Cell: the programmable output cell of a GAL that can be set to combinational or registered, active-high or active-low.
- Overflow
- The condition in which a result exceeds the specified range (number of bits) and cannot be represented correctly.
- PAL
- Programmable Array Logic: a PLD with a programmable AND array and a fixed OR array.
- Parity bit
- An extra bit added to a group of bits so that the total number of 1s is even (even parity) or odd (odd parity) for error detection.
- PLA
- Programmable Logic Array: a PLD with both programmable AND and OR arrays.
- PROM
- Programmable Read-Only Memory: a fixed AND array (decoder) with a programmable OR array.
- POS (product of sums)
- A Boolean expression written as sum terms multiplied together, e.g. (A+B)(A'+C).
- SOP (sum of products)
- A Boolean expression written as product terms added together, e.g. AB + A'C.
- Quine-McCluskey method
- A tabular method of simplifying Boolean expressions, suited to more than four variables.
- Sequential circuit
- A circuit that contains memory elements so its output depends on past as well as present inputs.
- Sum-of-weights method
- Converts a number to decimal by multiplying each digit by the weight of its position and adding the results.
- Test vector
- In ABEL, a table of inputs and expected outputs used to simulate and verify a logic design.
- Tri-state buffer
- A buffer (NOT gate) with a control line; when disabled, its output is in a high-impedance state, as if disconnected.
- TTL
- Transistor-transistor logic: a bipolar logic family that works from a +5 V supply.
- Truth table
- A table listing every combination of input values with the output value for each.
- Universal gate
- A gate (NAND or NOR) that can be used on its own to implement any logic function.
- Weight
- The value a digit contributes because of its position in a number (a power of the base).
- ISP (In-System Programming)
- The ability to program a PLD after it has been placed on the circuit board, using a standard programming interface (a 4-wire interface), so the chip need not be removed.
- Logic gate
- The basic building block of digital logic circuits; a gate produces an output that is a logic function (AND, OR, NOT and so on) of its inputs.
No comments:
Post a Comment
Please give us your feedback & help us to improve this site.