Number base conversion
Number system
Definition
Before understand the conversion first learn about “Number system” – A technique that is used to represent the numbers in computer architecture is known as number system. Every value that is store in computer memory is defining number system. A computer store data in the form of bits or digits that the human cannot read data easily that’s why computer require inputs and outputs interface. The computer store bits or digits in the coded form. Now to understanding these codes we firstly understand the number system.
There are four type of number system
1) Binary number system
2) Decimal number system
3) Octal number system
4) Hexadecimal number system

Binary number system:
In number system, the digits with base 2 are known as binary number system. In binary number system we use only two digits: zero (0) and one (1). Every numbers used in binary number system with base 2.
Example: (010101)_{2} 
Decimal number system:
In number system, the digits with base 10 are known as decimal number system. In decimal number system we use digits from 0 to 9. Every numbers used in decimal number system with base 10.
Example: (765849)_{10} 
Octal number system:
In number system, the digits with base 8 are known as octal number system. In octal number system we use digits from 0 to 7. Every numbers used in decimal number system with base 8.
Example: (2346710)_{8} 
Hexadecimal number system:
In number system, the digits with base 16 are known as hexadecimal system. In hexadecimal number the first 10 digits are same as the decimal number system 0 to 9 and remaining six digits are the symbol A, B, C, D, E, and F that represent decimal value 10, 11, 12, 13 ,14 and 15 respectively. Every numbers used in decimal number system with base 16.
Example: (D45F70A)_{16}
Conversion of number system
The computers only understand the binary number system but human cannot understand binary number system so we use conversion to understand the number systems. We use many number of methods to convert numbers in other base. These methods are discussed below.

Conversion from another base to decimal
We use some steps to convert other base to base 10 (decimal number).
1) Firstly we know the position of digits.
2) Multiply the right most value or number with 2^0 than move to left side and increase the power of 2.
3) Calculate the sum to these digits. The result of this sum is equal to decimal number.

Conversion binary to decimal
Example: (11001)_{2}
(1x(2^4))+(1x(2^3))+(0x(2^2))+(0x(2^1))+(1x(2^0))
16+8+0+0+1 = (25)_{10}
Example: (1001001)_{2}
(1x(2^6))+(0x(2^5))+(0x(2^4))+(1x(2^3))+(0x(2^2))+(0x(2^1))+(1x(2^0)
64+0+0+8+0+0+1 = (73)_{10}

Conversion octal to decimal
Example: (2314)_{8}
(2x(2^3))+(3x(2^2))+(1x(2^1))+(4x(2^0))
16+12+2+4 = (34)_{10}
Example: (43271)_{8}
(4x(2^4))+(3x(2^3))+(2x(2^2))+(7x(2^1))+(1x(2^0))
64+24+8+14+1 = (111)_{10}

Conversion hexadecimal to decimal
Example: (A23F)_{16}
(Ax(2^3))+(2x(2^2))+(3x(2^1))+(Fx(2^0))
80+8+6+15 = (109)_{10}
Example: (D4C3)_{16}
(Dx(2^3))+(4x(2^2))+(Cx(2^1))+(3x(2^0))
104+16+24+3 = (147)_{10}

Conversion from decimal to another form
Converting decimal to other base we use some steps that are given below:
1) Firstly we divide the decimal number by the value of the new base.
2) Record the reminder of numbers.( the right most digit of the new number)
3) Divide the quotient of the previous division by the new base.
4) Record the reminder of number (the next digit of the new base number).
Conversion decimal to binary
42_{10}
Hence 42_{10} = 01010102
Conversion decimal to octal
952_{10}
Hence 952_{10} = 1670_{8}
Conversion decimal to hexadecimal
428_{10}
Hence 428_{10} = 1AC_{16}
Conversion of binary to hexadecimal
Using steps to converting binary to hexadecimal
1) Converting binary digits to decimal digits
2) Converting decimal to hexadecimal digits.
Example: 110100112 =? _{16}
Step 1: convert 11010011_{2} to base 10
11010011_{2}
=(1x(2^7))+(1x(2^6))+(0x(2^5))+(1x(2^4))+(0x(2^3))+(0x(2^2))+(1x(2^1))+(1x(2^0))
=1×128+1×64+0x32+1×16+0x8+0x4+1×2+1×1
=128+64+0+16+0+0+2+1
=211_{10}
Step 2: convert 211_{10} to base 16
Therefore, 11010011_{2} = 2111_{0} = D3_{16}
Hence 11010011_{2} = D3_{16}
Conversion octal to binary
We follow 2 steps to converting digits octal to binary:
1) Firstly we converting each octal digit to a 3 binary number
2) Than combining each result of binary digits into a single binary numbers.
Example: 562_{8}
Step 1: convert each octal digits to 3 binary digits
58 = 101_{2}
68 = 110_{2}
28 = 010_{2}
Step 2: combining each result of binary number
562_{8} = 101110010_{2}
Example: 6751_{8}
6751_{8} = 110 111 101 001
110 = 6
111 = 7
101 = 5
001 = 1
=110111101001_{2}
Hence 6751_{8} = 110111101001_{2}
Conversion hexadecimal to binary
We follow three steps
1) Firstly converting hexadecimal digits to decimal digits
2) Than converting decimal digits to binary digits (group of four).
3) Combine each result of binary numbers
Example: 2AB_{16}
Step 1: converting hexadecimal digits to decimal digits
2_{16} = 2_{10}
A_{16} = 10_{10}
B_{16} = 11_{10}
Step 2: converting decimal digits to binary numbers
2_{10} = 0010_{2}
10_{10} = 1010_{2}
11_{10} = 1011_{2}
Step 3: combining each result
001010101011_{2}
Example: ABC_{16}
A = 1010_{2}
B = 1011_{2}
C = 1100_{2}
Hence, ABC_{16} = 101010111100_{2}
Conversion binary to octal
Using two steps to converting binary to octal
1) Divide each binary digits into group of three
2) Convert each group of three binary digit into octal one octal digit
3) combining
Example: 101110_{2}
Step 1: divide the binary digit into group of 3
101 110
Step 2: convert each group into one octal
#101_{2}
= (1x(2^2))+(0x(2^1))+(1x(2^0))
=4+0+1
=5_{8}
#110_{2}
=(1x(2^2))+(1x(2^1))+(0x(2^0))
=4+2+0
=6_{8}
Hence 101110_{2} = 56_{8}