16
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.

Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Embed Size (px)

Citation preview

Page 1: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.

Page 2: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Bit

0 or 1

Page 3: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Byte

Equivalent to 8 bits

Page 4: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

KiloByte

2 10 Bytes (approx. a thousand) K - Thousand 103

Page 5: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

MegaByte

2 20 Bytes (approx. a million) M - Million 106

Page 6: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

GigaByte

2 30 Bytes (approx. a billion) G - Billion 109

Page 7: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

TeraByte

2 40 Bytes (approx. a trillion) T - Trillion 1012

Page 8: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Decimal (compare to binary) 451 = 4*10 2 + 5*10 1 + 1*10 0

4037 = 4*10 3 + 0*10 2 + 3*10 1 + 7*10 0

52305 = 5*10 4 + 2*10 3 + 3*10 2 + 0*10 1 + 5*10 0

Page 9: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Binary 10011 = 1*24+ 0*23+0*22+1*21+1*20

= 16 + 0 + 0 + 2 + 1

= 19 (in base 10) 101101 = 1*25+ 0*24+ 1*23+1*22+0*21+1*20

= 32 + 0 + 8 + 4 + 0 + 1

= 45 (in base 10) 1101 = ?

Page 10: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

One character is represented using one byte (8 bits)

Page 11: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

ASCII

American Standard Code for Information Interchange

The ASCII character code for the letter A is 65 = 0100 0001

The ASCII character code for the letter B is66 = 0100 0010

etc.

Page 12: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

ASCII (continued)

The ASCII character code for a space (pressing the space bar) is 32 = 0010 0000

The ASCII character code for the letter a is 97 = 0110 0001

The ASCII character code for the letter b is 98 = 0110 0010 etc.

Page 13: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Base 16

Base two - digits run from 0 to 1

Base ten - digits run from 0 to 9

Base sixteen - digits run from 0 to 15

The digits are:

0 1 2 3 4 5 6 7 8 9 A B C D E F

Page 14: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Hexadecimal to Decimal8 D = 8*16 1 + D*16 0

= 8*16 1 + 13*16 0 = 141

D 8 = D*16 1 + 8*16 0

= 13*16 1 + 8*16 0 = 216

3 E = 3*16 1 + E*16 0

= 3*16 1 + 14*16 0 = 62

Page 15: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Decimal to Hexadecimal

16 1 16 0

16 1

7 D

125 in base 16 is:

712516

Therefore, there is a remainder of 13 (or D).

16*7 = 112 and 125-112 = 13.

7D

Page 16: Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes

Decimal to Hexadecimal

16 1 16 0

16 1

B F

191 in base 16 is:

1119116

Therefore, there is a remainder of 15 (or F).

16*11 = 176 and 191-176 = 15.

BF