Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bits and Bytes Behind the scenes in your computer.

Similar presentations


Presentation on theme: "Bits and Bytes Behind the scenes in your computer."— Presentation transcript:

1 Bits and Bytes Behind the scenes in your computer

2 All computer storage is organized into bytes Think of each byte as a little storage bin Each byte is made up of 8 bits Each bit is an electronic circuit that is either on or off (off = 0, on = 1) A specific sequence of 0’s and 1’s in a byte is called a bit pattern

3 So, how many bytes are in your computer? Common Prefixes Kilo10 3 1,000Thousand Mega10 6 1,000,000Million Giga10 9 1,000,000,000Billion Tera ,000,000,000,000Trillion Typical Capacities: RAM: 1, 2, 4, 6 or 8 GB Diskette: 1.44 MB Flash drive: 2, 4, 8, 16, 32, 64, 128 GB CD: 800 MB DVD: 4.7 GB Hard Drive: 500 GB – 2 TB

4 Converting Between Units To Convert … FromToAction KBBytesMultiply by 1,000 (move decimal point 3 places right) MBBytesMultiply by 1,000,000 (move decimal point 6 places right) GBBytesMultiply by 1,000,000,000 (move decimal point 9 places right) BytesKBDivide by 1,000 (move decimal point 3 places left) BytesMBDivide by 1,000,000 (move decimal point 6 places left) BytesGBDivide by 1,000,000,000 (move decimal point 9 places left) Example 1: 5200 KB = ? MB 5200 × 1000 = 5,200,000 bytes 5,200,000 /1,000,000 = 5.2 MB Example 2: 7.5 GB = ? KB 7.5 × 1,000,000,000 = 7,500,000,000 bytes 7,500,000,000 / 1000 = 7,500,000 KB

5 You Try: 3.2 MB = ? Bytes 6.4 GB = ? MB 57,000 Bytes = ? KB 25,000 KB = ? MB

6 What kinds of information do you store on your computer? numerical values (binary number system) text/character data (ASCII or Unicode) program instructions (machine language) images (jpg, gif, tiff, bmp, wmf, etc.) video (mp4, mov, avi, wmv, etc.) music (mp3, wav, wma, au, etc.)

7 “Kathy Ames” is text It would be stored like this using ASCII codesASCII codes

8 Numerical values needed for arithmetic are stored using a different scheme The numerical value 40 would be stored like this using the binary number system (note that “bit” stands for “binary digit”)

9 How do binary numbers work? Decimal Number SystemBinary Number System Base 10Base 2 10 digits (0,1,2,3,4,5,6,7,8,9)2 digits (0,1) Positional values based on powers of 10Positional values based on powers of 2 Positional Values Binary Number 8-bit binary number

10 Converting from Binary to Decimal Positional Values Binary Number What is the decimal value of the bit pattern ? Simple! Just add up the positional values where the 1’s appear: = 106 So, we say that = 106 decimal

11 Converting from Decimal to Binary Positional Values Binary Number How can we represent the decimal value 151 in binary? Simple! Just think about money and consider positional values as bills and 151 “dollars” as the amount we must make. Then “count change” from largest “denomination” to smallest until total value of change is accumulated.

12 Converting from Decimal to Binary Positional Values Binary Number 1 How can we represent the decimal value 151 in binary? Running Total: 128

13 Converting from Decimal to Binary Positional Values Binary Number 10 How can we represent the decimal value 151 in binary? Running Total: 128

14 Converting from Decimal to Binary Positional Values Binary Number 100 How can we represent the decimal value 151 in binary? Running Total: 128

15 Converting from Decimal to Binary Positional Values Binary Number 1001 How can we represent the decimal value 151 in binary? Running Total: = 144

16 Converting from Decimal to Binary Positional Values Binary Number How can we represent the decimal value 151 in binary? Running Total: = 144

17 Converting from Decimal to Binary Positional Values Binary Number How can we represent the decimal value 151 in binary? Running Total: = 148

18 Converting from Decimal to Binary Positional Values Binary Number How can we represent the decimal value 151 in binary? Running Total: = 150

19 Converting from Decimal to Binary Positional Values Binary Number How can we represent the decimal value 151 in binary? Running Total: = 151 So, 151 decimal =

20 So What is Hexadecimal? (often called “hex”) A base 16 number system 16 possible digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F Positional values are powers of 16 Mainly used is as “short hand” for binary 1 hex digit = 4 binary digits

21 Hex Digits Dec Value Hex Digit bit binary Dec Value Hex Digit 89ABCDEF 4-bit binary

22 Converting from Hex to Decimal Positional Values Hex Number 3B What is the decimal value of hex 3B? Simple! 3 × 16 + B × 1 = 3 × × 1 = = 59 So, we say that 3B hex = 59 decimal

23 Converting from Hex to Decimal Positional Values Hex Number E4 What is the decimal value of hex E4? Simple! E × × 1 = 14 × × 1 = = 228 So, we say that E4 hex = 228 decimal

24 Let’s take another look at Hex 3B Dec Value Hex Digit bit binary Dec Value Hex Digit 89ABCDEF 4-bit binary First DigitSecond Digit 3B So Hex 3B = Binary (And note that Binary = = 59 Decimal)

25 Let’s take another look at Hex E4 Dec Value Hex Digit bit binary Dec Value Hex Digit 89ABCDEF 4-bit binary First DigitSecond Digit E So Hex E4 = Binary (And note that Binary = = 228 Decimal)

26 What about converting Binary to Hex? Dec Value Hex Digit bit binary Dec Value Hex Digit 89ABCDEF 4-bit binary First DigitSecond Digit

27 What about converting Binary to Hex? Dec Value Hex Digit bit binary Dec Value Hex Digit 89ABCDEF 4-bit binary First DigitSecond Digit A2 So Binary = A2 Hex

28 Verify that Binary and Hex A2 have the same Decimal values Binary = = 162 Hex A2 = A × × 1 = 10 × × 1 = = 162

29 You try: Convert 210 Decimal to: Binary: Hex: Convert 2D Hex to: Binary: Decimal: Convert Binary to: Hex: Decimal:


Download ppt "Bits and Bytes Behind the scenes in your computer."

Similar presentations


Ads by Google