240 likes | 574 Views
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes. Bit. 0 or 1. Byte. Equivalent to 8 bits. KiloByte. 2 10 Bytes (approx. a thousand) K - Thousand 10 3. MegaByte. 2 20 Bytes (approx. a million) M - Million 10 6. GigaByte. 2 30 Bytes (approx. a billion) G - Billion 10 9.
E N D
Bit • 0 or 1
Byte • Equivalent to 8 bits
KiloByte • 2 10 Bytes (approx. a thousand) • K - Thousand 103
MegaByte • 2 20 Bytes (approx. a million) • M - Million 106
GigaByte • 2 30 Bytes (approx. a billion) • G - Billion 109
TeraByte • 2 40 Bytes (approx. a trillion) • T - Trillion 1012
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
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 = ?
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 is 66 = 0100 0010 etc.
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.
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
Hexadecimal to Decimal 8 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
Decimal to Hexadecimal 125 in base 16 is: 7D 16*7 = 112 and 125-112 = 13. Therefore, there is a remainder of 13 (or D).
Decimal to Hexadecimal 191 in base 16 is: BF 16*11 = 176 and 191-176 = 15. Therefore, there is a remainder of 15 (or F).