# Number System Conversion

AI悦创原创
• Number System
• Number System Conversion
• Number System
• Number System Conversion

As we know, the number system is a form of expressing the numbers. In number system conversion, we will study to convert a number of one base, to a number of another base. There are a variety of number systemsopen in new window such as binary numbers, decimal numbers, hexadecimal numbers, octal numbers, which can be exercised.

In this article, you will learn the conversion of one base number to another base number considering all the base numbers such as decimal, binary, octal and hexadecimal with the help of examples. Here, the following number system conversion methods are explained.

• Binary to Decimal Number System

• Decimal to Binary Number System

• Octal to Binary Number System

• Binary to Octal Number System

• Binary to Hexadecimal Number System

• Hexadecimal to Binary Number System

Get the pdf of number system with a brief description in it. The general representation of number systems are;

Decimal Number – Base 10 – $N_{10}$

Binary Number – Base 2 – $N_{2}$

Octal Number – Base 8 – $N_{8}$

Hexadecimal Number – Base 16 – $N_{16}$

0000000
0001111
0010222
0011333
0100444
0101555
0110666
0111777
10001088
10011199
10101210A
10111311B
11001412C
11011513D
11101614E
11111715F

## # Number System Conversion Methods

Number system conversions deal with the operations to change the base of the numbers. For example, to change a decimal number with base 10 to binary number with base 2. We can also perform the arithmetic operations like addition, subtraction, multiplication on the number system. Here, we will learn the methods to convert the number of one base to the number of another base starting with the decimal number system. The representation of number system base conversion in general form for any base number is;

$(Number)_{b} = d_{n-1} d_{n-2}$—–$.d_{1} d_{0} . d_{1} d_{2}$—- $d_{m}$

In the above expression, dn-1 dn-2—–.d1 d0 represents the value of integer part and d-1 d-2 —- d-m represents the fractional part.

Also, dn-1 is the Most significant bit (MSB) and d-m is the Least significant bit (LSB).

Now let us learn, conversion from one base to another.

## # Decimal to Other Bases

Converting a decimal number to other base numbers is easy. We have to divide the decimal number by the converted value of the new base.

Decimal to Binary Number:

Suppose if we have to convert decimal to binaryopen in new window, then divide the decimal number by 2.

Example 1. Convert $(25)_{10}$ to binary number.

Solution: Let us create a table based on this question.

OperationOutputRemainder 「 剩余部分」
25 ÷ 2121(MSB)
12 ÷ 260
6 ÷ 230
3 ÷ 211
1 ÷ 201(LSB)

Therefore, from the above table, we can write,

$(25)_{10} = (11001)_{2}$

Decimal to Octal Number:

To convert decimal to octal numberopen in new window we have to divide the given original number by 8 such that base 10 changes to base 8. Let us understand with the help of an example.

Example 2: Convert $128_{10}$ to octal number.

Solution: Let us represent the conversion in tabular form.

OperationOutputRemainder
128÷8160(MSB)
16÷820
2÷802(LSB)

Therefore, the equivalent octal number = $200_{8}$

Again in decimal to hex conversionopen in new window, we have to divide the given decimal number by 16.

Example 3: Convert $128_{10}$ to hex.

Solution: As per the method, we can create a table;

OperationOutputRemainder
128÷1680(MSB)
8÷1608(LSB)

Therefore, the equivalent hexadecimal number is $80_{16}$

Here MSB stands for a Most significant bit and LSB stands for a least significant bit.

## # Other Base System to Decimal Conversion

Binary to Decimal:

In this conversion, binary number to a decimal number, we use multiplication method, in such a way that, if a number with base n has to be converted into a number with base 10, then each digit of the given number is multiplied from MSB to LSB with reducing the power of the base. Let us understand this conversion with the help of an example.

Example 1. Convert $(1101)_{2}$ into a decimal number.

Solution: Given a binary number $(1101)_{2}$.

Now, multiplying each digit from MSB to LSB with reducing the power of the base number 2.

$1 × 2^3 + 1 × 2^2 + 0 × 2^1 + 1 × 2^0$

= 8 + 4 + 0 + 1

= 13

Therefore, $(1101)_2 = (13)_{10}$

Octal to Decimal:

To convert octal to decimal, we multiply the digits of octal number with decreasing power of the base number 8, starting from MSB to LSB and then add them all together.

Example 2: Convert $22_8$ to decimal number.

Solution: Given, $22_8$

$2 x 8^1 + 2 x 8^0$

= 16 + 2

= 18

Therefore, $22_8 = 18_{10}$

Example 3: Convert 12116 to decimal number.

Solution:

1 x $16^2$ + 2 x $16^1$ + 1 x $16^0$

= 16 x 16 + 2 x 16 + 1 x 1

= 289

Therefore, $121_{16} = 289_{10}$

AI悦创·编程一对一

AI悦创·推出辅导班啦，包括「Python 语言辅导班、C++ 辅导班、java 辅导班、算法/数据结构辅导班、少儿编程、pygame 游戏开发」，全部都是一对一教学：一对一辅导 + 一对一答疑 + 布置作业 + 项目实践等。当然，还有线下线上摄影课程、Photoshop、Premiere 一对一教学、QQ、微信在线，随时响应！微信：Jiabcdefh

C++ 信息奥赛题解，长期更新！长期招收一对一中小学信息奥赛集训，莆田、厦门地区有机会线下上门，其他地区线上。微信：Jiabcdefh

• 0
• 0
• 0
• 0
• 0
• 0

• 按正序
• 按倒序
• 按热度