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

Multiplication division modulus in this c alc ulators

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: n would y ou s ee (in uns igned mode)? W hat are the advantages and dis advantages of uns igned formats (c ompared to s igned formats )? Multiplication, division, modulus In this c alc ulator's language, “*” means multiply , “/” means divide, and “% ” means modulus . In s igned 16-bit mode, run the following c omputations : 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 22 * 33 100 * 500 -100 * 500 12 / 3 11 / 3 10 / 3 9/3 12 % 3 11 % 3 10 % 3 9%3 Ans wer the following ques tions : 1. W hat res ult do y ou get in the s ec ond and third c omputations ? W hy ? 2. W hat res ults do y ou get from c omputations 4-7? W hy ? (Hint: c an s igned 16-bit enc oding repres ent frac tions ?) 3. Does the res ult from c omputations 4-7 get rounded to the neares t integer? If not, what ac tually happens ? W here might this behavior be us eful? (Hint: what if y ou wanted to divide 11 c andies between 3 people?) 4. W hat does the modulus operator do for pos itive integers ? 5. W hat happens when y ou divi...
View Full Document

This document was uploaded on 03/22/2014.

Ask a homework question - tutors are online