How_Computers_Represent_Numbers - HOW COMPUTERS REPRESENT...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HOW COMPUTERS REPRESENT NUMBERS EGM 3344 Chapra “Applied Numerical Methods” Chapter 4 I. Integer Representation Illustration: How do we teach children to count? Using their fingers. Counting by 10’s is easy because we learn to count using our 10 fingers. If we want to count to 20, we just count to 10 2x, that is we count be 10’s. So whether you realize it not, every time you use a number, you are representing it as some combination of powers of 10. For example, 210 173 1 10 7 10 3 10 +× +× Note that every time one of our digits gets to 9, we flow over into the next group of 10. So if we went from 179 to 180, the 0 10 slot would go back to 0 and the 1 10 slot would move up to 8. This is what we call a base-10 system. Easy, right? But let’s say I wasn’t a human being but rather a space alien with only one finger on each hand. I would want to count using a base-2 system. How in the world does that work? Well, instead of re-setting to zero every time a digit went from 9 to 10, we would re-set to zero every time a digit went from 1 to 2. So in base-10, 0123456789 then reset to 0, while in base-2, 01 then reset to 0. How would we represent the number 173 in base-2? Let’s write the base-10 representation of 173 in a slightly different way to see how we would do it in base 2: k k 10 Number Value Difference 173 2 100 1 100 73 1 10 7 70 3 0 1 3 3 0 (Number must be 012345678 or 9) So the base-10 representation of 173 is 173. Question: Using the same methodology, what is the base-2 representation of 173?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 5

How_Computers_Represent_Numbers - HOW COMPUTERS REPRESENT...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online