Methodological Instructions
Theme: Conversion between number system
Objective: 10.2.1.1 Convert decimal numbers to binary numbers and vice versa
Assessment criteria
· Translates numbers from decimal to binary
· Translations of the number of one number system to another
Basic Level:
Multiplication table (7-9 grade)
Key words and phrases:
Numeral system, binary, hexadecimal, octal and decimal system alphabet and how translate between numeral systems and vice versa, Numeral system is a ____
Translate number from binary system to decimal system…
I. THEORY
The decimal (base ten) numeral system has ten possible values (0, 1,2,3,4,5,6,7,8, or 9) for each place-value. In contrast, the binary (base two) numeral system has two possible values represented as 0 or 1 for each place-value.[1] Since the binary system is the internal language of electronic computers, serious computer programmers should understand how to convert from decimal to binary.
For this example, let's convert the decimal number 15610 to binary. Write the decimal number as the dividend inside an upside-down "long division" symbol. Write the base of the destination system (in our case, "2" for binary) as the divisor outside the curve of the division symbol.
· This method is much easier to understand when visualized on paper, and is much easier for beginners, as it relies only on division by two.
· To avoid confusion before and after conversion, write the number of the base system that you are working with as a subscript of each number. In this case, the decimal number will have a subscript of 10 and the binary equivalent will have a subscript of 2.
Divide. Write the integer answer (quotient) under the long division symbol, and write the remainder (0 or 1) to the right of the dividend.[2]
· Since we are dividing by 2, when the dividend is even the binary remainder will be 0, and when the dividend is odd the binary remainder will be 1.
Continue to divide until you reach 0. Continue downwards, dividing each new quotient by two and writing the remainders to the right of each dividend. Stop when the quotient is 0.
Write out the new, binary number. Starting with the bottom remainder, read the sequence of remainders upwards to the top. For this example, you should have 10011100. This is the binary equivalent of the decimal number 156. Or, written with base subscripts: 15610 = 100111002
· This method can be modified to convert from decimal to any base. The divisor is 2 because the desired destination is base 2 (binary). If the desired destination is a different base, replace the 2 in the method with the desired base. For example, if the desired destination is base 9, replace the 2 with 9. The final result will then be in the desired base.
Start by making a chart. List the powers of two in a "base 2 table" from right to left. Start at 20, evaluating it as "1". Increment the exponent by one for each power. Make the list up until you've reached a number very near the decimal system number you're starting with. For this example, let's convert the decimal number 15610 to binary.
Look for the greatest power of 2. Choose the biggest number that will fit into the number you are
converting. 128 is the greatest power of two that will fit into 156, so write a
1 beneath this box in your chart for the leftmost binary digit. Then, subtract 128 from your initial number. You now
have 28.
Move to the next lower power of two. Using your new number (28), move down the chart
marking how many times each power of 2 can fit into your dividend. 64 does not
go into 28, so write a 0 beneath that box for the next binary digit to the
right. Continue until you reach a number that can go into 28.
Subtract each successive number that can fit, and mark it with a 1. 16 can fit into 28, so you will write
a 1 beneath its box and subtract 16 from 28. You now have 12. 8 does go into
12, so write a 1 beneath 8's box and subtract it from 12. You now have 4.
Continue until you reach the end of your chart. Remember to mark a 1 beneath each number that
does go into your new number, and a 0 beneath those that don't.
Write out the binary answer. The
number will be exactly the same from left to right as the 1's and 0's beneath
your chart. You should have 10011100. This is the binary equivalent of the
decimal number 156. Or, written with base
subscripts: 15610 = 100111002.
· Repetition of this method will result in memorization of the powers of two, which will allow you to skip Step 1.
· There are several ways to convert decimal (sometimes called denary, or base 10) numbers into hexadecimal(base 16).
· The video below gives a step by step guide on how to convert decimal numbers into binary code using the ‘divide by 16’ method.
Here’s how it works:
Decimal to Octal
Here is an example of using repeated division to convert 1792 decimal to octal:
Decimal Number |
Operation |
Quotient |
Remainder |
Octal Result |
1792 |
÷ 8 = |
224 |
0 |
0 |
224 |
÷ 8 = |
28 |
0 |
0 |
28 |
÷ 8 = |
3 |
4 |
400 |
3 |
÷ 8 = |
0 |
3 |
3400 |
0 |
done. |
|
|
|
Decimal to Hexadecimal
Here is an example of using repeated division to convert 1792 decimal to hexadecimal:
Decimal Number |
Operation |
Quotient |
Remainder |
Hexadecimal Result |
1792 |
÷ 16 = |
112 |
0 |
0 |
112 |
÷ 16 = |
7 |
0 |
0 |
7 |
÷ 16 = |
0 |
7 |
700 |
0 |
done. |
|
|
|
The only addition to the algorithm when converting from decimal to hexadecimal is that a table must be used to obtain the hexadecimal digit if the remainder is greater than decimal 9.
Decimal: |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Hexadecimal: |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Decimal: |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Hexadecimal: |
8 |
9 |
A |
B |
C |
D |
E |
|
The addition of letters can make for funny hexadecimal values. For example, 48879 decimal converted to hex is:
Decimal Number |
Operation |
Quotient |
Remainder |
Hexadecimal Result |
48879 |
÷ 16 = |
3054 |
15 |
F |
3054 |
÷ 16 = |
190 |
14 |
EF |
190 |
÷ 16 = |
11 |
14 |
EEF |
11 |
÷ 16 = |
0 |
11 |
BEEF |
0 |
done. |
|
|
|
П. TESTS AND ASSIGNMENTS FOR SELF-ASSESSMENT
1. Convert numbers from decimal to binary.
2. Convert numbers from binary to decimal.
3. Convert real numbers from decimal to binary
a. 57,625
B. 2)11101.1011
VISUAL AIDS AND MATERIALS.
1. Slides
2. Introducing binary https://www.bbc.com/bitesize/guides/zwsbwmn/revision/7
3. Different number systems http://www.anastasi-shherbakova.narod.ru/p7aa1.html
4. Converting Denary to Binary http://www.zaurtl.ru/UkVT/UKVT6.html
5. Converting Binary to n-based system https://www.youtube.com/watch?v=cPOgHCqecxY
6. Abilities of the Calculator program: http://www.compgramotnost.ru/windows-7/kalkulyator-windows-7
7. Converting Denary to Binary https://www.youtube.com/watch?v=70lM1qAD5u4
8. Denary to Binary: Division https://www.sqa.org.uk/e-learning/CompArch01CD/page_10.htm
Скачано с www.znanio.ru
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.