Presentation is loading. Please wait.

Presentation is loading. Please wait.

LSP 121 The Power of Numbers. Conversions Convert 23 feet to inches – We all know there are 12 inches to a foot, so 12 * 23 = 276 inches – But what did.

Similar presentations


Presentation on theme: "LSP 121 The Power of Numbers. Conversions Convert 23 feet to inches – We all know there are 12 inches to a foot, so 12 * 23 = 276 inches – But what did."— Presentation transcript:

1 LSP 121 The Power of Numbers

2 Conversions Convert 23 feet to inches – We all know there are 12 inches to a foot, so 12 * 23 = 276 inches – But what did we really do? 23 feet x 12 inches 1 foot

3 Conversions At a French department store, the price for a pair of Levi jeans is 45 euros. What is that in U.S. dollars? 45 euros x $1.37 1 euro = $61.65

4 Chain of Conversion You want to carpet your bedroom. It is 23 feet x 18 feet. How many square yards is that? 1 day x 24 hours 60 min 60 sec xx= 86,400 sec 1 day 1 hour1 min How many seconds in one day? 23 ft x 18 ft = 414 ft 2 414 ft 2 x 1 yd 2 9 ft 2 = 46 yd 2

5 Chain of Conversion To connect a computer to the Internet, the computer needs an IP address. Currently IP addresses are 32 bits in length. How many addresses is that? IP addresses are binary, so raise 2 to the 32 nd power Or 2 32 = 4,294,967,296 If they assign 1000 addresses a day, how long would those addresses last (in years) ?

6 Chain of Conversion 2 32 addresses x 1 day/1000 addresses = 4,294,967.296 days 4,294,967.296 days * 1 year/365 days = 11767.03 years Be careful! Don’t do: 2 32 addresses x 1000 addresses/1 day The term addresses won’t cancel!

7 Standardized Units In the U.S., we still use: Lengths Inch Foot Yard Rod (5.5 yards) Fathom (6 feet) Furlong (1/8 mile) Mile Nautical mile (6076.1 feet) Weights Grain (0.0648 gram) Ounce Pound Ton Long ton (2240 pounds) Liquid measures Teaspoon Tablespoon (3 t) Fluid ounce (2 T) Cup (8 fluid ounces) Pint (16 fluid ounces) Quart (2 pints) Gallon (4 quarts) Barrel of petroleum (42 gals) Dry measures Dry pint Dry quart Peck (8 dry quarts) Bushel (4 pecks) Cord (128 cubic feet) Classic College of Engineering “expression”: Units of measure will always be stated in least likely terms. Example: Furlongs per fortnight.

8 Standardized Units Most of the rest of the world uses the metric system: meter – length gram – mass second – time liter - volume Small Values decid10 -1 one-tenth centic10 -2 one-hundredth millim10 -3 one-thousandth microµ10 -6 one-millionth nanon10 -9 one-billionth picop10 -12 one-trillionth Large Values decada10 1 (ten) hectoh10 2 (hundred) kilok10 3 (thousand) (such as 200 kbps transfer speed) megaM10 6 (million) gigaG10 9 (billion) teraT10 12 (trillion) unless……………….. Note: 2.3E+06 = 2.3 x 10 6 4.6E-04 = 0.00046

9 Standardized Units? What about computer memory? Note: memory is based on binary so we use base 2 K = kilo (kilobytes) = 2 10 = 1024 M = mega (megabytes) = 2 20 = 1,048,576 G = giga (gigabytes) = 2 30 = 1,073,741,824 T = tera (terabytes) = 2 40 = 1,099,511,627,776 followed by peta, exa, zetta, yotta Some groups suggested we should call these kibi, mebi, gibi, tebi, pebi, exbi (and yes, zebi and yobi)

10 Binary Numbers Why should anyone learn binary? All music, video, data, and computer programs are stored in computer memory/storage Computers are based on the binary number system (on/off or 1/0) If your iPod / computer / flash drive has x storage capacity, what does that mean?

11 Binary Numbers Before we discuss binary arithmetic, do you really understand decimal arithmetic? 1024 = 1 x 10 3 + 0 x 10 2 + 2 x 10 1 + 4 x 10 0 Binary numbers are the same, except there are only 2 digits (0 and 1), and the base is 2 10010 = 1 x 2 4 + 0 x 2 3 + 0 x 2 2 + 1 x 2 1 + 0 x 2 0

12 Binary Numbers Let’s play a game. You are a cashier at your favorite store. How do you make $0.86 in change? What if you only have dimes, nickels and pennies? A good cashier always tries to use the biggest coins possible.

13 Binary Numbers You are now working in a foreign country. They don’t have quarters, dimes, or nickels; they have 16 cent pieces, 8 cent pieces, 4 cent pieces, 2 cent pieces, and pennies, and you can only give out at most one of each coin! How do you make change for $0.14? $0.29? Let’s list these coins in order from highest on the left to lowest on the right.

14 Binary Numbers What is the decimal value of binary 10010101? What is the binary value of decimal 83? Use a calculator?

15 Binary Arithmetic Let’s add the following two binary values 10011100 01011010 When a computer does arithmetic, it converts all values to binary. This takes a little bit of time, which is why we say “if you aren’t doing arithmetic with the data, don’t declare it as type numeric”

16 Binary Representation When you type the letter “n” on the keyboard, it converts it to an 8-bit binary value, based on the ASCII character set. So all Word documents are stored sequences of 8-bit ASCII characters (called bytes) All color images are composed of teeny-tiny dots (pixels). Each pixel is composed of so much red, so much green, and so much blue (RGB)

17 Binary Representation Music on iPods and such are stored in binary Music is an analog waveform the waveform is sampled at regular intervals each sample is converted to a binary value (such as 8-bits) the binary values are stored in memory Talking on a cellphone/telephone is also binary all voice is converted to binary in the same way that music is converted to binary

18 Binary Representation So pretty much everything we do technology-wise is binary Computer work Music Television Photography/video Telephones/cellphones Is there any major at DePaul that does not use computers or binary numbers?


Download ppt "LSP 121 The Power of Numbers. Conversions Convert 23 feet to inches – We all know there are 12 inches to a foot, so 12 * 23 = 276 inches – But what did."

Similar presentations


Ads by Google