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)$ $9.51$ and $10.0$ respectively $10.0$ and $9.51$ respectively $9.51$ and $9.51$ respectively $10.0$ and $10.0$ respectively Digital Logic gatecse-2004 digital-logic number-representation normal + – Kathleen asked Sep 18, 2014 • edited Jun 19, 2018 by Pooja Khatri Kathleen 16.4k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply amarVashishth commented Nov 16, 2015 i edited by amarVashishth Nov 17, 2015 reply Follow Share Rewrite the smaller number such that its exponent matches with the exponent of the larger number. 14 votes 14 votes Mayank0343 commented Feb 2, 2020 reply Follow Share @amarVashishth Do you mean smaller number in terms of magnitude without the sign ? As in the accepted answer −1.11×10^2+7.51×10^0 , -1.11 (also -111 < 7.51) is smaller than 7.51, but we are rewriting 7.51 's exponent to match with 1.11' s exponent 1 votes 1 votes Please log in or register to add a comment.
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$ Arjun answered Nov 16, 2015 • edited May 21, 2019 by Naveen Kumar 3 Arjun comment Share Follow See all 23 Comments See all 23 23 Comments reply Digvijay Pandey commented Nov 16, 2015 reply Follow Share sir Is it not same thing as i had posted ? 1 votes 1 votes Arjun commented Nov 17, 2015 reply Follow Share yes, I just gave an intermediate step :) 5 votes 5 votes Mithlesh Upadhyay commented Nov 18, 2015 i reshown by Arjun Nov 25, 2017 reply Follow Share Sir, your first explanation is nice , but for second ? http://math.stackexchange.com/questions/1531692/two-expressions-using-three-digit-floating-point-arithmetic-with-rounding 1 votes 1 votes Arjun commented Nov 18, 2015 reply Follow Share @Mithilesh I had told you not to edit others answer. Everyone won't be thinking like you. 0 votes 0 votes Arjun commented Nov 18, 2015 reply Follow Share there is difference in the answers rt? 0 votes 0 votes mcjoshi commented Sep 25, 2016 reply Follow Share @Arjun sir Your ref. link is as always amazing. 10 votes 10 votes Nit9 commented Dec 10, 2016 reply Follow Share +7.51∗10^0 why 7.51 is not rounded of to 8.00 in first part addition? 0 votes 0 votes Arjun commented Dec 10, 2016 reply Follow Share Why it should be rounded? Rounding happens only when it is really required (as we loose precision) or when explicitly told. Also, this question is regarding fixed point arithmetic which is in GATE syllabus but not well covered in most books. 7 votes 7 votes monanshi commented Nov 25, 2017 reply Follow Share @Arjun Sir, Here in the following step: (−111.+7.51) = −1.11∗102+7.51∗100 = −1.1∗102+0.08∗102 The rule is to convert the exponent of smaller number as same as of the larger. But, here lager number is 7.51, whose exponent is zero. But, here you have converted the exponent of larger number to that of smaller's (i.e., exponent of 7.51 (larger) to that of -1.11 (smaller))? Can you please explain it? 0 votes 0 votes GateAspirant999 commented Jan 8, 2018 reply Follow Share So floating point additions are not associative right? 0 votes 0 votes suyashj commented Jan 11, 2018 reply Follow Share Thanks for the link @Arjun sir thanks a lot ...really it was life saving ... 0 votes 0 votes talha hashim commented Sep 8, 2018 reply Follow Share @Arjun sir link is wonderful 0 votes 0 votes logan1x commented Sep 20, 2018 reply Follow Share Thank you for explaination. 0 votes 0 votes chandra sai commented May 13, 2019 reply Follow Share In 3rd line of Arjun sir answer he wrote, −1.1×10^2+0.08×10^2=−1.03×10^2, but The actual result of this calculation is -1.02*10^2 ... Which makes the answer as 11.0 Kindly explain If I am wrong here? 0 votes 0 votes Arjun commented May 14, 2019 reply Follow Share The 1 missing was a typo. Fixed now. 0 votes 0 votes commenter commenter commented Oct 18, 2019 reply Follow Share What is the significance of "three digit" floating point arithmetic? The floating point representation must have 3 digits in its mantissa? or floating point representation must have 2 digits in its mantissa with implicit digit just before decimal point? 0 votes 0 votes mrinmoyh commented Dec 24, 2019 reply Follow Share $7.51 * 10^{0}$ = $0.0751 * 10^{-2}$ will be rounded like $0.07 * 10^{-2}$ why 0.08 ?? [ rounding means tuncating to fit into the space] 0 votes 0 votes Manjyot Singh Nanra commented Jan 4, 2020 reply Follow Share Reference link is not working! 0 votes 0 votes jatinmittal199510 commented Apr 11, 2021 reply Follow Share @arjun sir, link says that first add the mantissa then at last do the round off but in your steps you have taken round off first and then later done the addition of mantissa. Though, the result won't change for this problem and I was crafting few other examples for which the answer was not changing. Not sure whether both will result the same ALWAYS. 1 votes 1 votes neel19 commented Jun 17, 2021 reply Follow Share three-digit floating point arithmetic – means in total three digit before and after the decimal point? 0 votes 0 votes neel19 commented Jun 17, 2021 reply Follow Share @Arjun sir, In the link given it is said that the hidden bit is for binary floating-point numbers, but here the numbers are in decimal format. So why mantissa has only 2 digit? 0 votes 0 votes Abhrajyoti00 commented Jan 6, 2023 i edited by Abhrajyoti00 Jan 6, 2023 reply Follow Share @Arjun Sir, @Kabir5454, I have the same question as @jatinmittal199510. EDIT: Ok, Got it. The next examples on that page shows that we first need to normalize the numbers and then start doing the operations. 0 votes 0 votes thansen commented Jan 11 reply Follow Share three-digit floating point arithmetic with rounding what does this mean ? we have to take total three digit before and after the decimal ? 0 votes 0 votes Please log in or register to add a comment.
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 Digvijay Pandey answered Apr 23, 2015 Digvijay Pandey comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Digvijay Pandey commented Nov 16, 2015 reply Follow Share to apply operation ur operand should be THREE FLOATING POINT ARITHMATIC .. 2 votes 2 votes Ram Sharma1 commented Jul 19, 2016 reply Follow Share Please explain the meaning "three-digit floating point arithmetic with rounding" 3 votes 3 votes amitqy commented Feb 13, 2019 reply Follow Share In n-digit floating-point arithmetic, numbers are represented by a signed n-digit integer and an exponent 113. in floating point is represented as 1.11 x 10^2 0 votes 0 votes Please log in or register to add a comment.
8 votes 8 votes much better explanation http://math.stackexchange.com/questions/1531692/two-expressions-using-three-digit-floating-point-arithmetic-with-rounding ANKIT CHAUHAN 1 answered Nov 23, 2016 ANKIT CHAUHAN 1 comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes I have a doubt why .10349 is rounded off to .103 its should be .104 please help Kimimp answered Aug 27, 2019 Kimimp comment Share Follow See 1 comment See all 1 1 comment reply nitin-787 commented Nov 20, 2023 reply Follow Share because 0.103 is close to 0.10349… if it would have been 0.10351 then it would be 0.104 0 votes 0 votes Please log in or register to add a comment.