Computing - Binary Numbers
Computing - Binary Numbers
The "words" of a machine language are called instructions; each of these gives a command to the CPU A computer program (software) is a list of instructions that are executed by the CPU
Off and On
Computers only recognize off and on, like a light switch These switches are represented as binary digits or bits Instructions and data are composed only of a series of bits
Bar codes cost .005 cents per code RFID devices cost 7 to 30 per iterm
1 0 1 0 1 1 0 0
128 64 32 16 8 4 2 1
128 + 0 + 32 + 0 + 8
+ 4 + 0 + 0
128 + 32 + 8 + 4 = 172
0 1 0 1 0 0 0 1
128 64 32 16 8 4 2 1
0 + 64 + 0 + 16 + 0 + 0 + 0 + 1
64 + 16 + 1 = 81
- 128 64
- -
32 16 8 4 2 1
+ 4 + 2 + 1
0 + 0 + 0 + 16 + 0
16 + 4 + 2 + 1 = 23
128 64 32 16 8 4 2 1
128 + 0 + 32 + 16 + 0 + 4 + 2 + 1
128 + 32 + 16 + 4 + 2 + 1 = 183
Bytes
Eight bits form a single byte
00110011 is One Byte of Information
Byte Values:
00000000 = 0 11111111 = 255
Size Matters
Computer memory and storage capacities are represented by their size (megs, gigs, etc)
1 , 0 = 1 bit 4 bits = 1 hex character (nibble) 8 bits = 1 byte 2^10 = 1,024 bytes or 1 Kilobyte (thousand) 2^20 = 1,048,576 bytes or 1 Megabyte (million) 2^30 = 1,073,741,824 or 1 Gigabyte (billion) 2^40 = 1,099,511,627,776 bytes or 1 Terabyte (trillion)
Binary Influence
Nintendo 64
64 = 01000000
Color Combinations
256 Colors
Storage
1024 MB of RAM (1024 is 256 x 4)
IP addresses: 255.255.255.255
IP address are comprised of 4 eight-bit numbers 111111111.11111111.11111111.11111111
Binary to Hexadecimal
Base 16 instead of Base 2 16 characters are used instead of 2 Every Hex character represents 4 bits 4 bits = 1 nibble (or hex character) 2 nibbles (2 hex characters) = 1 byte Easier to get to larger numbers faster
Binary to Hexadecimal
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 = 0000 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 7 = 0111 8 = 1000 9 = 1001 A =1010 B = 1011 C = 1100 D=1101 E= 1110 F = 1111
The hexadecimal system is useful because it can represent every byte (8 bits) as two consecutive hexadecimal digits. It is easier for humans to read hexadecimal numbers than binary numbers.
Base 10 = 30 + 1 or 31 Base 2 = 16 + 8 + 4 + 2 + 1 or 1 1 1 1 1
Base 16 = 16 + 15 or 1F (remember only 1 character in hex --- hence we use the letter F to represent the number 15
128 1
64 0
32 1
16 0 65536
8 0 4096
0-15 (15 characters - 0 1 2 3 4 5 6 7 8 9 A=10 B=11 C=12 D=13 E=14 F=15) Convert Hex to Binary 4-bits = A hex character 8 4 2 1 0 1
1 0
1 0
Base 16 = 16 x 10 (160) + 0 or A 0 (remember only 1 character in hex --hence we use the letter A to represent the number 10
0-15 (15 characters - 0 1 2 3 4 5 6 7 8 9 A=10 B=11 C=12 D=13 E=14 F=15) Convert Hex to Binary 4-bits = F hex character 8 4 2 1 1 1 1 1
0-15 (15 characters - 0 1 2 3 4 5 6 7 8 9 A=10 B=11 C=12 D=13 E=14 F=15) Convert Hex to Binary 4-bits = B hex character 8 4 2 1 0 1 1 1
Upper-case and lower-case have separate values. Numbers and symbols are there too. Boolean Algebra
AASCII Table
1-31 32-64 65-90 91-96 97-122 123-126 127 128-255 Control Codes Symbols Uppercase More Symbols Lowercase More Symbols Delete International Symbols
AASCII Table
C O M P 2 5
Hex gets there FASTER than Binary only for programming code
2. Choose notation.
2. Choose notation.
There are 10 types of people in the world... Those who understand binary, and those who dont.