Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Representations What all the numbers can mean.

Similar presentations


Presentation on theme: "Number Representations What all the numbers can mean."— Presentation transcript:

1 Number Representations What all the numbers can mean.

2 General Idea In a computer, all information is binary numbers Those numbers have to be interpreted to become the information we want In other words, numbers can represent other things. Another way to think of Digital is “representable by numbers”

3 ASCII American Standard Code for Information Interchange cipher(code) to convert numbers to symbols 1 byte = letter of the alphabet or a symbol when you type, the keyboard sends an ASCII byte to the PC There are 256 possible characters (the number of numbers that can be represented by 1 byte)

4 ASCII examples ! = 51(33h) A to Z = 65(41h) to 90(5Ah) a to z = 97(61h) to 122(7Ah)

5 ASCII Exercise Hello! LetterHello! Hex48h65h6Bh 6Fh33h Bin0100 10000110 0110 1011 0110 11110011

6 ASCII Weaknesses? Think about other languages – you can’t fit ALL those symbols into 256 characters

7 Unicode Unicode (Also called UTF-8) allows up to 4 byes to represent a single character How many different characters possible? 4,294,967,296 (2 32 ) in theory 2,147,483,648 (2 31 ) in real life still enough for every language on earth (including fictional ones like Klingon and Elvish)

8 Other ways computers use numbers This means nothing to us: 000000000000000000000001001000000100 100000010010000000000000000000000000 1000010000011110000000000000

9 cont. But what about this? 0000000000 0001001000 0000000000 0010000100 0001111000 0000000000 or this?

10 Bitmaps a computer interprets an image as a bitmap: a series of bits that represent pixels (picture elements) What about colors?

11 Colors normally, one pixel is 3 bytes (24-bits) 1 byte for each primary color (RGB) FF 00 00 is bright red 00 FF FF is bright cyan (G & B) 33 33 33 is dark grey FF 00 FF is bright magenta (R & B) So how many different colors are there?

12 Understanding A megapixel is a million pixels. If the color is 24-bit, how many bytes is a megapixel? How many megabytes? Cameras are now commonly 5 megapixel (or more)

13 Cameras: Megapixel Myth 1 MP(megapixel) = a million pixels An image 1000 pixels wide and 1000 pixels tall is a megapixel (1000x1000) So how wide and tall is a 2 MP image? 1414x1414 (the SQUARE ROOT of 2 mil.) You’d need 4MP to double the image quality (math: exponential relationship) So the quality difference between 7 and 8 MP is actually pretty small. DON’T pay the extra $100 for the extra megapixel.

14 Final Point A computer sees a bunch of numbers and does math to them. What those numbers mean depend on the instructions given to the computer Are those 1s and 0s a picture? a document? music? It all depends on what we tell the computer to do with those bits.


Download ppt "Number Representations What all the numbers can mean."

Similar presentations


Ads by Google