First 50 of 199 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Number systems, binary codes and Boolean algebra
How many distinct values can be represented with a 6-bit unsigned binary word?
- 32
- 64 Correct answer.
- 63
- 128
Explanation
An n-bit unsigned word represents 2^n distinct patterns, so 2^6 = 64 values, spanning 0 to 63. The count of values is one more than the largest value.
Question 2Number systems, binary codes and Boolean algebra
The decimal number 45 is converted to binary. Which 8-bit pattern is correct?
- 01001011
- 00101110
- 00110101
- 00101101 Correct answer.
Explanation
45 = 32 + 8 + 4 + 1, so bits 5, 3, 2 and 0 are set: 00101101. Checking the place values 128, 64, 32, 16, 8, 4, 2, 1 confirms the sum is 45.
Question 3Number systems, binary codes and Boolean algebra
In the 8421 BCD code, how is the decimal number 27 encoded?
- 0011 0101
- 0001 1011
- 0010 0111 Correct answer.
- 11011
Explanation
BCD encodes each decimal digit separately in four bits, so 2 becomes 0010 and 7 becomes 0111. Concatenating the two nibbles gives 0010 0111.
Question 4Number systems, binary codes and Boolean algebra
Which logic gate produces a HIGH output only when all of its inputs are HIGH?
- AND Correct answer.
- NAND
- OR
- XOR
Explanation
The AND function yields 1 only for the single input combination where every input is 1. Any 0 input forces the output to 0.
Question 5Number systems, binary codes and Boolean algebra
The Boolean expression A + A·B simplifies to which single term?
- A Correct answer.
- A·B
- B
- A + B
Explanation
By the absorption law, A + A·B = A(1 + B) = A·1 = A. The term A already covers every case in which A·B is true.
Question 6Number systems, binary codes and Boolean algebra
What is the hexadecimal representation of the binary number 1011 1100?
- AC
- B4
- BC Correct answer.
- CB
Explanation
Each group of four bits maps to one hex digit: 1011 = B and 1100 = C, giving BC. Grouping from the binary point is the standard conversion method.
Question 7Number systems, binary codes and Boolean algebra
Which statement is the correct form of De Morgan's second theorem?
- (A·B)' = A'·B'
- (A·B)' = A' + B' Correct answer.
- (A + B)' = A' + B'
- (A + B)' = A·B
Explanation
De Morgan's theorem states that the complement of a product equals the sum of the complements, so (A·B)' = A' + B'. The operation is swapped and each variable is inverted.
Question 8Number systems, binary codes and Boolean algebra
A 4-bit binary word uses two's complement. What decimal value does 1111 represent?
- -7
- -15
- -1 Correct answer.
- +15
Explanation
In two's complement the weight of the MSB is negative, so 1111 = -8 + 4 + 2 + 1 = -1. Alternatively, inverting and adding one to 0001 returns 1111.
Question 9Number systems, binary codes and Boolean algebra
A logic function of three variables is given by F = Σm(0, 2, 5, 7). Which canonical product-of-maxterms form describes the same function?
- ΠM(1, 2, 4, 6)
- ΠM(0, 2, 5, 7)
- ΠM(1, 3, 4, 6) Correct answer.
- ΠM(3, 4, 6, 7)
Explanation
A function's maxterm list contains exactly the minterm indices missing from its minterm list. For three variables the indices are 0 to 7, so the complement of {0, 2, 5, 7} is {1, 3, 4, 6}.
Question 10Number systems, binary codes and Boolean algebra
How many select inputs does a 16-to-1 multiplexer require?
- 2
- 8
- 16
- 4 Correct answer.
Explanation
A multiplexer with 2^n data inputs needs n select lines, so 16 = 2^4 requires 4 select inputs. These four lines form the binary address of the chosen channel.
Question 11Number systems, binary codes and Boolean algebra
What is the result of adding the two 4-bit two's complement numbers 0101 and 0011?
- 1000, and no overflow has occurred
- 1000, and overflow has occurred Correct answer.
- 0111, and no overflow has occurred
- 11000, and overflow has occurred
Explanation
The sum is +5 + 3 = +8, but the 4-bit two's complement range is -8 to +7, so 1000 is not a valid positive result. Overflow is detected because two positive operands produced a negative-looking sum.
Question 12Number systems, binary codes and Boolean algebra
Which expression is the minimal sum-of-products for F(A,B,C) = Σm(1, 3, 5, 7)?
- B + C
- C Correct answer.
- A + C
- A·C
Explanation
All four minterms have C = 1 while A and B take every combination, so the variable C alone covers the whole group of four cells in the Karnaugh map. The minimal SOP is therefore just C.
Question 13Number systems, binary codes and Boolean algebra
The binary number 0.101 is evaluated as a fraction. What is its decimal value?
- 0.3125
- 0.625 Correct answer.
- 0.5
- 0.75
Explanation
The weights to the right of the binary point are 1/2, 1/4 and 1/8, so 0.101 = 0.5 + 0 + 0.125 = 0.625. Each position halves the weight of the previous one.
Question 14Number systems, binary codes and Boolean algebra
The Gray code sequence for a 3-bit system starts 000, 001, 011, 010. Which code follows 010?
- 100
- 110 Correct answer.
- 011
- 111
Explanation
In binary-reflected Gray code each step changes exactly one bit, and after 010 the reflected sequence gives 110. The full 3-bit sequence is 000, 001, 011, 010, 110, 111, 101, 100.
Question 15Number systems, binary codes and Boolean algebra
Which Boolean identity correctly states the consensus theorem?
- A·B + A'·C + B·C = A·B·C
- A·B + A'·C + B·C = A·B + A'·C + A·C
- A·B + A'·C + B·C = A·B + A'·C Correct answer.
- A·B + A'·C + B·C = A + B + C
Explanation
The consensus theorem removes the redundant term B·C, which is covered by the other two products. The consensus term can be added or deleted without changing the function.
Question 16Number systems, binary codes and Boolean algebra
An 8-bit sign-magnitude word holds 10010110. What decimal value does it represent?
- +22
- -22 Correct answer.
- -150
- -106
Explanation
In sign-magnitude the MSB is the sign and the remaining seven bits are the magnitude: 0010110 = 16 + 4 + 2 = 22, with sign bit 1 meaning negative. The result is therefore -22.
Question 17Number systems, binary codes and Boolean algebra
A Boolean function is implemented directly from its minterm list without minimisation. Which statement describes the resulting two-level circuit?
- It can only be built with NAND gates and never with AND and OR gates
- It produces an incorrect output unless the terms are minimised first
- It requires exactly one gate in total because minterms are already simplified
- It uses one AND gate per minterm plus one OR gate, and is functionally correct but not minimal Correct answer.
Explanation
A canonical sum of products feeds one AND gate per minterm into a single OR gate, which is functionally correct but usually contains redundant terms. Minimisation reduces gate count and propagation delay without changing the truth table.
Question 18Number systems, binary codes and Boolean algebra
What is the hexadecimal value of the decimal number 200?
- D8
- C8 Correct answer.
- B8
- CA
Explanation
200 divided by 16 gives 12 remainder 8, and 12 is C in hexadecimal, so the result is C8. Checking: 12 × 16 + 8 = 192 + 8 = 200.
Question 19Number systems, binary codes and Boolean algebra
A 4-variable Karnaugh map is used to minimise a function. What is the maximum number of cells that a single valid group may contain?
- 16 Correct answer.
- 4
- 8
- 2
Explanation
A 4-variable map has 16 cells, and a group must contain 2^n cells forming a rectangle, so the largest possible group is the full map of 16 cells. Such a group means the function is constant 1.
Question 20Number systems, binary codes and Boolean algebra
Which pair of gates forms a functionally complete set on its own?
- AND and XOR
- NAND Correct answer.
- XOR
- AND
Explanation
The NAND gate is functionally complete because any Boolean function can be built from NAND gates alone, including inversion, AND and OR. NOR has the same property.
Question 21Number systems, binary codes and Boolean algebra
A 4-bit ripple-carry adder adds 0110 and 1010 with carry-in 0. What are the 4-bit sum and the carry-out?
- Sum 0000, carry-out 0
- Sum 0000, carry-out 1 Correct answer.
- Sum 1000, carry-out 1
- Sum 1111, carry-out 1
Explanation
6 + 10 = 16, which is 10000 in binary. The low four bits are 0000 and the fifth bit appears as carry-out 1.
Question 22Number systems, binary codes and Boolean algebra
The expression F = (A + B)·(A + C) is to be expanded. Which sum-of-products form is equivalent?
- A + B + C
- A + B·C Correct answer.
- A·B + A·C
- A·B·C
Explanation
Expanding gives A·A + A·C + A·B + B·C, and A·A = A, so the terms A + A·C + A·B absorb to A, leaving A + B·C. This is the standard distributive and absorption result.
Question 23Number systems, binary codes and Boolean algebra
A 4-bit system uses two's complement. What is the result of subtracting 0110 from 0011 by adding the two's complement of the subtrahend?
- 0011, representing +3
- 1101, representing -3 Correct answer.
- 1110, representing -2
- 1001, representing -7
Explanation
Subtracting 6 from 3 means computing 3 + (-6). The two's complement of 0110 is 1010, and 0011 + 1010 = 1101, which is -3 in two's complement.
Question 24Number systems, binary codes and Boolean algebra
A function of four variables has the minterm list Σm(0, 1, 2, 3, 4, 6, 8, 9, 10, 11). Which product term is essential in its minimal sum-of-products?
- A'·C'
- C'·D'
- B' Correct answer.
- A·B'
Explanation
The minterms 0, 1, 2, 3, 8, 9, 10 and 11 all have B = 0 and cover every combination of A, C and D, so they form a group of eight that reduces to B'. Minterms such as 0 and 8 are covered only by this group, making B' essential.
Question 25Number systems, binary codes and Boolean algebra
A 4-bit binary word is transmitted with an odd-parity bit appended. Which statement correctly describes the resulting 5-bit code for the data 1011?
- The parity bit is 0, giving 01011, because the parity bit is placed first
- The parity bit is 1, giving 10111, because odd parity always appends a 1
- The parity bit is 1, giving 10111, because the data contains three ones
- The parity bit is 0, giving 10110, because the data already contains an odd number of ones Correct answer.
Explanation
Odd parity requires the total number of ones in the transmitted word to be odd. The data 1011 already has three ones, so the parity bit must be 0, giving 10110.
Question 26Number systems, binary codes and Boolean algebra
In the BCD (8421) code, which 4-bit pattern is never used to represent a decimal digit?
- 0000
- 1001
- 1010 Correct answer.
- 0111
Explanation
BCD uses only the ten patterns 0000 through 1001 to encode decimal digits 0 to 9. Any pattern from 1010 to 1111 is an invalid BCD code word, so 1010 has no decimal meaning in this code.
Question 27Number systems, binary codes and Boolean algebra
A logic circuit must output 1 only when an even number of its three inputs are 1 (including the case of zero ones). Which single gate directly implements this function?
- 3-input OR gate
- XNOR of the three inputs Correct answer.
- 3-input AND gate
- 3-input NAND gate
Explanation
The function described is the even-parity function, which equals 1 for input combinations 000, 011, 101 and 110. The XNOR operation extended to three inputs gives exactly this pattern, since it detects an even count of ones. AND, OR and NAND do not produce this truth table.
Question 28Number systems, binary codes and Boolean algebra
A 4-bit word 1101 is interpreted as a signed number in one's complement. What decimal value does it represent?
- 13
- -3
- -2 Correct answer.
- -5
Explanation
In one's complement the leading 1 marks a negative number, and the magnitude is found by inverting all four bits of 1101 to get 0010, which is 2. The value is therefore -2. Note that 1101 in two's complement would be -3, which distinguishes the two codes.
Question 29Number systems, binary codes and Boolean algebra
A Boolean function is given as F = A'BC' + AB'C' + ABC'. Which simplified expression is equivalent?
- C'·(A'B + AB') + ABC'
- C'·(A + B)
- C'·(A ⊕ B) + ABC' Correct answer.
- A'B + BC'
Explanation
The first and second terms share C' and form the exclusive-OR pattern A'B + AB' = A ⊕ B, while the third term ABC' remains separate because it contains AB, which is not covered by the XOR pair. Combining gives C'(A ⊕ B) + ABC'. Factoring only C' leaves A'B + AB' + AB, which does not reduce to A + B.
Question 30Number systems, binary codes and Boolean algebra
A 3-variable Karnaugh map holds a function whose only 1-cells are at minterms 0, 1, 3 and 7. Which minimal sum-of-products and its gate count (two-input gates, literals counted as inputs) are correct?
- A'B' + BC, needing two product terms
- A'B' + BC + A'C, needing three 2-input AND terms and one 3-input OR Correct answer.
- A'B' + A'C + BC, needing four product terms
- A'B'C' + A'BC + ABC, needing three 3-literal terms
Explanation
Grouping minterms 0 and 1 gives A'B', grouping 1 and 3 gives A'C, and grouping 3 and 7 gives BC; each pair is a valid adjacent group on the map. No larger group of four exists, so all three pairs are needed and each is essential, giving three two-literal products combined by a single three-input OR.
Question 31Logic gates and combinational logic design
In a two-input CMOS NAND gate, which condition makes the p-channel network conduct so that the output is pulled to VDD?
- Input A is 0 and input B is 1
- Both inputs are at logic 1
- Input A is 1 and input B is 0
- Both inputs are at logic 0 Correct answer.
Explanation
In a CMOS NAND gate the p-channel transistors are connected in parallel between VDD and the output, and they turn on with a logic 0 at their gate. Only when both inputs are 0 are both p-devices on and the output pulled high, while any 1 turns on a series n-device that pulls the output low.
Question 32Logic gates and combinational logic design
A logic gate is required whose output is 1 only when its two inputs differ. Which gate provides this function?
- XOR Correct answer.
- XNOR
- NOR
- NAND
Explanation
The XOR function yields 1 exactly when its inputs are unequal, so 01 and 10 give 1 while 00 and 11 give 0. XNOR is its complement and gives 1 for equal inputs, while NAND and NOR are not equality detectors.
Question 33Logic gates and combinational logic design
How many rows does the truth table of a four-input combinational circuit contain?
- 8
- 32
- 16 Correct answer.
- 12
Explanation
A truth table must list every possible combination of the input variables, and with n inputs there are 2^n combinations. For n=4 this gives 2^4 = 16 rows.
Question 34Logic gates and combinational logic design
Which Boolean identity correctly expresses the absorption theorem?
- A·(A + B) = B
- A + A·B = B
- A + A·B = A Correct answer.
- A + A·B = A + B
Explanation
Absorption states that A + A·B = A, because when A is 1 the whole expression is 1 and when A is 0 the product term is also 0. The dual form is A·(A + B) = A.
Question 35Logic gates and combinational logic design
What is the output of a two-input AND gate when input A = 1 and input B = 0?
- 0 Correct answer.
- B
- A
- 1
Explanation
The AND function is 1 only when every input is 1. With B = 0 the product A·B = 1·0 = 0, so the output is logic 0.
Question 36Logic gates and combinational logic design
What is the binary value of the Boolean expression 1·0 + 1·1?
- 2
- 1 Correct answer.
- 10
- 0
Explanation
Evaluate the products first: 1·0 = 0 and 1·1 = 1. The OR of the two products is 0 + 1 = 1, so the expression evaluates to logic 1.
Question 37Logic gates and combinational logic design
A signal passes through a chain of three inverters. What is the logic value at the output when the input is 1?
- 1
- 0 Correct answer.
- Oscillating
- Indeterminate
Explanation
Each inverter complements its input, so three cascaded inverters apply the NOT operation three times. Since NOT is an involution, an odd number of inversions flips the value, giving 0 for an input of 1.
Question 38Logic gates and combinational logic design
Which expression is the correct sum-of-products form for the function F = Σm(1,3,5,7) of three variables A, B, C?
- F = A + B
- F = A ⊕ B
- F = A·B·C
- F = C Correct answer.
Explanation
The minterms 1, 3, 5 and 7 all have C = 1 and cover every combination of A and B, so the function depends only on C. The minimised expression is therefore F = C.
Question 39Logic gates and combinational logic design
Simplify the expression F = A·B + A·B' + A'·B using Boolean algebra.
- F = A' + B'
- F = A ⊕ B
- F = A + B Correct answer.
- F = A·B
Explanation
Combine A·B + A·B' = A(B + B') = A, and A·B + A'·B = B(A + A') = B. Together A·B + A·B' + A'·B = A + B, the standard consensus simplification.
Question 40Logic gates and combinational logic design
A 3-to-8 binary decoder has its inputs A2 A1 A0 = 101. Which output line is asserted?
- Line 3
- Line 7
- Line 5 Correct answer.
- Line 6
Explanation
A binary decoder asserts the output whose index equals the binary value of the input word. The word 101 equals decimal 5, so output line 5 is asserted and all others are inactive.
Question 41Logic gates and combinational logic design
A priority encoder has inputs I3, I2, I1, I0 with I3 having the highest priority. If I3 = 0, I2 = 1, I1 = 1 and I0 = 1, what two-bit code does it output?
- 01
- 11
- 10 Correct answer.
- 00
Explanation
A priority encoder outputs the code of the highest-priority input that is asserted. Since I3 = 0, the next highest active input is I2, whose code is 10. The lower inputs I1 and I0 are ignored.
Question 42Logic gates and combinational logic design
A 4-to-1 multiplexer has select lines S1 S0 = 10. Which data input is routed to the output?
- D1
- D2 Correct answer.
- D3
- D0
Explanation
The select word of a multiplexer chooses the data input whose index equals the binary value of S1 S0. The word 10 equals decimal 2, so input D2 is passed to the output.
Question 43Logic gates and combinational logic design
How many 2-input NAND gates are required to build a single 2-input XOR function using the standard four-NAND realisation?
- 6
- 4 Correct answer.
- 3
- 5
Explanation
The standard XOR realisation uses four NAND gates: two form the complemented products NAND(A,B) and the inner terms, and a final NAND combines them. This is the classic minimum using only 2-input NAND gates.
Question 44Logic gates and combinational logic design
Which Karnaugh-map grouping is valid for a four-variable map?
- A group of six adjacent cells forming a rectangle
- A group of five cells in a row
- A group of four cells forming a 2×2 square Correct answer.
- A group of three adjacent cells
Explanation
Valid K-map groups must contain a power-of-two number of cells (1, 2, 4, 8, 16) and form a rectangle, with wrap-around allowed at the edges. A 2×2 square of four cells satisfies both conditions.
Question 45Logic gates and combinational logic design
A combinational circuit has the Boolean expression F = (A + B)·(A + C). Which simplified form is equivalent?
- F = A + B·C Correct answer.
- F = A·(B + C)
- F = A + B + C
- F = A·B + C
Explanation
Expand the product: (A + B)(A + C) = A + A·C + A·B + B·C. Using absorption, A + A·C + A·B reduces to A, leaving F = A + B·C.
Question 46Logic gates and combinational logic design
A half adder adds two bits A and B. Which pair of expressions correctly gives its Sum and Carry outputs?
- Sum = A + B, Carry = A·B
- Sum = A·B, Carry = A ⊕ B
- Sum = A ⊕ B, Carry = A·B Correct answer.
- Sum = A ⊕ B, Carry = A + B
Explanation
The sum bit of a half adder is the XOR of the inputs, since 1+1 produces a 0 with a carry. The carry is the AND of the inputs, asserted only when both bits are 1.
Question 47Logic gates and combinational logic design
In a full adder with inputs A, B and Carry-in Cin, which expression gives the Carry-out?
- Cout = A·B + Cin·(A ⊕ B) Correct answer.
- Cout = A ⊕ B ⊕ Cin
- Cout = A + B + Cin
- Cout = A·B·Cin
Explanation
The carry-out is asserted when at least two of the three inputs are 1. This is expressed as A·B + Cin·(A ⊕ B), which covers the case where A and B are both 1 or where Cin is 1 and exactly one of A or B is 1.
Question 48Logic gates and combinational logic design
A 4-bit ripple-carry adder has a propagation delay of 10 ns per full adder stage. What is the worst-case time for the final sum bit to become valid?
- 40 ns Correct answer.
- 20 ns
- 10 ns
- 30 ns
Explanation
In a ripple-carry adder the carry must propagate through every stage before the most significant sum bit settles. With four stages each contributing 10 ns, the worst case is 4 × 10 = 40 ns.
Question 49Logic gates and combinational logic design
Which statement correctly describes a difference between a combinational circuit and a sequential circuit?
- A sequential circuit cannot contain logic gates
- A combinational circuit requires a clock, while a sequential circuit does not
- A combinational circuit always contains flip-flops, while a sequential circuit does not
- A combinational circuit's output depends only on present inputs, while a sequential circuit's output also depends on stored state Correct answer.
Explanation
Combinational logic has no memory, so its outputs are a pure function of the current inputs. Sequential logic includes storage elements such as flip-flops, so its outputs depend on both current inputs and the stored state.
Question 50Logic gates and combinational logic design
A 1-of-8 demultiplexer has data input D and select lines S2 S1 S0 = 011. To which output is D routed?
- Output 7
- Output 0
- Output 5
- Output 3 Correct answer.
Explanation
A demultiplexer routes its single data input to the output whose index equals the binary value of the select word. The word 011 equals decimal 3, so the data reaches output 3.