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 in hexadecimal, we first need to decode the IEEE 754 single-precision floating-point representations of X and Y, perform the addition, and then encode the result back into single-precision hexadecimal format.

Step 1: Understand the IEEE 754 Single-Precision Format
A 32-bit single-precision floating-point number is represented as:
- Sign bit (S): 1 bit (MSB)
- Biased Exponent (E): 8 bits
- Mantissa/Fraction (F): 23 bits
The value represented is given by: (-1)S×1.F×2E-127 (for normalized numbers).

Step 2: Decode X = (35C00000)H
Converting the hex value 35C00000 to binary:
30011
50101
C1100
Remaining zeros: 0000...0000
Thus, the 32-bit binary representation of X is:
0 0110 1011 1100 0000 0000 0000 0000 0000
Grouping into IEEE 754 fields:
- Sign bit (Sx): 0 (Positive number)
- Exponent (Ex): 01101011 in binary = 64+32+8+2+1=107 in decimal.
- Fraction (Fx): 1000000...0
So, X=+1.1×2107-127=1.1×2-20 in binary.

Step 3: Decode Y = (34A00000)H
Converting the hex value 34A00000 to binary:
30011
40100
A1010
Remaining zeros: 0000...0000
Thus, the 32-bit binary representation of Y is:
0 0110 1001 0100 0000 0000 0000 0000 0000
Grouping into IEEE 754 fields:
- Sign bit (Sy): 0 (Positive number)
- Exponent (Ey): 01101001 in binary = 64+32+8+1=105 in decimal.
- Fraction (Fy): 0100000...0
So, Y=+1.01×2105-127=1.01×2-22 in binary.

Step 4: Perform Addition Z = X + Y
To add the two numbers, we align their exponents to the larger exponent, which is -20 (from X).
We express Y with an exponent of -20:
Y=1.01×2-22=0.0101×2-20
Now, add the mantissas:
Z=(1.1+0.0101)×2-20
Z=1.1101×2-20

Step 5: Encode Z back to IEEE 754 Single-Precision Format
- Sign bit (Sz): 0 (positive)
- The exponent is -20, so the biased exponent is:
Ez=-20+127=107 decimal = 01101011 in binary.
- The mantissa fraction Fz is the fractional part of 1.1101, which is 1101 followed by zeros:
Fz=1101000...0
Combining the bits:
0 0110 1011 1101 0000 0000 0000 0000
Regrouping by 4 bits to convert to hex:
00113
01015
1110E
10008
00000
00000
00000
00000
This gives: (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...