in Digital Logic retagged ago by
1,868 views
3 votes
3 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$
in Digital Logic retagged ago by
by
1.9k views

3 Answers

5 votes
5 votes

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

3 Comments

how the negative sign came for Ra value?
0
0

@abinayasri In IEEE-754 single precision, the $32$ bits are divided into :- Sign (1bit), Biased Exponent (8 bits)  and Mantissa (23 bits) Fields.

In the sign field : 1 → -ve no. , 0 → +ve no.

So for $R_A: 0xC1400000 = 1100 \;0001\;0100 \; 0000\; 0000\; 0000\; 0000\; 0000$ 

Here the first bit (Most Significant bit on left) is 1. Hence the number is -ve.

1
1
thank u….i got it
1
1
1 vote
1 vote

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.

0 votes
0 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.
ago
Answer:

Related questions