Upload
jacquelyn-earnest
View
261
Download
4
Embed Size (px)
Citation preview
Number Systems Different number systems Representation of numbers in binaryConversion between decimal and binary,Conversion between binary and hexadecimalUse of subscripts 2, 10 and 16 for bases
Number Systems Decimal number system – Base
10 = 1, 2 ,3 4, 5, ect..
Binary number system –Base 2 = 0001, 0010, 0011, ect…
Hexadecimal number system = Base 16 = 9, A, B, 4C ect…
Decimal Number Systems
Hundreds Tens Units
341
102 101 100
300 40 1
300 + 40 +1 = 341
Decimal numbers are base 10
They are made up of 10 numbers – 0,1,2,3,4,5,6,7,8,9.
Combining the ten numbers will create units, tens, hundreds and thousands
Split the following decimal numbers
Hundreds Tens Units
550
Hundreds Tens Units
982
AnswersHundreds Tens Units
550
102 101 100
500 50 0
500 + 50 + 0 = 55010
Hundreds Tens Units
982
102 101 100
900 80 2
900 + 80 + 2 = 98210
Binary Number System Binary numbers are base 2Computer languageThey are made up of 2 numbers –
1 and 0Decimal Binary Decimal Binary
010 02 510 1012
110 12 610 1102
210 102 710 1112
310 112 810 10002
410 1002 910 10012
Hexadecimal Number Systems Hexadecimal numbers are base
16Computer memory locationsThey are made up of 16 numbers
Decimal Hex Decimal Hex
010 016 510 516
110 116 610 616
210 216 710 716
310 316 810 816
410 416 910 916
Decimal Hex
1010 A16
1110 B16
1210 C16
1310 D16
1410 E16
Decimal Hex
1510 F16
Importance of Base numbers Writing the base numbers is very
important as;
◦1510 and 1516 are not the same number but without the base they would be both considered as the same number
◦1010 and 102 are not the same number as 102 represents 210
Complete the table
Number Number System
2010
2A16
10101012
10110
1516
1110001112
Answers
Number Number System
2010 Decimal
2A16 Hexadecimal
10101012 Binary
10110 Decimal
1516 Hexadecimal
1110001112
Binary
Converting Binary to Decimal
Explanation
1. Write down the placement value on top of each number.
2. Write the values that are on (the ones with a one under them
3. Add the numbers together
24 23 22 21 20
16 8 4 2 1
Example We want to convert 110012 to
decimal 24 23 22 21 20
1 1 0 0 1
16 8 4 2 1
16 8 1
16 + 8 + 1
25
Working Convert the following to decimal
1. 1010102
2. 1110112
3. 101010012
4. 0011001112
5. 1110101002
AnswersConvert the following to decimal
1. 1010102 = 4210
2. 1110112 = 5910
3. 101010012 = 16910
4. 0011001112 = 10310
5. 1110101002 = 46810
Converting Decimal to Binary
Method One
1. Write down the placement values of binary
2. Chose the numbers that add up to you decimal number
3. Put a 1 under the numbers used to add up to your decimal number
124
64 32 16 8 4 2 1
Example Convert 4610 to binary
124
64 32 16 8 4 2 1
0 0 1 0 1 1 1 0
32 + 8 + 4 + 2 = 46
4610 = 001011102
Method TwoDivide the original number by 2
and write down the remainder even if it is 0
Keep on dividing the decimal numbers by 2 until 1 is divided by 2
Write down the remainders next to each other starting from the bottom moving upwards
Example Convert 4610 to binary
Ans 4610 = 1011102
46 / 2 = 23 r 0
23 / 2 = 11 r 1
11 / 2 = 5 r 1
5 / 2 = 2 r 1
2 / 2 = 1 r 0
1 / 2 = 0 r 1
Working Convert the following decimal
numbers to binary 1. 1010
2. 6610
3. 12010
4. 3510
5. 8810
AnswersConvert the following decimal
numbers to binary 1. 1010 = 10102
2. 6610 = 10000102
3. 12010 = 11110002
4. 3510 = 1000112
5. 8810 = 10110002
Converting Binary to Hexadecimal
ExplanationSplit the binary number into
groups of 41001110 = 0100 – 1110
Write the 2x on top of each number starting from the right
Add the numbers that are on Write down the totals, if a total is
larger than 9, convert it to the hex letter
0 1 0 0 1 1 1 023
22
21 20
23
22
21
20
8 4 2 1 8 4 2 14 14
4E16
NOTE: when we do not have enough bits lefts to create a group of 4 we add 0s
ExampleConvert 11001112 in
Hexadecinal 0 1 1 0 0 1 1 1
23 22 21 20 23 22 21 20
8 4 2 1 8 4 2 1
6 7
6716
Working Convert the following into
Hexadecimal
1. 1110101002
2. 11101112
3. 1010102
4. 1112
5. 11100012
Working Convert the following into
Hexadecimal
1. 1110101002 = 1D416
2. 11101112 = 7716
3. 1010102 = 2A16
4. 1112 = 716
5. 11100012 = 7116
Converting Hexadecimal to Binary
Explanation
1. Write each individual number in the hexadecimal number eg B416
2. Write the binary placement values for each hex number
3. List 1s under the placement values that are onB = 11 4
23
22 21 20 23 22 21 20
8 4 2 1 8 4 2 11 0 1 1 0 1 0 0
101101002
4. Write the split binary number as one whole number
ExampleConvert 2C16 to binary
2 C = 12
23 22 21 20 23 22 21 20
8 4 2 1 8 4 2 1
0 0 1 0 1 1 0 0
001011002
Working Convert the following hex
numbers to binary
1. AB16
2. F716
3. 1516
4. CC16
5. 2216
AnswersConvert the following hex
numbers to binary
1. AB16 = 101010112
2. F716 = 111101112
3. 1516 = 000101012
4. CC16 = 110011002
5. 2216 = 001000102
Converting Decimal to Hexadecimal
Method OneDivide the decimal number by 16
taking note of the remaindersKeep on dividing the whole
number by 16 until the whole number obtained is 0.
Write down the remainders next to each other starting from the bottom, changing numbers greater than 9 to letters
46
5
/ 16 = 29 r 1
29 / 16 = 1 r 13
1 / 16 = 0 r 1
ANS = 1D116
Example Convert 80010 to hexadecimal
80
0
/ 16 = 50 r 0
50 / 16 = 3 r 2
3 / 16 = 0 r 3
ANS = 32016
Method Two
1. Convert the decimal number to binary
2. Convert the binary number to hexadecimal
Eg, changing 45610 to hexadecimal
Example Convert 80010 to hexadecimal
512
256
128
64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0
512 + 256 + 32 = 800
80010 = 110010000020 0 1 1 0 0 1 0 0 0 0 023 22 21 20 23 22 2
1
20 23 22 21 20
8 4 2 1 8 4 2 1 8 4 2 13 2 0
32016
WorkingConvert the following to
Hexadecimal numbers1. 34010
2. 11910
3. 6610
4. 2510
5. 11110
AnswersConvert the following to
Hexadecimal numbers1. 34010 = 15416
2. 11910 = 7716
3. 6610 = 4216
4. 2510 = 1916
5. 11110 = 6F16
Converting Hexadecimal to
Decimal
ExplanationWriting down the placement
values on top of each number starting with 160
Multiply the top value with the hexadecimal number.
Add all the results162
256
161
16
160
1
4 3 A
(256x4) (16x3) (1x10)
1024 48 10
=1024+48+10
=108210
Converting 43A16 to decimal
WorkingConvert the following into
decimal
1. 5516
2. CB16
3. F816
4. B416
5. 9016
AnswersConvert the following into
decimal
1. 5516 = 8510
2. B016 = 17610
3. 2F816 = 76010
4. B416 = 18010
5. 9016 = 14410
Homework Copy and complete this table
Decimal Binary Hexadecimal
2110
1010101002
2E16
15910
001110002
1C216
4410