Title: Lots of Bits
1Lots of Bits
- Representations and Moores Law
2http//www.2wheelbikes.com/sitebuilder/images/cabl
e-lock-comb-bike-accessories-469x345.jpg
3How many bit strings of length n?
- Adding one bit doubles the number
4Text
- 8 bits per character
- A 01000001
- ( 00101000
- How many combinations of 8 bits?
- 2 2 2 2 2 2 2 2 28 256
5Hexadecimal Digits
6ASCIIAmerican Standard Code for Information
InterchangeCharacter represented by Hex xy, e.g.
4B is K
7ASCII Underneath
8http//farm4.static.flickr.com/3021/2494096946_2bf
86f8571.jpg?v0
9What if you need more than 256 characters?
- Unicode
- 32 bits per character
10(No Transcript)
11(No Transcript)
12(No Transcript)
13(No Transcript)
14How many Unicode characters?32 bits each, so
there are in all
15(No Transcript)
16Binary counting1110, or 110 and carry 1
17Positive and Negative Numbers
- Signed and unsigned numbers
- Unsigned 28256 bit patterns represent 0 255
- Signed 28 bit patterns represent -128 127
- Leftmost bit sign bit 0 gt 0 or pos, 1 gt neg
- Largest 8-bit positive number 01111111 127
- 0 00000000
- Most negative negative number
- 10000000 -128
18Negative numbers
-1 11111111so addition works the same for
positive and negative numbers
19Biggest Numbers
- Biggest positive number 01111111 (like 999999
on a car odometer) - Most negative negative number 10000000
20Biggest Positive Number 1 Most Negative
Negative Number
OVERFLOW!
21The Comair Christmas Glitch
- 16 bits for monthly count of crew changes
- Biggest positive 16-bit number 32,767
- December was a bad month, lots of snowstorms,
lots of flights rescheduled - As Christmas approached the count went from
32,767 to -32,768 by adding 1
22Bytes
- 1 byte 8 bits 2 hex digits 1 character
- 210 1024 bytes 1 kilobyte 1KB
- 220 1,048,576 bytes 1 megabyte 1MB
- 230 bytes 1 gigabyte 1GB a billion
- 240 bytes 1 terabyte 1TB a trillion
- 250 bytes 1 petabyte 1PB a quadrillion
- 260 bytes 1 exabyte 1EB a quintillion bytes
- 270 zetta
- 280 yotta
23K
- All this terminology based on the accident that
- Which is 1K?
- There are new standard names
- 1 kibibyte 1000 bytes
- vs. 1 kilobyte 1024 bytes
- But almost no one uses kibi-, mebi-, etc.
24(No Transcript)
25(No Transcript)
26Moores Law (1965)
- The number of transistors on a silicon chip
doubles every 18 or 12, or 24 months - 1965 64 26
- 2008 2 billion 231
- 25 doublings in 43 years one doubling every 20
months
27Example of linear increase
28Example of exponential increase
- Now for the y axis use instead lg(y) the
exponent e such that 2ey
29Same plot, using lg(y) instead of y
30One of the Greatest Engineering Achievements
- An increase by a factor of 225 is about 30
millionfold - If human speed had increased that much over the
past 43 years, we would now be traveling faster
than the speed of light