ALU 101 Data Representation and Number Systems 2 — Questions and Answers
Question 1: Which number system uses base 16 and is commonly used to represent ALU register values?
- Octal
- Hexadecimal (Correct answer)
- BCD
- Gray code
Correct answer: Hexadecimal
Hexadecimal (base 16) compactly represents 4-bit groups, making it natural for expressing byte and word values in registers.
Question 2: What problem does the Gray code solve in ALU-related digital counter circuits?
- Carry propagation delay
- Multiple bit transitions causing glitches when incrementing (Correct answer)
- Negative number representation
- Floating-point rounding
Correct answer: Multiple bit transitions causing glitches when incrementing
Gray code sequences change only one bit at a time between consecutive values, preventing transient invalid states during transitions.
Question 3: In IEEE 754 single-precision floating point, how many bits are allocated to the exponent field?
- 7
- 8 (Correct answer)
- 10
- 23
Correct answer: 8
IEEE 754 single-precision uses 1 sign bit, 8 exponent bits, and 23 mantissa bits, totaling 32 bits.
Question 4: What is the sign-magnitude representation of -13 in 8 bits?
- 10001101 (Correct answer)
- 11110010
- 11110011
- 00001101
Correct answer: 10001101
In sign-magnitude, the MSB is the sign bit (1 for negative) and the remaining bits are the magnitude: 0001101 = 13, so -13 = 10001101.
Question 5: Converting the octal number 75 to binary yields which result?
- 111 101 (Correct answer)
- 110 101
- 111 110
- 011 101
Correct answer: 111 101
Each octal digit maps to 3 binary bits: 7 = 111 and 5 = 101, giving 111101.
Question 6: What is the primary advantage of two's complement over one's complement for ALU design?
- It supports larger numbers
- It has a unique representation of zero, simplifying arithmetic circuits (Correct answer)
- It requires fewer bits
- It supports floating point natively
Correct answer: It has a unique representation of zero, simplifying arithmetic circuits
One's complement has two representations of zero (+0 and -0), while two's complement has only one, simplifying zero detection and arithmetic.
Which number system uses base 16 and is commonly used to represent ALU register values?