edited by
7,591 views
8 votes
8 votes

A computer uses $8$ digit mantissa and $2$ digit exponent. If $a=0.052$ and $b=28E+11$ then $b+a-b$ will :

  1. result in an overflow error
  2. result in an underflow error
  3. be $0$
  4. be $5.28E$+$11$
edited by

4 Answers

Best answer
14 votes
14 votes

$a = 0.052$, mantissa $=0.52$, exponent $= -1$.

$b = 28 E +11$, mantissa $=0.28$, exponent $= 13$.

Now, to do $b + a$, we have to make the exponent same. Lets do this by rewriting $b$ as shown here

So, $b = 28000000000000 E -1$. So, $b+a = 28000000000000.52E -1$. 

Using 8 digit mantissa, this will be truncated to 0.28000000 with exponent as 13 which is $28 E +11$. So, now $b-b = 0$. 

edited by
19 votes
19 votes

In standard form: a=0.052 = 0.52 E-1; and  b=28E+11=0.28 E+13

To add b+a, Small exponent number (a) is shifted to (13- -1 =14 ) places to right side

0.0000000000000052E+13.

But computer uses only 8 digit mantissa. Digits beyond 8th position will be discarded.

So a = 0.00000000E+13 = 0.0 E+13

Hence b+a = (0.28E+13) + (0.0E+13 ) = 0.28E+13

Then b+a-b = (0.28E+13)- (0.28E+13) =0

4 votes
4 votes

Answer is C i.e, 0

Explanation: 

Addition will be performed first. b+a evaluate to 'b' as a significant digits of 'a' will be lost when it is converted to exponent 11.So b+a-b is b-b which is 0.

In other words,

'a' value is very less compare to 'b'.Once you perform exponent of 11 of 'b' then 'a' value becomes negligible.It means 'a' value can't change the world of 'b' with that power.So we consider 'a' is zero/nothing and 'b' is left. So 'b' - 'b' becomes 0.

edited by
4 votes
4 votes

Let's break down the question first: 

A computer uses 8 digit mantissa and 2 digit exponent

"digit" means we're talking about decimal number system, and not binary(terminology: bits). So, we need not convert any given number to binary.

 

a=0.052 and b=28E+11

What does this E + 11 mean? It means $* 10^{11}$, or, 11 zeroes after the number 28.


 

Now let's solve this:

a = 0.052

b = 2800000000000

 

Standard forms:

a = 0.52 E-1

b = 0.28 E+13

 

To do a+b, or any operation; we make the exponents equal.

a = 0.0000000000000052 E+13 //Added 14 zeroes after decimal

b= 0.28 E+13

Now, as mantissa is only realised upto 8 digits, a is seen as

a = 0.00000000 E+13

a is as good as 0, so b+a = b+0 = b.

 

So, b+a-b = b+0-b = b-b = 0.


 

Solving by making exponents equal the other way around:-

 

a = 0.52 E-1

b = 28000000000000.0 E-1

b+a = 28000000000000.52 E-1

Now this term minus b:-

28000000000000.52 E-1 - 28000000000000.0 E-1

=00000000000000.52 E-1

 

Standard form:

0.0000000000000052 E+13

Mantissa is realised only until 8 digits

So, 0.00000000 E+13

=0


 

Answer:

Related questions

10 votes
10 votes
2 answers
1
go_editor asked Jun 12, 2016
5,074 views
If $(12x)_3 = (123)_x$, then the value of $x$ is$3$$3$ or $4$$2$None of these
10 votes
10 votes
1 answer
2
go_editor asked Jun 11, 2016
8,176 views
If $N^2 = (7601)_8$ where $N$ is a positive integer, then the value of $N$ is$(241)_5$$(143)_6$$(165)_7$$(39)_{16}$
0 votes
0 votes
1 answer
4