- x0 = 1; x1 = x; x2 = x * x; x-1 = 1/x; x-2 = 1/ (x*x);
- leading zeros are not significant, and unless they appear to the right of a decimal place have no effect on the value of the number
- when adding and subtracting the decimal points of real numbers must be vertically aligned
- when dividing two real numbers they must both be adjusted (multiplied by their base) until the divisor is an integer
- for real number addition and subtraction the exponents must be the same
- for real number multiplication one must multiply the mantissas and add the exponents
- for real number division one must divide the mantissas and subtract the exponents
- - represented by 10 distinct symbols: 0,1,2,3,4,5,6,7,8,9
- - based on powers of 10
- - each place to the left of a digit in a string increases by a power of 10; each place to the right of a digit in a string decreases by a power of 10
Example: 4769210 in expanded notation looks like:
= 4 * 104 + 7 * 103 + 6 * 102 + 9 * 101 + 2 * 100
= 4 * 10000 + 7 * 1000 + 6 * 100 * 9 * 10 + 2 * 1
To count in decimal: 0,1,2,...,9, then back to 0 and carry a one into the next (left) column { like on an odometer}. From 10, we go 11, 12, .. to 19, and then back to 0 again in the first column and carry another 1 into the next column, making it a 2 and so on.
- - represented by 2 distinct symbols: 0,1
- - based on powers of 2
- - each place to the left of a digit in a string increases by a power of 2; each place to the right of a digit in a string decreases by a power of 2
Example: 101110012 in expanded notation looks like:
- = 1 * 27 + 0 * 26 + 1 * 25 + 1 * 24 + 1 * 23 + 0 * 22 + 0 * 21 + 1 * 20
- = 1 * 128 + 0 * 64 + 1 * 32 + 1 * 16 + 1 * 8 + 0 * 4 + 0 * 2 + 1 * 1
- = 128 + 32 + 16 + 8 + 1
- = 185
- Counting in binary looks like this: (look for the repeating patterns)
0 00 000 16 10 000 1 00 001 17 10 001 2 00 010 18 10 010 3 00 011 19 10 011 4 00 100 20 10 100 5 00 101 21 10 101 6 00 110 22 10 110 7 00 111 23 10 111 8 01 000 24 11 000 9 01 001 25 11 001 10 01 010 26 11 010 11 01 011 27 11 011 12 01 100 28 11 100 13 01 101 29 11 101 14 01 110 30 11 110 15 01 111 31 11 111
Hexadecimal Defined (and conversions to decimal)
- - represented by 8 distinct symbols: 0,1,2,3,4,5,6,7
- - based on powers of 8
- - each place to the left of a digit in a string increases by a power of 8; each place to the right of a digit in a string decreases by a power of 8
Example: 12438 in expanded notation looks like:
- = 1 * 83 + 2 * 82 + 4 * 81 + 3 * 80
- = 1 * 512 + 2 * 64 + 4 * 8 + 3 * 1
- = 512 + 128 + 32 + 3
- = 675
- Counting in octal looks like this: (look for the repeating patterns 7 compare the octal digits with the equivalent binary digits)
0 00 16 20 1 01 17 21 2 02 18 22 3 03 19 23 4 04 20 24 5 05 21 25 6 06 22 26 7 07 23 27 8 10 24 30 9 11 25 31 10 12 26 32 11 13 27 33 12 14 28 34 13 15 29 35 14 16 30 36 15 17 31 37
- - represented by 16 distinct symbols: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
- - based on powers of 16
- - each place to the left of a digit in a string increases by a power of 16; each place to the right of a digit in a string decreases by a power of 16
Example: 124316 in expanded notation looks like:
- = 1 * 163 + 2 * 162 + 4 * 161 + 3 * 160
- = 1 * 4096 + 2 * 256 + 4 * 16 + 3 * 1
- = 4096 + 512 + 64 + 3
- = 4675
- Counting in hexadecimal looks like this: (look for the repeating patterns & compare the hex digits with the equivalent binary digits)
0 00 16 10 1 01 17 11 2 02 18 12 3 03 19 13 4 04 20 14 5 05 21 15 6 06 22 16 7 07 23 17 8 08 24 18 9 09 25 19 10 0A 26 1A 11 0B 27 1B 12 0C 28 1C 13 0D 29 1D 14 0E 30 1E 15 0F 31 1F
- bin <-> hex
- Look again at the definition for octal numbers and compare the decimal, binary, octal, and hex values against each other.
dec. binary octal hex dec binary octal hex 0 00 000 00 00 16 10 000 20 10 1 00 001 01 01 17 10 001 21 11 2 00 010 02 02 18 10 010 22 12 3 00 011 03 03 19 10 011 23 13 4 00 100 04 04 20 10 100 24 14 5 00 101 05 05 21 10 101 25 15 6 00 110 06 06 22 10 110 26 16 7 00 111 07 07 23 10 111 27 17 8 01 000 10 08 24 11 000 30 18 9 01 001 11 09 25 11 001 31 19 10 01 010 12 0A 26 11 010 32 1A 11 01 011 13 0B 27 11 011 33 1B 12 01 100 14 0C 28 11 100 34 1C 13 01 101 15 0D 29 11 101 35 1D 14 01 110 16 0E 30 11 110 36 1E 15 01 111 17 0F 31 11 111 37 1F
|
|
|
|
|
- One's Compliment
- Two's Compliment
| N | N to the power 2 | N | N to the power 2 |
| 0 |
1
|
16 |
65536
|
| 1 |
2
|
17 |
131072
|
| 2 |
4
|
18 |
262144
|
| 3 |
8
|
19 |
524288
|
| 4 |
16
|
20 |
1048576
|
| 5 |
32
|
21 |
2097152
|
| 6 |
64
|
22 |
4194304
|
| 7 |
128
|
23 |
8388608
|
| 8 |
256
|
24 |
16777216
|
| 9 |
512
|
25 |
33554432
|
| 10 |
1024
|
26 |
67108864
|
| 11 |
2048
|
27 |
134217728
|
| 12 |
4096
|
28 |
168435456
|
| 13 |
8192
|
29 |
336870912
|
| 14 |
16384
|
30 |
673741824
|
| 15 |
32768
|
31 |
1347483648
|
|
in decimal
|
in octal
|
unsigned
|
to convert
|
now 'add'
|
||
|
47
|
57
|
000 101 111
|
compliment :
|
and add 1
|
000 101 111
|
|
|
-18
|
-22
|
-000 010 010
|
111 101 101
|
111 101 110
|
111 101 110
|
|
|
29
|
35
|
000 011 101
|
[1] 000 011 101
|
|
|
in decimal
|
in octal
|
unsigned
|
to convert
|
now 'add'
|
convert back
|
|||
|
64
|
100
|
001 000 000
|
compliment :
|
and add 1
|
001 000 000
|
compliment: |
and add 1
|
|
|
67
|
-103
|
-001 000 011
|
110 111 100
|
110 111 101
|
110 111 101
|
|||
|
-3
|
-3
|
000 000 011
|
[0] 111 111 101
|
000 000 010 |
000 000 011 |
|
|
|
|
|
|
|
|
AND
|
0
|
1
|
|
0
|
0
|
0
|
|
1
|
0
|
1
|
|
OR
|
0
|
1
|
|
0
|
0
|
1
|
|
1
|
1
|
1
|
All logical operations can be built using these two basics, but there are two others that are used so commonly that we will define them as well. They are:
|
XOR
|
0
|
1
|
|
0
|
0
|
1
|
|
1
|
1
|
0
|
|
NAND
|
0
|
1
|
|
0
|
1
|
1
|
|
1
|
1
|
0
|