Consider the following single precision floating point numbers and the operation.
X : (35C00000)H
Y : (34A00000)H
Z = X + Y
What is the value of ’Z’ in hexadecimal?
Correct Answer :
(35E80000)H
Solution :
The correct option is (35E80000)H.
To find the value of Z = X + Y, we need to decode the single precision IEEE-754 floating point representations of X and Y, align their exponents, add them, and then encode the result back into IEEE-754 single precision format.
Recall the IEEE-754 single precision format:
- Sign bit (s): 1 bit
- Biased Exponent (e): 8 bits
- Mantissa/Fraction (f): 23 bits
The represented value is given by:
Step 1: Decoding X = (35C00000)H
Converting the hexadecimal representation to binary:
3 = 0011, 5 = 0101, C = 1100, and the remaining five digits are 00000.
X in binary: 0011 0101 1100 0000 0000 0000 0000 0000
Grouping the bits:
- Sign bit (s) = 0 (positive)
- Exponent (e) = 0110 1011 (binary) = 107 (decimal)
- Mantissa (f) = 1000 0000 0000 0000 0000 000 (binary)
The actual exponent value for X is:
Therefore, X is:
Step 2: Decoding Y = (34A00000)H
Converting the hexadecimal representation to binary:
3 = 0011, 4 = 0100, A = 1010, and the remaining five digits are 00000.
Y in binary: 0011 0100 1010 0000 0000 0000 0000 0000
Grouping the bits:
- Sign bit (s) = 0 (positive)
- Exponent (e) = 0110 1001 (binary) = 105 (decimal)
- Mantissa (f) = 0100 0000 0000 0000 0000 000 (binary)
The actual exponent value for Y is:
Therefore, Y is:
Step 3: Performing the addition Z = X + Y
To add X and Y, we must align their exponents to the larger exponent, which is -20.
Expressing Y with exponent -20:
Now we add the significands:
Step 4: Encoding Z back into IEEE-754 format
The result Z is already in normalized form. Let's find its components:
- Sign bit (s) = 0 (since Z is positive)
- Exponent (E) = -20. The biased exponent is:
- Fraction (f) is the fractional part of the mantissa:
f = 1101 0000 0000 0000 0000 000 (23 bits)
Combine all fields:
Z = [0] [0110 1011] [1101 0000 0000 0000 0000 000]
Grouping the bits in 4-bit sets to convert back to hexadecimal:
- 0011 = 3
- 0101 = 5
- 1110 = E
- 1000 = 8
- 0000 = 0
- 0000 = 0
- 0000 = 0
- 0000 = 0
Thus, Z in hexadecimal is (35E80000)H.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.