Question Details

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?

Options

A

(B5E80000)H

B

(F5E80000)H

C

(35C80000)H

D

(35E80000)H

Show Answer

Correct Answer :

Option D

(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:
1s×(1.f)2×2e127

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:
EX=107127=20
Therefore, X is:
X=(1.1)2×220

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:
EY=105127=22
Therefore, Y is:
Y=(1.01)2×222

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:
Y=(1.01)2×222=(0.0101)2×220
Now we add the significands:
Z=X+Y=[(1.1)2+(0.0101)2]×220
Z=(1.1101)2×220

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:
e=20+127=107=(01101011)2
- 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.

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...