edited by
16,026 views
42 votes
42 votes

What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding?

$(113. + -111.) + 7.51$

$113. + (-111. + 7.51)$

  1. $9.51$ and $10.0$ respectively

  2. $10.0$ and $9.51$ respectively

  3. $9.51$ and $9.51$ respectively

  4. $10.0$ and $10.0$ respectively

edited by

5 Answers

Best answer
88 votes
88 votes

$(113. + -111.) = 1.13 \times 10^2 + -1.11 \times 10^2 = 0.02 \times 10^2 = 2.0 \times 10^0$

$2.0 \times 10^0 + 7.51 \times 10^0 = 9.51 \times 10^0 $

$(-111. + 7.51) = -1.11 \times 10^2 + 7.51 \times 10^0 = -1.11\times 10^2 + 0.08 \times 10^2 = -1.03 \times 10^2 $

$113. + -1.03 \times 10^2 = 1.13 \times 10^2 + -1.03 \times 10^2 = 0.1 \times 10^2 = 10.0$

Reference: https://www.doc.ic.ac.uk/~eedwards/compsys/float/ 

Correct Answer: $A$

edited by
30 votes
30 votes
3 digit floating point arithmetic is used..
(113.+-111.)+7.51 = 2.00 + 7.51 = 9.51
113.+(-111.+7.51) = 113. + (-111. + 8.00) //rounding off to make compatible 7.51 and 111. with respect  3 digit floating point arithmetic
113. - 103. = 10.0
1 votes
1 votes
I have a doubt why .10349 is rounded off to .103 its should be .104

please help
Answer:

Related questions

27 votes
27 votes
5 answers
1
Kathleen asked Sep 18, 2014
18,977 views
Let $A = 1111 1010$ and $B = 0000 1010$ be two $8-bit$ $2’s$ complement numbers. Their product in $2’s$ complement is$1100 0100$$1001 1100$$1010 0101$$1101 0101$
19 votes
19 votes
2 answers
2
Kathleen asked Sep 18, 2014
6,314 views
If $73_x$ (in base-x number system) is equal to $54_y$ (in base $y$-number system), the possible values of $x$ and $y$ are$8, 16$$10, 12$$9, 13$$8, 11$
44 votes
44 votes
5 answers
4
Kathleen asked Sep 18, 2014
18,991 views
Consider the partial implementation of a $2-bit$ counter using $T$ flip-flops following the sequence $0-2-3-1-0,$ as shown below.To complete the circuit, the input $X$ sh...