edited by
10,812 views
21 21 votes

Three floating point numbers $X, Y$, and $Z$ are stored in three registers $\mathrm{R}_{\mathrm{X}}, \mathrm{R}_{\mathrm{Y}}$, and $\mathrm{R}_{\mathrm{Z}}$, respectively in $IEEE$ $754$ single precision format as given below in hexadecimal:

$$\mathrm{R}_{\mathrm{X}}=0 \mathrm{xC} 1100000, \mathrm{R}_{\mathrm{Y}}=0 \mathrm{x}  40 \mathrm{C} 00000, \text { and } \mathrm{R}_{\mathrm{Z}}=0 \mathrm{x} 41400000$$

Which of the following option(s) is/are CORRECT?

  1. $4(X+Y)+Z=0$
  2. $2 Y-Z=0$
  3. $4 X+3 Z=0$
  4. $X+Y+Z=0$

6 Answers

25 25 votes

Given Values :-

 

                   RX = 0×C1100000 = 1100 0001 0001 0000 0000 0000 0000 0000

                                IEEE 754  Single  Precision  Format (32-bit) –

 Sign (1 bit )  Biased
  Exponent ( 8 bits ) 
     
 Mantissa ( 23 bits )                          
1                      100 0001 0                         001 0000 0000 0000 0000 0000   

 

                 Biased  Exponent (E) =  (10000010)2 = 130

       Actual  Exponent (e) = Biased  Exponent (E)  –  Bias (127 for single precision) = 130 - 127 = 3

                Mantissa (M) = 001 0000 0000 0000 0000 0000

                          

                             We Know that :-

 
 Actual number( N ) = (-1) X (1.M) X 2e       
 

       

                                            Actual Number = (-1)1 X 1.00100000000000000000000 X 2=  -9

  RX = -9

 

Similarly 


      RY = 0×40C00000 = 0100 0000 1100 0000 0000 0000 0000 0000

                           Sign = 0 ( Positive )

                          Biased  Exponent (E) = (10000001)= 129

                           Actual  Exponent (e) = 129 - 127 =  2 

                           Mantissa (M) = 10000000000000000000000 

                        

                           Actual Number = (-1)0 X 1.10000000000000000000000  X 22 = 6

  RY= 6

 

Finally 


            RZ= 0×41400000 = 0100 0001 0100 0000 0000 0000 0000 0000

                            Sign = 0 ( Positive )

                           Biased  Exponent(E) = (10000010)2 = 130

                           Actual  Exponent (e) = 130 - 127 =  3

                          Mantissa (M) = 10000000000000000000000

 

                          Actual  Number = (-1)0 X 1.10000000000000000000000  2= 12

 RZ = 12

              

 

  Now verify all options 

                         A)  4 (X + Y ) + Z =0  Substitute  X = −9 , Y = 6 ,  and  Z = 12:

                                                4( −9 + 6 ) + 12 = 4 ( −3 ) + 12 = −12 + 12 = 0 

 

                          B) 2 Y − Z = 0  Substitute  Y = 6  and  Z = 12:

                                                2( 6 ) − 12 = 12 − 12 = 0

 

                          C)  4 X + 3 Z = 0 Substitute X=−9 and Z=12:

                                                4( −9 ) + 3 ( 12 ) = − 36 + 36 = 0

 

                          D)  X + Y + Z = 0  Substitute  X = −9 , Y = 6 ,  and  Z = 12:

                                                −9 + 6 + 12 = −9 + 18 = 9

 

A, B, C are correct

edited by
4 4 votes

 IEEE 754 Single-Precision Format Recap

A single precision floating-point number uses 32 bits, divided as follows:

  • Bit 31: sign ($s$) : 0 for positive, 1 for negative.  
  • Bits 30–23: exponent ($E$) : an 8-bit unsigned integer stored with a bias of 127.  
  • Bits 22–0: mantissa ($M$) : a 23-bit fraction interpreted as  

$$
M = \sum_{i=1}^{23} b_i \cdot 2^{-i}.
$$

The real value represented is  
$$
(-1)^s \cdot (1 + M) \cdot 2^{E - 127}.
$$

We decode the three given hexadecimal words using this rule.

Bit Field Extraction

$$
\begin{array}{|c|c|c|c|c|}
\hline
\text{Register} & \text{Hexadecimal} & \text{Sign (1 bit)} & \text{Exponent (8 bits)} & \text{Mantissa (23 bits)} \\
\hline
R_X & \text{C1100000} & 1 & 10000010 & 00100000000000000000000 \\
\hline
R_Y & \text{40C00000} & 0 & 10000001 & 10000000000000000000000 \\
\hline
R_Z & \text{41400000} & 0 & 10000010 & 10000000000000000000000 \\
\hline
\end{array}
$$

Decimal Value Computation

$$
\begin{array}{|c|c|c|c|c|l|}
\hline
\text{Register} & s & E_{\text{(bin)}} & E_{\text{(dec)}} & M_{\text{(dec)}} & \text{Value} \\
\hline
R_X & 1 & 10000010 & 130 & 2^{-3} = 0.125 & (-1)^1 (1 + 0.125) \cdot 2^{130 - 127} = -1.125 \cdot 2^{3} = -9.0 \\
\hline
R_Y & 0 & 10000001 & 129 & 2^{-1} = 0.5 & (+1) (1 + 0.5) \cdot 2^{129 - 127} = 1.5 \cdot 2^{2} = 6.0 \\
\hline
R_Z & 0 & 10000010 & 130 & 2^{-1} = 0.5 & (+1) (1 + 0.5) \cdot 2^{130 - 127} = 1.5 \cdot 2^{3} = 12.0 \\
\hline
\end{array}
$$

Thus,  
$$
X = -9.0, \quad Y = 6.0, \quad Z = 12.0.
$$

Evaluation of Statements

$$
\begin{array}{|c|c|c|c|}
\hline
\text{Option} & \text{Expression} & \text{Substitution} & \text{Result} \\
\hline
\text{A} & 4(X + Y) + Z & 4(-9.0 + 6.0) + 12.0 & 4(-3.0) + 12.0 = -12.0 + 12.0 = 0 \\
\hline
\text{B} & 2Y - Z & 2(6.0) - 12.0 & 12.0 - 12.0 = 0 \\
\hline
\text{C} & 4X + 3Z & 4(-9.0) + 3(12.0) & -36.0 + 36.0 = 0 \\
\hline
\text{D} & X + Y + Z & -9.0 + 6.0 + 12.0 & 9.0 \neq 0 \\
\hline
\end{array}
$$

 

$$
\color{gold} \boxed{\text{Correct options: A, B, C}}
$$

2 2 votes
Given values: \[ Rx = C1100000 = -9, \quad Ry = 40C00000 = 6, \quad Rz = 41400000 = 12 \] This implies: \[ X = -9, \quad Y = 6, \quad Z = 12 \] A) \( 4(X + Y) + Z = 0 \) Substitute \( X = -9 \), \( Y = 6 \), and \( Z = 12 \): \[ 4(-9 + 6) + 12 = 4(-3) + 12 = -12 + 12 = 0 \] B) \( 2Y - Z = 0 \) Substitute \( Y = 6 \) and \( Z = 12 \): \[ 2(6) - 12 = 12 - 12 = 0 \] C) \( 4X + 3Z = 0 \) Substitute \( X = -9 \) and \( Z = 12 \): \[ 4(-9) + 3(12) = -36 + 36 = 0 \] D) \( X + Y + Z = 0 \) Substitute \( X = -9 \), \( Y = 6 \), and \( Z = 12 \): \[ -9 + 6 + 12 = -9 + 18 = 9 \]

A, B, C are correct
Answer:
Position:
Show:

Related questions

28 28 votes
6 6 answers
22.1k
22.1k views
Arjun asked Feb 16, 2024
22,062 views
​​The format of a single-precision floating-point number as per the $\text{IEEE 754}$ standard is:$$\begin{array}{|l|l|l|}\hline \textbf{Sign} & \textbf{Exponent} & \tex...
44 44 votes
5 answers 5 answers
21.0k
21.0k views
Arjun asked Feb 18, 2021
21,017 views
The format of the single-precision floating point representation of a real number as per the $\text{IEEE 754}$ standard is as follows:$$\begin{array}{|c|c|c|} \hline \tex...
70 70 votes
5 answers 5 answers
33.0k
33.0k views
khushtak asked Feb 14, 2017
33,024 views
Given the following binary number in $32$-bit (single precision) $\text{IEEE-754}$ format : $\large 00111110011011010000000000000000$Th...