Lab 2 - FL13 - ECE 198 JL - University of Illinois - Engineering Wiki

Ex c luding divis ion by 0 c harac teriz e the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: de by 0? Modulus with 0? W hat happens to the b inary-c alc ulator program? W hy might this be a good thing? (Hint: remember the lab introduc tion?) 6. Ex c luding divis ion by 0, c harac teriz e the behavior of the modulus operation for pos itive and negative divis ors and dividends (for a total of 2x 2 = 4 c ombinations ). To c ontinue with the res t of this as s ignment, y ou need lec ture 4. Save y our work now and finis h the res t of this as s ignment after lec ture 4 or after y ou watc h the video lec ture/lec ture notes Floating point Run the following c omputations in s ingle-prec is ion (32-bit) floating-point mode: 1. 1000 + 1 2. 3. 4. 5. 6. 7. 8. 9. 11 / 3 100 - 0.25 100 - 0.3 -100 + 0.3 9000 + 0.0001 - 9005 9000 - 9005 + 0.0001 9000 + 0.01 9000 * 0.01 Ans wer the following ques tions in lab2.tx t: 1. W hy is there an error in the fourth c omputation, but not the third? (Hint: how do y ou enc ode 0.25 and 0.3 in floating point?) 2. How does the res ult of the fifth c omputation c omp...
View Full Document

Ask a homework question - tutors are online