CONVERTING FROM BASE TWO TO ANOTHER BASE (BINARY NUMBERS)
Subject:
Table of Contents
MATHEMATICS
Term:
First Term
Week:
Week 1
Class:
JSS 3 / BASIC 9
Previous lesson: Pupils have previous knowledge of
Words Expressing ‘Moral Value’
that was taught in their previous lesson
Topic:
Number Bases:
- (a) Conversion from base ten to other bases.
- (b) Conversion from other bases to base ten.
- (c) Conversion from one base to another other than base ten. (d) Number base arithmetic.
Behavioural Objectives:
At the end of the lesson, learners will be able to
- conversion from base ten to other bases.
- conversion from other bases to base ten.
- conversion from one base to another other than base ten.
- solve simple sums on number base arithmetic.
Instructional Materials:
- Wall charts
- Pictures
- Related Online Video
- Flash Cards
Methods of Teaching:
- Class Discussion
- Group Discussion
- Asking Questions
- Explanation
- Role Modelling
- Role Delegation
Reference Materials:
- Scheme of Work
- Online Information
- Textbooks
- Workbooks
- 9 Year Basic Education Curriculum
- Workbooks
CONTENT:
WEEK 1
TOPIC: NUMBER BASES
CONTENT:
- Concept and types of number base.
- Binary numbers.
- Conversion in number bases: Denary to Binary, Binary to Denary, Denary to other bases, One base to another, etc.
- Arithmetical operation in Binary System: Addition, Subtraction, Multiplication and Division.
- Bidecimal numbers: Conversion, Addition and Subtraction.
- Equation in number bases.
CONCEPT AND TYPES OF NUMBER BASES
Number Base is a system of counting natural numbers in bundles. Some languages have their own unique method or way of counting numbers while others have same method. For instance, numbers are counted in bundle of ten digits called base ten or denary. The digits involved in English natural numbers are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
Some unique number bases include: Base 2 (Binary), Base 8 (Octal), Base 10 (Denary or Decimal), Base 16 (Hexadecimal),… there are other bases such as base 3, base 4, base 5, base 6, etc. The bases of number systems are usually written as a subscript either in word or figure. Examples: 111011_{2} or 111011_{two}, 5734_{8} or 5734_{eight}, 781_{10} or 781_{ten}, etc.
CLASS ACTIVITY:
Teachers should ask the students to count in their mother tongues.
BINARY NUMBERS.
Binary numbers are a system of counting numbers in base two. In binary system, the greatest digit is 1 and the least or lowest is 0. Hence, the two digits available in binary numbers are 1 and 0. Binary numbers is the most important number bases because of its usage in computer. Examples of binary numbers are 11111_{2}, 1000001_{two}, 0101_{2}, etc.
EXPRESSING BINARY AS SUM OF MULTIPLES
We can easily express any binary number as power of multiples of two as shown in the following examples.
- 110_{two} ^{2} ^{1} ^{0})
- 1111_{2} ^{3} ^{2} ^{1}) ^{0})
- 10001_{tw0 } ^{4} ^{3} ^{2}) ^{1} ^{0}
CLASS ACTIVITY
Express each of the following as multiples of power of its base
(1) 1011_{two} (2) 11000110_{two} (3) 832_{ten} (4) 890.701_{ten}
(5)100.1001_{two (}6) 4302.42_{six} (7) 0.0247_{eight}
CONVERSION OF BINARY NUMBERS TO DECIMAL NUMBERS
To express binary numbers in decimals or denary, we write the binary number as a sum of multiples of powers of two, or we multiply each digit by the base and add to the next digit starting from the left.
NOTE: Any number or letter raised to the power of zero is 1
Examples:
- Convert 1111_{two} to denary scale.
Solution:
1111_{two} ^{3} ^{2} ^{1}) ^{0})
_{ten}.
- Express 11101_{two} as a decimal number
Solution:
11101_{two} ^{4} ^{3} ^{2}) ^{1} ^{0}
_{ten}
- Convert 1111110_{two} to a number in base ten.
Solution:
1111110_{two} ^{6} ^{5} ^{4}) ^{3} ^{2}
^{1} ^{0}
^{ } _{ten}
CLASS ACTIVITY
Express the following binary numbers as denary numbers.
- 110111_{two} 1010101010_{two} 3. 10000000101_{two}
CONVERSION OF OTHER NUMBER BASES TO DENARY
Converting other number bases to denary is the same as that of binary discussed earlier. Let’s study the examples below.
- Express 56_{eight }to denary
Solution:
56_{eight} ^{1} ^{0} _{ten}
- Convert 1243_{five }to base ten
Solution:
1243_{five} ^{3} ^{2} ^{1}) ^{0})
_{ten}
CLASS ACTIVITY
Express in denary the following number bases:
- 124_{eight } 25_{seven} 3. 48_{nine } 4. 211_{five}
CONVERSION FROM DENARY TO ANY BASE
In converting a denary number to base two (binary) or any other base, we divide by that new base keeping the remainder in each step until there is nothing more to divide. The result is the list of remainders from the last to the first.
Example:
- Convert 41_{ten} to base five
- Convert 243_{ten} to base eight
- Express 26_{10} as binary number
Solution:
5 | 41 | 8 | 243 | 2 | 26 | ||
5 | 8 R 1 | 8 | 30 R 3 | 2 | 13 R 0 | ||
5 | 1R3 | 8 | 3 R 6 | 2 | 6 R 1 | ||
0 R 1 | 0 R 3 | 2 | 3 R 0 | ||||
2 | 1 R 1 | ||||||
0 R 1 |
41_{ten} _{five}. 243_{ten} _{eight} 26_{ten} _{two }
CLASS ACTIVITY
Convert the following base ten numbers to the base indicated in brackets in front of each.
- 344(base 7) 3256(base 5) c. 7054(base 6) d. 106(base 2)
CONVERTING FROM ONE BASE TO ANOTHER BASE OTHER THAN BASE 10
To do this, two steps are involved:
Step1: convert the given base to base ten.
Step2: convert the result gotten from step1 above to the required base.
converting 123410 to 2
The equation calculation formula for 123410 number to 2 is like this below.
2|1234
2|617|0
2|308|1
2|154|0
2|77|0
2|38|1
2|19|0
2|9|1
2|4|1
2|2|0
2|1|0
2|1|1
Ans:100110100102
CONVERTING FROM ONE BASE TO ANOTHER BASE OTHER THAN BASE 10
We can convert from one base to another base, other than Base 10, using the following steps:
1. Convert the given number into its Base 10 equivalent.
2. Divide the Base 10 number by the new base.
3. Write down the remainder.
4. Divide the quotient by the new base.
5. Write down the remainder.
6. Repeat Step 4 until the quotient is equal to 0.
7. The remainders are the digits of the new number in reverse order.
For example, let’s convert the number “1234” from Base 10 to Base 2 (Binary).
1. 1234 = 1 x 10^3 + 2 x 10^2 + 3 x 10^1 + 4 x 10^0
2. 1234 / 2 = 617 Remainder 0
3. 617 / 2 = 308 Remainder 1
4. 308 / 2 = 154 Remainder 0
5.154 / 2 = 77 Remainder 0
6. 77 / 2 = 38 Remainder 1
7. 38 / 2 = 19 Remainder 0
8. 19 / 2 = 9 Remainder 1
9. 9 / 2 = 4 Remainder 1
10. 4 / 2 = 2 Remainder 0
11. 2 / 2 = 1 Remainder 0
12. 1 / 2 = 0 Remainder 1
13. The remainders in reverse order are 10011010010. Therefore, 1234 in Base 10 is equal to 10011010010 in Base 2 (Binary).
Now let’s convert the number “1234” from Base 10 to Base 8 (Octal).
1. 1234 = 1 x 10^3 + 2 x 10^2 + 3 x 10^1 + 4 x 10^0
2. 1234 / 8 = 308 Remainder 2
3. 308 / 8 = 38 Remainder 6
4. 38 / 8 = 4 Remainder 6
5. 4 / 8 = 0 Remainder 4
6. The remainders in reverse order are 2466. Therefore, 1234 in Base 10 is equal to 2466 in Base 8 (Octal).
Example:
- Convert 10111_{two} to base 6
Solution:
Step1: we first convert 10111_{two} to base ten.
10111_{two} ^{4} ^{3} ^{2}) ^{1} ^{0}
_{ten}
Step2: we now convert 23_{ten }to base 6
6 | 23 |
6 | 3 R 5 |
0 R 3 |
_{two} 23_{ten} _{six}
_{ }
- Convert 3041_{five} to base four.
Solution:
First convert 3041_{five} to base 10
3041_{five} ^{3} ^{2} ^{1}) ^{0}
_{ten}
Now, convert 395_{ten } to base 4.
4 | 395 |
4 | 98 R 3 |
4 | 24 R 2 |
4 | 6 R 0 |
4 | 1 R 2 |
0 R 1 |
3041_{five} 395_{ten} 12023_{four}
CLASS ACTIVITY
Convert: (a) 405_{6} to a binary number (b) 321_{4} to octal scale(c) 654_{8} to base three.
BICIMAL NUMBERS.
Bicimals are binary numbers in fractional form in which the denominator is a power of 2. Examples include 10.101_{2}, 0.111_{2}, 1011.1101_{2}, etc.
CONVERSION OF BICIMAL TO DENARY
When converting a bicimal number to denary, the process is quite simple. All you need to do is take the value of each digit and multiply it by the corresponding power of two. For example, when converting the bicimal number 1101 (which has a value of 13 in denary), you would take 1 and multiply it by 2^3, take 1 and multiply it by 2^2, take 0 and multiply it by 2^1, and finally take 1 and multiply it by 2^0. When you add up all of these values, you get the final answer of 13.
Interestingly, this same process can be used to convert a denary number to bicimal. To do this, you simply take the value of each digit and divide it by the corresponding power of two. For example, when converting the denary number 13 to bicimal, you would take 1 and divide it by 2^3, take 1 and divide it by 2^2, take 0 and divide it by 2^1, and finally take 1 and divide it by 2^0. When you add up all of these values, you get the final answer of 1101 (which is 13 in bicimal).
In converting bicimal numbers to denary, we write the bicimal numbers as a sum of multiples of powers of two. The whole numbers parts of bicimal are raised to positive power of 2 increasing to the left starting with zero. While the fractional part are raised to negative power of 2 decreasing to the left starting with negative 1 .
101 . 1001
Whole number part Fractional number part
Examples:
Convert the following to denary:
- 11_{2} b. 0.11_{2} c. 111.011_{2}
Solutions:
- 11_{2} ^{2} ^{1} ^{0}) ^{-1} ^{-2}
)_{ten} oR _{ten}.
- 11_{2} ^{0}) ^{-1}) ^{-2})
_{ten}
- 011_{2} ^{2} ^{1} ^{0}) ^{-1} ^{-2} ^{-3}
_{ten} _{ten}.
NOTE: Other bases in fractional form other than bicimal can also be expressed in denary using the same method as in bicimal. Teacher should teach the students using the repeated method of converting number bases to base ten(denary).
EVALUATION:
Convert each of the following to denary scale.
- 1011_{2} 3256_{8} c. 101.101_{2} d. 43.21_{8} e. 32.21_{5} f. 532_{9}.
ARITHMETIC OPERATIONS IN NUMBER
Basic operations of addition, subtraction, multiplication and division are carried out in other bases exactly the same as base 10.
ADDITION IN BINARY SYSTEM
The binary number system is a base 2 system that uses only the digits 0 and 1 to represent all numbers. Because of its simplicity, the binary number system is used in many modern technologies, including computer hardware and software.
To add two binary numbers, start by aligning them on the right side so that their least significant digits are lined up. Then, add the numbers column by column, starting with the rightmost column. If the sum of a column is 2 or more, carry over the extra 1 to the next column.
For example, to add 101 + 100:
Align the numbers on the right side:
101
+ 100
_____
Start with the rightmost column and add the numbers:
101
+ 100
_____
001
The sum of the rightmost column is 1, so there is no need to carry over.
Move to the next column on the left and add the numbers:
101
+ 100
_____
0101
The sum of this column is 5, so carry over the 1 to the next column:
101
+ 100
_____
00101
Continue moving to the left and adding the numbers until all columns have been added:
101
+ 100
_____
11001
____
11
The final sum is 11001.
To add in binary number, the following steps are important:
- Arrange the numbers as in the addition of decimal numbers.
- Add the elements of the column starting with the right most column.
- Divide the sum by two.
- Record the remainder, which is either 0 or 1.
- Add the quotient to the sum of the next column and repeat the process for the next column.
NOTE:
. Teachers should explain addition principle in binary numbers to the students using appropriate illustrations.
Examples:
- Add 111_{two} to 11_{two}
Solution:
1 1 1
1 1
1 0 1 0_{2}
- 11011_{2} 10101_{2} 1001_{2}
Solution:
1 1 0 1 1
1 0 1 0 1
1 0 0 1
1 1 1 0 0 0 1_{two}
ADDITION IN OTHER BASES:
The same principle applied when performing addition in binary and denary is applicable here also.
Examples:
- Add 40002_{five} to 3403_{five}
Solution:
4 0 0 0 2
+ 3 4 0 3
4 3 4 1 0_{five}
- Find the sum of 2332_{four} and 302_{four}.
Solution:
2 3 3 2
+ 3 0 2
3 3 0 0_{four}
- Table of addition in base nine:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 |
2 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 |
3 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 |
4 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 |
5 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 |
6 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 |
7 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
8 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
NOTE: Teachers should solve more examples that includes adding in different bases, addition with missing numbers or digit in diferent bases.
CLASS ACTIVITY
Evaluate the following:
- 1011_{2} _{2}
- 100_{2} _{2} 10111_{2}
- Find the sum of 246_{7 }and 836_{10} give your answer in base seven.
- Find the missing numbers in the following sums in base two.
- 1 0 1 0 1 1 0 1 1
- * * * * * * * *
1 1 1 1 0 1 1 1 0
SUBTRACTION IN BASE TWO AND OTHER BASES
Subtractions in binary numbers are the same as subtraction in denary numbers. When the digit of the number to be subtracted is larger than the corresponding digit above it, we transfer one 2 from the next left column. If the immediate next column has zero digit, the transfer will be from further left column. The same principle is applicable to other bases other than base 2.
Examples:
- Subtract 101_{2 }from 111_{2}
Solution:
1 1 1
1 0 1
1 0_{two}
- By how much is 3767_{eight} greater than 2653_{eight}?
Solution:
3 7 6 7
– 2 6 5 3
1 1 1 4_{eight}
- Find the missing numbers in this subtraction in base 2
1 1 1 1 1 1
* * * * * *
1 0 1 0 1_{two}
Solution:
We subtract 10101_{2 } from 111111_{2} to get the missing numbers.
Hence, 111111_{2} _{2} _{2}
Therefore, the missing numbers is _{2}
_{ }
- If 234_{five} _{five } 434_{five} = 2304_{five}, find
Solution:
= 2304_{five} (234_{five} 434_{five})
= 2304_{five} (1223_{five})
= 1031_{five}
NOTE: Teachers should explain this technique used in examples3 and 4 above with more examples.
MULTIPLICATION AND DIVISION OF NUMBER BASES
MULTIPLICATION is a repeated addition. This principle is always applied while multiplying binary numbers and other number bases. The important thing we must note is that if we are working in base two and other bases, all the figures we use in the working should be less than 2 or the number base under consideration.
Examples:
- Simplify 1101_{2} 111_{2}
Solution:
1 1 0 1
1 1 1
1 1 0 1
1 1 0 1
1 1 0 1
1 0 1 1 0 1 1_{two}
1101_{2} 111_{2} 1011011_{two}
- Base 5 multiplication table.
0 | 1 | 2 | 3 | 4 | |
0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 2 | 3 | 4 |
2 | 0 | 2 | 4 | 11 | 13 |
3 | 0 | 3 | 11 | 14 | 22 |
4 | 0 | 4 | 13 | 22 | 31 |
DIVISION in base two is very similar to division in base ten. If the two numbers are in the same base, we divide using the long division method. However, if both numbers are not in the same base, we convert to base ten and then to the base required before solving.
Examples:
- Divide 10100_{2} by 100_{2}
Solution:
Method1
Convert both numbers to base 10 and divide , then convert back to base 2.
10100_{2} = 20_{10} and 100_{2} = 4_{10}
20_{10} _{10} = 5_{10}
5_{10} = 101_{2}
Method2:
Long division.
101
10100
100 100
100
100
000
10100_{2} 100_{2} = 101_{2}
PRACTICE EXERCISE
- Find the product of the following
- 11101_{2} and 111_{2} 415_{6} and 54_{6} c. 2010_{11} and 10_{10}
- Evaluate 111010_{2} 1001_{2}
- Complete the table in base seven
1 | 2 | 5 | 6 | |
1 | 1 | 2 | 6 | |
2 | 2 | 4 | 13 | |
5 | 5 | 13 | 34 | |
6 | 6 | 51 |
ASSIGNMENT
- Express each of the following numbers in binary
- a) 234_{six} b) 0.75_{ten} c) 73.5_{nine}
- Convert each of the following binary numbers to base ten.
- a) 100.1111 b) 111 111
- Convert each of the following base ten numbers to binary
- a) 623 b) 20 c) 112. 125
- Simplify 11_{two} x 1011_{two} – 111_{two}.
- If 100_{two} x y = 1100_{two}, find the value of y.
PRESENTATION:
Step 1:
The subject teacher revises the previous topic
Step 2:
He or she introduces the new topic
Step 3:
The class teacher allows the pupils to give their own examples and he corrects them when the needs arise
CONCLUSION:
The subject goes round to mark the pupil’s notes. He does the necessary corrections