Conversion of Number Base

 

Welcome to Class !!

We are eager to have you join us !!

In today’s Computer Science class, We will be discussing Number Bases Conversion. We hope you enjoy the class!

 

numbers classnotesng

NUMBER BASE Conversion: from Decimal to other Base System

  • Step 1 – divide the decimal number to be converted by the value of the new base.
  • Step 2 – get the remainder from step 1 as the rightmost digit (least significant digit) of the base number.
  • Step 3 – divide the quotient of the previous divide by the new base.
  • Step 4 – record the remainder from step 3 as the next digit (to the left) of the new base number.

Repeat steps 3 and 4, getting remainders from right to left until the quotient becomes zero in step 3.

The last remainder obtained will be the most significant digit (MSD) of the new base number.

Decimal to Binary:

Example: Convert 1510 to binary.

Step Operation Result Remainder
Step 1 15/2 7 1
Step 2 7/2 3 1
Step 3 3/2 1 1
Step 4 1/2 0 1

As mentioned in steps 2 and 4, the remainders must be arranged in reverse order i.e. from bottom to top.

1510 = 11112

Decimal to Octal:

Example: convert 38510 to octal.

Step Operation Result Remainder
Step 1 385/8 48 1
Step 2 48/8 6 0
Step 3 6/8 0 6

As mentioned in steps 2 and 4, the remainders must be arranged in reverse order i.e. from bottom to top.

38510 = 6018

mathematics classnotesng

NUMBER BASE Conversion: from other Base System to Decimal

  • Step 1 – determine the positional value of each digit. This depends on the position of the digit and the base of the number system.
  • Step 2 – multiply the obtained values in step 1 by the digits in the corresponding position.
  • Step 3 – sum the products calculated in step 2. This total is the equivalent value in decimal.
Binary to Decimal

For example: convert 2232 to base 10

2232 = 2×22 + 2×21 + 3×20

= 2×4 + 2×2 + 3×1 = 8 + 4+3

= 1510

Octal to Decimal

For example: convert 22 from octal to decimal.

228= 2×81 + 2×80 = 2×8 + 2×0 = 16 + 2 = 1810 or 18.

 

 

 

We have come to the end of this class. We do hope you enjoyed the class?

Should you have any further question, feel free to ask in the comment section below and trust us to respond as soon as possible.

In our next class, we will be talking about Units of Storage in Computer. We are very much eager to meet you there.

 

Get more class notes, videos, homework help, exam practice on Android [DOWNLOAD]

Get more class notes, videos, homework help, exam practice on iPhone [DOWNLOAD]

4 thoughts on “Conversion of Number Base”

  1. Of course I enjoyed it it was fun and a lot to learn too this can even help me in school thank you so much more topics please :]

Leave a Reply

Your email address will not be published. Required fields are marked *

Don`t copy text!