28.10.26

CS302 Midterm Past Papers: Solved MCQs and Subjective Questions (Digital Logic Design)

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.

  1. 2
  2. 5
  3. 10
  4. 16
Show answer

Answer: (b) 5

Q2. The first least significant digit in the decimal number system has

  1. position 0 and weight equal to 1
  2. position 1 and weight equal to 0
  3. position 1 and weight equal to 10
  4. 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 ____

  1. 2^4 (2 raise to power 4)
  2. 2^3 (2 raise to power 3)
  3. 2^0 (2 raise to power 0)
  4. 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. 1/2 (1 divided by 2)
  2. 1/4 (1 divided by 4)
  3. 0
  4. 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.

  1. TRUE
  2. FALSE
Show answer

Answer: (a) TRUE

Q6. The binary value "1010110" is equivalent to decimal __________

  1. 86
  2. 87
  3. 88
  4. 89
Show answer

Answer: (a) 86

Q7. The decimal equivalent of the binary number "10011" is

  1. 19
  2. 99
  3. 29
  4. None of the given options
Show answer

Answer: (a) 19

Q8. The binary value "11011" is equivalent to the hexadecimal number __________

  1. 1B
  2. 1C
  3. 1D
  4. 1E
Show answer

Answer: (a) 1B

Q9. Sum-of-Weights method is used __________

  1. to convert from one number system to other
  2. to encode data
  3. to decode data
  4. 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 ______.

  1. Minimum range value of target number system
  2. 2
  3. Base number
  4. 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. 1
  2. 7
  3. 9
  4. 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 ________

  1. 213
  2. 127
  3. 345
  4. 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?

  1. 1A
  2. 1C
  3. 1D
  4. 1B
Show answer

Answer: (b) 1C

Q14. Which of the numbers is not a valid hexadecimal number?

  1. 1234
  2. ABCD
  3. 1001
  4. DEFH
Show answer

Answer: (d) DEFH

Q15. The Extended ASCII code (American Standard Code for Information Interchange) is a _____ code

  1. 2-bit
  2. 7-bit
  3. 8-bit
  4. 16-bit
Show answer

Answer: (c) 8-bit

Q16. The Extended ASCII code represents ________ unique codes.

  1. 256
  2. 255
  3. 128
  4. 127
Show answer

Answer: (a) 256

Q17. The decimal "8" is represented as ________ using Gray code.

  1. 11
  2. 1100
  3. 1000
  4. 1010
Show answer

Answer: (b) 1100

Q18. The decimal "17" in BCD will be represented as ________

  1. 11101
  2. 11011
  3. 10111
  4. 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.

  1. 3, 7
  2. 4, 7
  3. 7, 3
  4. 7, 4
Show answer

Answer: (b) 4, 7

Q20. Consider a 7-segment display. Which segments will be ON for the digit 1?

  1. b, c
  2. a, b
  3. a, b, c
  4. b, c, d
Show answer

Answer: (a) b, c

Q21. A decimal-to-BCD encoder has ________ outputs.

  1. 2
  2. 4
  3. 10
  4. 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 ________

  1. Parity bit is not needed in this case.
  2. Both "0" and "1" can be used
  3. "0"
  4. "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 ________

  1. Overflow
  2. Carry
  3. Parity
  4. Sign value
Show answer

Answer: (a) Overflow

Q24. The range of Excess-8 code is from ______ to ______

  1. +7 to -8
  2. +8 to -7
  3. +9 to -8
  4. -9 to +8
Show answer

Answer: (a) +7 to -8

Q25. Excess-8 code assigns ______ to "-8".

  1. 1110
  2. 1100
  3. 1000
  4. 0000
Show answer

Answer: (d) 0000

Q26. In ANSI/IEEE Standard 754, the mantissa is represented by _________ bits

  1. 8-bits
  2. 16-bits
  3. 23-bits
  4. 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

  1. adding 1's complement twice
  2. adding 1 to 1's complement
  3. subtracting 1 from 1's complement.
  4. 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 __________

  1. 100110
  2. 011011
  3. 100111
  4. 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

  1. 1101
  2. 1011
  3. 0101
  4. 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 _____________

  1. 1010
  2. 1110
  3. 1011
  4. 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 _____________

  1. 0111
  2. 1111
  3. 1001
  4. 0110
Show answer

Answer: (c) 1001

Q32. 2's complement of the hexadecimal number B70A is

  1. B70B
  2. B709
  3. 48F6
  4. 48F5
Show answer

Answer: (c) 48F6
Why: 1's complement = 48F5; add 1 = 48F6.

Q33. The difference 111 - 001 equals

  1. 100
  2. 111
  3. 001
  4. 110
Show answer

Answer: (d) 110

Q34. An adder circuit can be used to perform the subtraction operation.

  1. True
  2. False
Show answer

Answer: (a) True

Q35. The three fundamental gates are ____________

  1. AND, NAND, XOR
  2. OR, AND, NAND
  3. NOT, NOR, XOR
  4. NOT, OR, AND
Show answer

Answer: (d) NOT, OR, AND

Q36. The AND gate performs a logical __________ function

  1. Addition
  2. Subtraction
  3. Multiplication
  4. Division
Show answer

Answer: (c) Multiplication

Q37. The OR gate performs Boolean ___________.

  1. multiplication
  2. subtraction
  3. division
  4. addition
Show answer

Answer: (d) addition

Q38. The output of an AND gate is one when _______

  1. All of the inputs are one
  2. Any of the inputs is one
  3. Any of the inputs is zero
  4. All the inputs are zero
Show answer

Answer: (a) All of the inputs are one

Q39. A NAND gate's output is LOW if

  1. all inputs are LOW
  2. all inputs are HIGH
  3. any input is LOW
  4. any input is HIGH
Show answer

Answer: (b) all inputs are HIGH

Q40. A NOR gate's output is HIGH if

  1. all inputs are HIGH
  2. any input is HIGH
  3. any input is LOW
  4. all inputs are LOW
Show answer

Answer: (d) all inputs are LOW

Q41. NOR gate is formed by connecting _________

  1. OR gate and then NOT gate
  2. NOT gate and then OR gate
  3. AND gate and then OR gate
  4. 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.

  1. TRUE
  2. 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?

  1. Zero
  2. One
  3. Undefined
  4. 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.

  1. Undefined
  2. One
  3. Zero
  4. 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.)

  1. Undefined
  2. One
  3. Zero
  4. 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.

  1. OR
  2. AND
  3. NOT
  4. NAND
Show answer

Answer: (a) OR

Q47. A quantity having continuous values is a/an ______ quantity.

  1. digital
  2. binary
  3. analog
  4. natural
Show answer

Answer: (c) analog

Q48. TTL based devices work with a DC supply of ____ volts.

  1. +10
  2. +5
  3. +3
  4. 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.

  1. 3.5 to 5
  2. 4.5 to 5
  3. 0 to 5
  4. 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 _____________

  1. 0.3 V
  2. 0.5 V
  3. 0.9 V
  4. 3.3 V
Show answer

Answer: (c) 0.9 V

Q51. One advantage TTL has over CMOS is that TTL is

  1. less expensive
  2. not sensitive to electrostatic discharge
  3. faster
  4. more widely available
Show answer

Answer: (b) not sensitive to electrostatic discharge

Q52. Fan-out is specified in terms of

  1. voltage
  2. current
  3. watt
  4. unit loads
Show answer

Answer: (d) unit loads

Q53. Generally, the power dissipation of _______ devices remains constant throughout their operation.

  1. TTL
  2. CMOS 3.5 series
  3. CMOS 5 series
  4. Power dissipation of all circuits increases with time.
Show answer

Answer: (a) TTL

Q54. Which one is true?

  1. Power consumption of TTL is higher than of CMOS
  2. Power consumption of CMOS is higher than of TTL
  3. Both TTL and CMOS have the same power consumption
  4. 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.

  1. Low switching speeds, high power dissipation
  2. Fast switching speeds, high power dissipation
  3. Fast switching speeds, very low power dissipation
  4. Low switching speeds, very low power dissipation
Show answer

Answer: (c) Fast switching speeds, very low power dissipation

Q56. "74ALS" stands for

  1. Advanced Low-frequency Schottky TTL
  2. Advanced Low-dissipation Schottky TTL
  3. Advanced Low-Power Schottky TTL
  4. 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.

  1. True
  2. False
Show answer

Answer: (a) True

Q58. Systems having memory elements are called ______ circuits.

  1. Simplex
  2. Combinational
  3. Sequential
  4. Quadrantal
Show answer

Answer: (c) Sequential

Q59. Sequential circuits have storage elements.

  1. True
  2. False
Show answer

Answer: (a) True

Q60. The complement of a variable is always

  1. 1
  2. 0
  3. The inverse of the variable
  4. 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?

  1. A + 1 = 1
  2. A + A = A
  3. A.A = A
  4. 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?

  1. A = A'
  2. AA = A
  3. A + 1 = 1
  4. A + 0 = A
Show answer

Answer: (a) A = A'

Q63. The expression _________ is an example of the Commutative Law for Multiplication.

  1. AB+C = A+BC
  2. A(B+C) = B(A+C)
  3. AB = BA
  4. A+B = B+A
Show answer

Answer: (c) AB = BA

Q64. A.(B.C) = (A.B).C is an expression of __________

  1. De Morgan's Law
  2. Distributive Law
  3. Commutative Law
  4. Associative Law
Show answer

Answer: (d) Associative Law

Q65. A.(B + C) = A.B + A.C is the expression of _________________

  1. De Morgan's Law
  2. Commutative Law
  3. Distributive Law
  4. Associative Law
Show answer

Answer: (c) Distributive Law

Q66. According to De Morgan's theorem: (A+B+C)' = ______________

  1. A.B.C
  2. A+(B.C)'
  3. A'.B'.C'
  4. A.B'+C
Show answer

Answer: (c) A'.B'.C'

Q67. (A+B).(A+C) = ___________

  1. B+C
  2. A+BC
  3. AB+C
  4. AC+B
Show answer

Answer: (b) A+BC

Q68. The Boolean expression A + BC equals

  1. (A' + B)(A' + C)
  2. (A + B)(A + C)
  3. (A + B)(A' + C)
  4. none of the above
Show answer

Answer: (b) (A + B)(A + C)

Q69. A + A'B = ________

  1. A
  2. B
  3. A.B
  4. A+B
Show answer

Answer: (d) A+B

Q70. A product term is 0 when ______________

  1. Any of the literals is 1
  2. At least two literals are 1
  3. All the literals are 1
  4. Any of the literals is 0
Show answer

Answer: (d) Any of the literals is 0

Q71. The Boolean expression AB'CD' is

  1. a sum term
  2. a product term
  3. a literal term
  4. always 1
Show answer

Answer: (b) a product term

Q72. The Boolean expression A + B' + C is

  1. a sum term
  2. a literal term
  3. a product term
  4. a complemented term
Show answer

Answer: (a) a sum term

Q73. The Boolean expression X = AB + CD represents

  1. two ORs ANDed together
  2. a 4-input AND gate
  3. two ANDs ORed together
  4. an exclusive-OR
Show answer

Answer: (c) two ANDs ORed together

Q74. A logic circuit with output X = A'BC + AB' consists of ________.

  1. two AND gates, two OR gates, two inverters
  2. three AND gates, two OR gates, one inverter
  3. two AND gates, one OR gate, two inverters
  4. 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

  1. three AND gates and three inverters
  2. three AND gates and four inverters
  3. three AND gates
  4. one AND gate
Show answer

Answer: (a) three AND gates and three inverters

Q76. A'B + A'BC' + AC is an example of ________

  1. Product of sum form
  2. Sum of product form
  3. De Morgan's law
  4. Associative law
Show answer

Answer: (b) Sum of product form

Q77. An example of an SOP expression is

  1. A + B(C + D)
  2. A'B + AC' + AB'C
  3. (A' + B + C)(A + B' + C)
  4. 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 ______________

  1. Product of sum form
  2. Sum of product form
  3. De Morgan's law
  4. 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.

  1. A = 1, B = 0, C = 0, D = 0
  2. A = 1, B = 0, C = 1, D = 0
  3. A = 0, B = 1, C = 0, D = 0
  4. 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.

  1. TRUE
  2. 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.

  1. Sum
  2. Product
  3. Max
  4. Composite
Show answer

Answer: (b) Product

Q82. A standard POS form has __________ terms that have all the variables in the domain of the expression.

  1. Sum
  2. Product
  3. Min
  4. Composite
Show answer

Answer: (a) Sum

Q83. The binary values for the standard SOP expression ABCD' + A'BCD' + A'B'C'D are ___________

  1. 1110 + 0110 + 0001
  2. 1011 + 1111 + 1011
  3. 0001 + 1001 + 1110
  4. 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. (1+0+1)(0+1+0)
  2. (0+1+0)(1+0+1)
  3. (1+0+0)(0+0+1)
  4. (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.

  1. (A + B')(A' + B + C')
  2. A'BC + AB'C'
  3. (A + B' + C')(A + B + C)
  4. (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)

  1. TRUE
  2. 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

  1. F(A,B,C) = Pi M(0,3,5,6)
  2. F(A,B,C) = Summation m(0,3,5,6)
  3. 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 _____

  1. A + A' = 1
  2. A.A' = 0
  3. 1 + A = 1
  4. 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 ______________

  1. All the variables in domain of expression are present
  2. At least one variable in domain of expression is present.
  3. When one or more product terms in the expression are equal to 0.
  4. 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.

  1. SOP
  2. Boolean
  3. 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.

  1. 2
  2. 4
  3. 8
  4. 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.

  1. 0
  2. 1
  3. X (don't care condition)
  4. 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?

  1. Boolean Algebra and rules
  2. Karnaugh Map
  3. Quine-McCluskey
  4. 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.

  1. TRUE
  2. FALSE
Show answer

Answer: (a) TRUE

Q95. The 3-variable Karnaugh map (K-map) has _______ cells for minterms or maxterms.

  1. 4
  2. 8
  3. 12
  4. 16
Show answer

Answer: (b) 8

Q96. The 4-variable Karnaugh map (K-map) has _______ cells for minterms or maxterms.

  1. 4
  2. 8
  3. 12
  4. 16
Show answer

Answer: (d) 16

Q97. A 5-variable Karnaugh map has ______ cells.

  1. 16
  2. 32
  3. 64
  4. None
Show answer

Answer: (b) 32

Q98. In a 4-variable K-map, a 2-variable product term is produced by

  1. a 2-cell group of 1s
  2. an 8-cell group of 1s
  3. a 4-cell group of 1s
  4. 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. 1
  2. 2
  3. 3
  4. 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

  1. a POS expression
  2. a SOP expression
  3. a "don't care" condition
  4. AND-OR logic
Show answer

Answer: (a) a POS expression

Q101. Simplifying a POS (product of sums) expression requires the grouping of ______

  1. 0s
  2. 1s
  3. Don't care
  4. 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.

  1. A=1, B=1, C=0, D=0
  2. A=0, B=1, C=1, D=0
  3. A=0, B=0, C=1, D=1
  4. 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.

  1. 2
  2. 3
  3. 4
  4. 7
Show answer

Answer: (b) 3

Q104. The output A < B is set to 1 when the input combination is __________

  1. A=10, B=01
  2. A=11, B=01
  3. A=01, B=01
  4. 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?

  1. A > B = 1, A < B = 0, A = B = 1
  2. A > B = 0, A < B = 1, A = B = 0
  3. A > B = 1, A < B = 0, A = B = 0
  4. 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?

  1. NOR
  2. OR
  3. exclusive-OR
  4. AND
Show answer

Answer: (c) exclusive-OR

Q107. Two 2-bit comparator circuits can be connected to form a single 4-bit comparator.

  1. TRUE
  2. 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 ________

  1. Using a single comparator
  2. Using iterative circuit based comparators
  3. Connecting comparators in vertical hierarchy
  4. 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

  1. 1101
  2. 1010
  3. 0110
  4. 1011
Show answer

Answer: (b) 1010

Q110. Circuits having a bubble at their outputs are considered to have an active-low output.

  1. TRUE
  2. FALSE
Show answer

Answer: (a) TRUE

Q111. A particular half-adder has ______ inputs and ________ output(s).

  1. 3, 1
  2. 3, 2
  3. 2, 1
  4. 2, 2
Show answer

Answer: (d) 2, 2

Q112. The half-adder logic circuit contains _____ XOR gate(s).

  1. 1
  2. 2
  3. 4
  4. 6
Show answer

Answer: (a) 1

Q113. The half-adder logic circuit contains 2 XOR gates.

  1. TRUE
  2. FALSE
Show answer

Answer: (b) FALSE

Q114. A particular full adder has ______ inputs and ______ output(s).

  1. 2, 3
  2. 2, 2
  3. 3, 2
  4. 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?

  1. Sum = 0, Cout = 1
  2. Sum = 1, Cout = 0
  3. Sum = 1, Cout = 1
  4. 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

  1. Half Adder
  2. Full Adder
  3. 3-bit parallel adder
  4. 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?

  1. Sum = 0111, Cout = 0
  2. Sum = 1111, Cout = 1
  3. Sum = 1011, Cout = 1
  4. 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.

  1. 1001
  2. 0110
  3. 1111
  4. 1100
Show answer

Answer: (b) 0110

Q119. ______ single-digit BCD adders can be cascaded together to form a 2-digit BCD adder.

  1. Three
  2. Two
  3. One
  4. Four
Show answer

Answer: (b) Two

Q120. The function to be performed by the processor is selected by a set of inputs known as ________

  1. Function Select Inputs
  2. Micro Operation selectors
  3. OPCODE selectors
  4. 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?

  1. 4
  2. 3
  3. 2
  4. 1
Show answer

Answer: (c) 2

Q122. The active-high and active-low enable inputs of a 3-to-8 decoder are as follows:

  1. One active-high and the remaining two are active-low.
  2. Two active-high and the remaining one is active-low.
  3. All active high
  4. 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.

  1. TRUE
  2. 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?

  1. 2nd
  2. 3rd
  3. 4th
  4. 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.

  1. 2-to-8 encoder
  2. 4-to-16 encoder
  3. BCD-to-Decimal
  4. 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. 1
  2. 2
  3. 3
  4. 4
Show answer

Answer: (c) 3

Q127. A multiplexer circuit has _____ input(s) and _____ output(s).

  1. Single, single
  2. Single, multiple
  3. Multiple, single
  4. 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

  1. Select data from multiple sources and route it to a single destination
  2. Select data from a single source and route it to multiple destinations
  3. Select data from a single source and route to a single destination
  4. 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

  1. 4-to-2
  2. 4-to-4
  3. 8-to-1
  4. 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.

  1. 4-input, 8-bit
  2. 4-input, 16-bit
  3. 2-input, 8-bit
  4. 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

  1. AND
  2. OR
  3. NAND
  4. XOR
Show answer

Answer: (b) OR

Q132. In a 16-input multiplexer, the decoder inputs ____ and ____ enable one of the four multiplexers.

  1. C, D
  2. A, D
  3. B, C
  4. 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?

  1. OR gate
  2. XOR gate
  3. AND gate
  4. 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.

  1. Three
  2. Two
  3. Four
  4. One
Show answer

Answer: (b) Two

Q135. A demultiplexer has

  1. one input and several outputs
  2. one input and one output
  3. several inputs and several outputs
  4. several inputs and one output
Show answer

Answer: (a) one input and several outputs

Q136. A demultiplexer is not available commercially.

  1. TRUE
  2. FALSE
Show answer

Answer: (a) TRUE

Q137. A demultiplexer can also be used as a

  1. Deselector
  2. Decoder
  3. Distributer
  4. Encoder
Show answer

Answer: (c) Distributer

Q138. The Quad Multiplexer has _____ outputs

  1. 4
  2. 8
  3. 16
  4. 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.

  1. AND
  2. OR
  3. NOT
  4. XOR
Show answer

Answer: (a) AND

Q140. The Programmable Array Logic (PAL) has a ____ AND array and a ____ OR array.

  1. Fixed, programmable
  2. Programmable, fixed
  3. Fixed, fixed
  4. Programmable, programmable
Show answer

Answer: (b) Programmable, fixed

Q141. Tri-state buffer is basically a/an _________ gate.

  1. AND
  2. OR
  3. NOT
  4. 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

  1. AND
  2. OR
  3. NOT
  4. XOR
Show answer

Answer: (c) NOT

Q143. The ABEL symbol for the OR operation is

  1. &
  2. !
  3. #
  4. $
Show answer

Answer: (c) #

Q144. The ABEL symbol for the XOR operation is

  1. $
  2. #
  3. !
  4. &
Show answer

Answer: (a) $

Q145. A' is written in ABEL as ________.

  1. @A
  2. !A
  3. $A
  4. #A
Show answer

Answer: (b) !A

Q146. The ABEL notation equivalent to the Boolean expression A+B is:

  1. A & B
  2. A ! B
  3. A # B
  4. A $ B
Show answer

Answer: (c) A # B

Q147. In ABEL the variable A is treated separately from variable a.

  1. True
  2. False
Show answer

Answer: (a) True

Q148. All ABEL equations must end with ________

  1. '.' (a dot)
  2. '$' (a dollar symbol)
  3. ';' (a semicolon)
  4. 'endl' (keyword 'endl')
Show answer

Answer: (c) ';' (a semicolon)

Q149. A source file that is created in ABEL has ____________ sections.

  1. five
  2. four
  3. three
  4. two
Show answer

Answer: (c) three

Q150. ABEL is an acronym for

  1. Advanced Broadband Enabled Longitude
  2. Advanced Boolean Equation Language
  3. None of the given options
  4. Advanced Boolean Expression Language
Show answer

Answer: (d) Advanced Boolean Expression Language

Q151. GAL is an acronym for ________.

  1. Generic Analysis Logic
  2. Giant Array Logic
  3. General Array Logic
  4. 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.

  1. E2CMOS
  2. TTL
  3. CMOS+
  4. 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.

  1. PLA
  2. PAL
  3. PROM
  4. GAL
Show answer

Answer: (d) GAL

Q154. ________ come in different configurations and are identified by a unique number.

  1. GAL
  2. PLAs
  3. EPROM
  4. PALs
Show answer

Answer: (d) PALs

Q155. The GAL22V10 has ____ inputs.

  1. 22
  2. 10
  3. 44
  4. 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 ________.

  1. Output Logic Macro Cells
  2. Output Logic Micro Cells
  3. Ordered Logic Macro Cells
  4. Ordered Logic Micro Cells
Show answer

Answer: (a) Output Logic Macro Cells

Q157. A standard interface for programming the In-System PLD consists of ________.

  1. 2-wire
  2. 4-wire
  3. 8-wire
  4. 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

  1. One
  2. Two
  3. Three
  4. Four
Show answer

Answer: (b) Two

Q159. A latch retains its state unless ___________

  1. Power is turned off
  2. Input is changed
  3. Output is changed
  4. Clock pulse is changed
Show answer

Answer: (b) Input is changed

Q160. An S-R latch can be implemented by using _________ gates

  1. AND, OR
  2. NAND, NOR
  3. NAND, XOR
  4. 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 ________.

  1. SET
  2. RESET
  3. Clear
  4. 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.

  1. SET
  2. RESET
  3. Invalid
  4. 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

  1. set
  2. reset
  3. invalid
  4. clear
Show answer

Answer: (a) set

Q164. 110/10 = _______________

  1. 11
  2. 10
  3. 101
  4. 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.

  1. n to 2^n
  2. (n-1) to (2^n - 1)
  3. 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 ______________.

  1. REPM
  2. ISP
  3. ICP
  4. 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 ____________.

  1. Logic gate
  2. Flip-flop
  3. An adder
  4. 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 ________

  1. 0
  2. 1
  3. 2
  4. 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 ________.

  1. Encoder
  2. Decoder
  3. Logic Gate
  4. 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

  1. Similar
  2. Different
  3. Similar with some enhancements
  4. 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

  1. A parallel to serial converter circuit
  2. A counter circuit
  3. A BCD to Decimal decoder
  4. 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.

SRQ (next)Q' (next)Condition
00No changeNo changeHold (latched)
0101Reset
1010Set
1100Invalid

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.

SRQ (next)Q' (next)Condition
11No changeNo changeHold (latched)
0110Set
1001Reset
0011Invalid

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 X0Y1 Y0X<YX=YX>Y
0000010
0001100
0010100
0011100
0100001
0101010
0110100
0111100
1000001
1001001
1010010
1011100
1100001
1101001
1110001
1111010

K-map for X > Y (rows X1X0, columns Y1Y0):

X1X0 \ Y1Y000011110
000000
011000
111101
101100

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)

OctalHexadecimal
Base816
Digits used0 to 70 to 9 and A to F (A=10 ... F=15)
Binary grouping3 bits per digit4 bits per digit
Example345 (octal) = 011 100 1011B7 (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.

DigitWeightProduct
716^0 = 17 x 1 = 7
B (11)16^1 = 1611 x 16 = 176
116^2 = 2561 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.

DigitWeightProduct
58^0 = 15 x 1 = 5
48^1 = 84 x 8 = 32
38^2 = 643 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)

ABNORNANDXOR
00110
01011
10011
11000

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 inputA2A1A0
I0000
I1001
I2010
I3011
I4100
I5101
I6110
I7111

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 \ CD00011110
000010
010011
111111
100010

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).

ABY = A.B
000
010
100
111
  • 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).

ABY = A+B
000
011
101
111
  • 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.

ABCDPABCDP
0000110000
0001010011
0010010101
0011110110
0100011001
0101111010
0110111100
0111011111

K-map (rows AB, columns CD):

AB \ CD00011110
001010
010101
111010
100101

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:

IntervalABCDXOR outputsP (XNOR)
t000000, 01
t100010, 10
t200100, 10
t300110, 01
t401001, 00

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.

A2A1A0Active (low) output
000Y0
001Y1
010Y2
011Y3
100Y4
101Y5
110Y6
111Y7

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 = K

If 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 \ CD00011110
000000
010111
110111
100011

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 \ CD00011110
00110 (m3)0 (m2)
011111
110 (m12)10 (m15)1
10110 (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 \ CD00011110
000110
010111
110111
100011

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 \ CD00011110
000010
010010
110111
100010
  • 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).

ABCFData input
0000I0 = 0
0011I1 = 1
0101I2 = 1
0110I3 = 0
1001I4 = 1
1010I5 = 0
1100I6 = 0
1111I7 = 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  C

The 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.

ABSumCarry
0000
0110
1010
1101

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).

I1I0O0O1O2O3
001000
010100
100010
110001

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.

S2S1S0Output Y
000D0
001D1
010D2
011D3
100D4
101D5
110D6
111D7

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.

BinaryGroups of 4Hex
100010011000 100189
0010011110000010 0111 1000278
0001010101110001 0101 0111157

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 latchNOR latch
Active inputsActive-LOWActive-HIGH
Set (Q = 1)S = 0, R = 1S = 1, R = 0
Reset (Q = 0)S = 1, R = 0S = 0, R = 1
No changeS = 1, R = 1S = 0, R = 0
InvalidS = 0, R = 0S = 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.