• edited by
19,735 views
27 27 votes

Consider three floating point numbers $\textit{A, B}$ and $\textit{C}$ stored in registers $\text{R}_{\text{A}}, \text{R}_{\text{B}}$ and $\text{R}_{\text{C}},$ respectively as per $\textsf{IEEE-754}$ single precision floating point format. The $\text{32-bit}$ content stored in these registers $\text{(in hexadecimal form)}$ are as follows.

$\begin{array} {|c|c|c|} \hline \text{R}_{\text{A}} = \text{0xC1400000} & \text{R}_{\text{B}} = \text{0x42100000} & \text{R}_{\text{C}} = \text{0x41400000} \\\hline \end{array}$

Which one of the following is $\text{FALSE}?$

  1. $\textit{A + C} = 0$
  2. $\textit{C = A + B}$
  3. $\textit{B =3C}$
  4. $\textit{(B – C)} > 0$

5 Answers

55 55 votes

Here, option B is the right answer. See the image attched below:

13 13 votes

Given that Numbers are in IEEE-754 single precision.

Representation :: $\text{1 sign bit, 8 exponent bits and 23 Mantissa Bits}$

$\text{Decimal value} = (-1)^{\text{Sign bit}}\times(1.Mantissa)\times(2)^{exponent-127}$

 

$R_A = 0xC1400000 = 1100 \;0001\;0100 \; 0000\; 0000\; 0000\; 0000\; 0000$

$R_A = 0xC1400000 = \underbrace{1}\underbrace{100 \;0001\;0}\underbrace{100 \; 0000\; 0000\; 0000\; 0000\; 0000}$

$\text{Decimal value of R}_A = (-1)^{\text{1}}\times(1.1000000000..)\times(2)^{130-127}=-(1100)_2 = -12$

 

$R_B = 0x42100000 = 0100 \;0010\;0001 \; 0000\; 0000\; 0000\; 0000\; 0000$

$R_B = 0x42100000 = \underbrace{0}\underbrace{100 \;0010\;0}\underbrace{001 \; 0000\; 0000\; 0000\; 0000\; 0000}$

$\text{Decimal value of R}_B = (-1)^{\text{0}}\times(1.001000000000..)\times(2)^{132-127}=(100100)_2 = 36$

 

$R_C = 0x41400000 = 0100 \;0001\;0100 \; 0000\; 0000\; 0000\; 0000\; 0000$

$R_C = 0x41400000 = \underbrace{0}\underbrace{100 \;0001\;0}\underbrace{100 \; 0000\; 0000\; 0000\; 0000\; 0000}$

$\text{Decimal value of R}_C= (-1)^{\text{0}}\times(1.1000000000..)\times(2)^{130-127}=(1100)_2 = 12$

 

$\therefore C=A+B\;\; is\; false.$

 

Alternate :

$R_A = 0xC1400000, R_B = 0x42100000 \;\;and\;\; R_C = 0x41400000$

  1. By observing $R_A$ and $R_C$ only MSB bit is different ===> $R_C$ = -$R_A$ ===> $R_C$ + $R_A$ = 0
  2. By observing $R_B$ and $R_C$, $R_B$ exponent part is higher than $R_C$ exponent part ===> $R_B$ > $R_C$ ===> $R_B$ - $R_C$ > 0

 

Now Verify other two options.

• edited by
3 3 votes
For conceptual & practice purpose, it is good to solve in procedural way. But in exam this question was not meant to be solved in procedural way.

If we observe carefully, A & C are only differ in sign.

So, let A = -x & C = +x.

This makes option A true & B false. Solution ends here.
Answer:
Position:
Show:

Related questions

45 45 votes
6 6 answers
29.8k
29.8k views
admin asked Feb 15, 2023
29,757 views
Consider the $\textsf{IEEE-754}$ single precision floating point numbers $\text{P} = \textsf{0xC1800000}$ and $\text{Q} = \textsf{0x3F5C2EF4}.$Which one of the following ...
11 11 votes
2 2 answers
1.8k
1.8k views
GO Classes asked Feb 5, 2024
1,833 views
According to the IEEE standard, a 32-bit, single-precision, floating-point number $N$ is defined to be$$N=(-1)^S \times 1 . F \times 2^{E-127}$$where $S$ is the sign bit,...
28 28 votes
6 6 answers
22.2k
22.2k views
Arjun asked Feb 16, 2024
22,236 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.2k
21.2k views
Arjun asked Feb 18, 2021
21,156 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...