# CONVERTING FROM BASE TWO TO ANOTHER BASE (BINARY NUMBERS)

Subject:

### 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:

1. (a) Conversion from base ten to other bases.
2. (b) Conversion from other bases to base ten.
3. (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
• 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: 1110112 or 111011two, 57348 or 5734eight, 78110 or 781ten, etc.

NOTEBase ten numbers can be written without the base being specified.
Therefore, base ten or denary numbers should be regarded as any number base that is written without base indication.

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 111112, 1000001two, 01012, 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.

1. 110two 2 1 0)
2. 11112 3 2 1) 0)
3. 10001tw0 4 3 2) 1 0

CLASS ACTIVITY

Express each of the following as multiples of power of its base

(1) 1011two       (2) 11000110two      (3) 832ten     (4) 890.701ten

(5)100.1001two  (6)   4302.42six                      (7) 0.0247eight

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:

1. Convert 1111two to denary scale.

Solution:

1111two 3 2 1) 0)

ten.

1. Express 11101two as a decimal number

Solution:

11101two 4 3 2) 1 0

ten

1. Convert 1111110two to a number in base ten.

Solution:

1111110two 6 5 4) 3 2

1 0

ten

CLASS ACTIVITY

Express the following binary numbers as denary numbers.

1. 110111two 1010101010two                    3. 10000000101two

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.

1. Express 56eight to denary

Solution:

56eight 1 0 ten

1. Convert 1243five to base ten

Solution:

1243five 3 2 1) 0)

ten

CLASS ACTIVITY

Express in denary the following number bases:

1. 124eight 25seven          3. 48nine            4. 211five

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:

1. Convert 41ten to base five
2. Convert 243ten to base eight
3. Express 2610 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

41ten five.            243ten eight        26ten two

CLASS ACTIVITY

Convert the following base ten numbers to the base indicated in brackets in front of each.

1. 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:

1. Convert 10111two to base 6

Solution:

Step1: we first convert 10111two to base ten.

10111two 4 3 2) 1 0

ten

Step2: we now convert 23ten to base 6

 6 23 6 3 R 5 0 R 3

two 23ten six

1. Convert 3041five to base four.

Solution:

First convert 3041five to base 10

3041five 3 2 1) 0

ten

Now, convert 395ten  to base 4.

 4 395 4 98 R 3 4 24 R 2 4 6 R 0 4 1 R 2 0 R 1

3041five  395ten 12023four

CLASS ACTIVITY

Convert: (a) 4056 to a binary number   (b) 3214 to octal scale(c) 6548 to base three.

BICIMAL NUMBERS.

Bicimals are binary numbers in fractional form in which the denominator is a power of 2. Examples include 10.1012, 0.1112, 1011.11012, 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:

1. 112 b. 0.112            c. 111.0112

Solutions:

1. 112 2 1 0) -1 -2

)ten oR ten.

1. 112 0) -1) -2)

ten

1. 0112 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.

1. 10112 32568           c. 101.1012      d. 43.218          e. 32.215          f. 5329.

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

_____

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:

1. Arrange the numbers as in the addition of decimal numbers.
2. Add the elements of the column starting with the right most column.
3. Divide the sum by two.
4. Record the remainder, which is either 0 or 1.
5. 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:

1. Add 111two to 11two

Solution:

1          1          1

1          1

1          0          1          02

1. 110112 101012 10012

Solution:

1         1         0       1      1

1         0        1        0      1

1         0        0      1

1    1     1 0        0       0      1two

ADDITION IN OTHER BASES:

The same principle applied when performing addition in binary and denary is applicable here also.

Examples:

1. Add 40002five to 3403five

Solution:

4          0          0          0          2

+          3          4          0          3

4          3          4          1          0five

1. Find the sum of 2332four and 302four.

Solution:

2          3          3          2

+          3          0          2

3          3          0          0four

1. 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:

1. 10112 2
2. 1002 2 101112
3. Find the sum of 2467 and 83610 give your answer in base seven.
4. Find the missing numbers in the following sums in base two.
5. 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:

1. Subtract 1012 from 1112

Solution:

1          1          1

1          0          1

1          0two

1. By how much is 3767eight greater than 2653eight?

Solution:

3          7          6          7

–           2          6          5          3

1          1          1          4eight

1. Find the missing numbers in this subtraction in base 2

1          1          1          1          1          1

*          *          *          *          *          *

1          0          1          0          1two

Solution:

We subtract 101012  from 1111112 to get the missing numbers.

Hence, 1111112 2 2

Therefore, the missing numbers is 2

1. If 234­five five 434five = 2304five, find

Solution:

= 2304five  (234­five 434five)

= 2304five  (1223five)

= 1031five

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:

1. Simplify 11012 1112

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          1two

11012  1112  1011011two

1. 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:

1. Divide 101002 by 1002

Solution:

Method1

Convert  both numbers to base 10 and divide , then convert back to base 2.

101002 = 2010 and 1002 = 410

2010 10 = 510

510 = 1012

Method2:

Long division.

101

10100

100      100

100

100

000

101002  1002 = 1012

PRACTICE EXERCISE

1. Find the product of the following
2. 111012 and 1112 4156 and 546  c. 201011 and 1010
3. Evaluate 1110102 10012
4. 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

1. Express each of the following numbers in binary
2. a) 234six b) 0.75ten c) 73.5nine
3. Convert each of the following binary numbers to base ten.
4. a) 100.1111 b) 111 111
5. Convert each of the following base ten numbers to binary
6. a) 623 b) 20 c) 112. 125
7. Simplify 11two x 1011two – 111two.
8. If 100two x y = 1100two, 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