Base 2: The Binary Number System Base 8: The Octal Number System Base 16: The Hexadecimal Number System
Number Base
What is a number base? A number base is a specific collection of symbols on which a number system can be built. The number base familiar to us is base 10, upon which the decimal number system is built. There are ten symbols - 0 to 9 - used in the decimal system.
Place Value
What is the concept of place value? Place value means that the value of a digit in a number depends not only on its own natural value but also on its location in the number. It is used interchangeably with the term positional notation. Place value tells us that the two 4s in the number 3474 have different values, that is, 400 and 4, respectively.
3
Note that the highlighted place value can be filled by the digits in the set {0,1,2,3,4,5,6,7,8,9}. Thus, it can be increased by 1 until it reaches 2 7 9
At this point, the symbols that can be used to fill the highlighted position has been exhausted. Increasing it further causes a shift in place value, and resets the initial place value to zero. Thus 2 8 0
Note that each digit is multiplied by powers of 10, so that the above is equal to
(3x103) + (4x102) + (7x101) + (4x100) = 3474
Note that the rightmost exponent starts from zero and increases by 1 as the place value increases. Hence, the decimal number system is said to be 6 in base 10.
Note that the highlighted place value can be filled by the digits in the set {0,1}. Thus, it can be increased by 1 until it reaches 1 1 0 1
At this point, the symbols that can be used to fill the highlighted position has been exhausted. Increasing it further causes a shift in place value, and resets the initial place value to zero. Thus 1 1 1 0
In the same manner, the binary number 101102 can be expressed as powers of 2
(1x24) + (0x23) + (1x22) + (1x21) + (0x20) = 2210
Note that the rightmost exponent starts from zero and increases by 1 as the place value increases. Hence, the binary number system is said to be in base 2.
10
Note that the highlighted place value can be filled by the digits in the set {0,1,2,3,4,5,6,7}. Thus, it can be increased by 1 until it reaches 3 6 7
At this point, the symbols that can be used to fill the highlighted position has been exhausted. Increasing it further causes a shift in place value, and resets the initial place value to zero. Thus 3 7 0
12
In the same manner, the octal number 721438 can be expressed as powers of 8
(7x84) + (2x83) + (1x82) + (4x81) + (3x80) = 2979510
Note that the rightmost exponent starts from zero and increases by 1 as the place value increases. Hence, the octal number system is said to be in base 8.
14
Base 16: The Hexadecimal Number System The word hexadecimal is a combination of the Greek word hex, meaning six and the Latin word decem, meaning ten. Thus, the number base of the hexadecimal number system is base 16. Since it is in base 16, sixteen symbols are used in the hexadecimal number system. {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F} This means that only the digits in the above set can be used for each position in every place value in a given hexadecimal number.
15
Note that the highlighted place value can be filled by the digits in the set {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}. Thus, it can be increased by 1 until it reaches A 3 B F
At this point, the symbols that can be used to fill the highlighted position has been exhausted. Increasing it further causes a shift in place value, and resets the initial place value to zero. Thus A 3 C 0
16
To avoid confusion, one should write a hexadecimal number with base 16 as its subscript whenever necessary. Thus, the hexadecimal number B23C should be written as B23C16 It should be read as b-two-three-c base sixteen.
17
Base 16: The Hexadecimal Number System Case Study: B23C16 We know that the decimal number 3474 can be expressed as powers of 10
(3x103) + (4x102) + (7x101) + (4x100) = 347410
In the same manner, the hexadecimal number B23C16 can be expressed as powers of 16
(11x163) + (2x162) + (3x161) + (12x160) = 4562810
Note that the rightmost exponent starts from zero and increases by 1 as the place value increases. Hence, the hexadecimal number system is said to be in base 16.
18
3 4 5 6 7 8
3 4 5 6 7 10
3 4 5 6 7 8
19
12 13 14 15 16 17
14 15 16 17 20 21
C D E F 10 11
20
Conversion from Bases 2, 8, 16 to Base 10 Technique: Expand the number using the appropriate base. Convert 110102 to base 10.
(1x24) + (1x23) + (0x22) + (1x21) + (0x20) = ? (1x16) + (1x8) + (0x4) + (1x2) + (0x1) =? 16 + 8 + 0 + 2 + 0 = 2610
Conversion from Bases 2, 8, 16 to Base 10 Technique: Expand the number using the appropriate base. Convert AF416 to base 10.
(Ax162) + (Fx161) + (4x160) (10x256) + (15x16) + (4x1) 2560 + 240 + 4 =? =? = 280410
22
Answer: 100001012
23
Answer: 172678
24
Answer: B6E16
25
Answer: 1011101000012
26
Answer: 1728
27
28
29
CONVERSION OF FRACTIONS
Decimal to Binary Fraction 0.625 = 0.625 x 2 = 1.25 0.25 x 2 = 0.5 0.5 x 2 = 1.0 0.625 = 0.1012 Binary to Decimal Fraction 0.0112 = (0x2-1)+(1x2-2)+(1x2-3) = 0 + 1/4 + 1/8 = 0.25 + 0.125 0.0112 = 0.375
30
1 0 1
BINARY ADDITION
0+0=0 0+1=1 1+0=1 1 + 1 = 0 plus a carry over of 1 1 + 1 + 1 = 1 plus a carry over of 1 1. 1 0 02 + 1 12 1 1 12 2. 1 0 1 02 + 1 1 02 1 0 0 0 02 3. 1 1 . 0 12 + 1 0 1 . 1 12 1 0 0 1 . 0 02
31
BINARY SUBTRACTION
0-0=0 1-0=1 1-1=0 0 - 1 = 1 with a borrow of 1
2.
4.
1.
1 1 0 0 1 12 - 1 1 1 0 12 1 0 1 1 02
34
3.
1 1 0 0 02 - 1 1 1 0 12 -001012
The answer is determined by taking the complement of the binary sum and prefixing a negative sign, therefore the answer would be:
- 0 0 1 0 12
(answer)
35
4. - 1 1 0 1 -0110 -10011
36
-00100 + - 1 -00101
37
4. - 1 1 0 1 -0110 -10011
38
BINARY MULTIPLICATION
0x0=0 1x0=0 0x1=0 1x1=1
1.
2.
BINARY DIVISION
0/1=0 1/1=1 1. 11002 / 1002 = 112 because, 112 100 1100 -100 100 -100 000
(1st subtraction)
(2nd subtraction)
the solution shows that there are 3 subtractions made, and has an equivalent of 112.
40
Exercises:
Convert the following:
Decimal 1025
(4) (7) (10)
Binary (1)
1101001 (8) (11)
Octal (2)
(5) 2008 (12)
Hexadecimal (3)
(6) (9) ABA