ALU 101 Data Representation and Number Systems 1 — Questions and Answers
Question 1: How is the decimal number 25 represented in 8-bit binary?
- 00011001 (Correct answer)
- 00010011
- 00110001
- 00011100
Correct answer: 00011001
25 = 16 + 8 + 1 = 2^4 + 2^3 + 2^0, giving the 8-bit pattern 00011001.
Question 2: In two's complement representation, what is the value of the 8-bit pattern 11110000?
- -16 (Correct answer)
- -15
- 240
- -14
Correct answer: -16
Inverting 11110000 gives 00001111 = 15, then adding 1 gives 16, so the value is -16.
Question 3: What is the hexadecimal equivalent of the binary number 10110101?
- B4
- B5 (Correct answer)
- A5
- C5
Correct answer: B5
Splitting into nibbles: 1011 = B and 0101 = 5, giving 0xB5.
Question 4: Which number representation allows the ALU to perform subtraction using only adder hardware?
- Sign-magnitude
- One's complement
- Two's complement (Correct answer)
- Excess-127
Correct answer: Two's complement
Two's complement lets you subtract by adding the negated value, so no separate subtractor circuit is needed.
Question 5: In BCD (Binary Coded Decimal), how is the decimal digit 7 encoded?
- 0110
- 0111 (Correct answer)
- 1000
- 1111
Correct answer: 0111
BCD encodes each decimal digit in 4 bits exactly as its standard binary equivalent, so 7 = 0111.
Question 6: What is the range of unsigned integers that can be stored in a 16-bit register?
- 0 to 32,767
- 0 to 65,535 (Correct answer)
- -32,768 to 32,767
- 0 to 131,071
Correct answer: 0 to 65,535
A 16-bit unsigned register can hold values from 0 to 2^16 − 1 = 65,535.
How is the decimal number 25 represented in 8-bit binary?