# Binary-Decimal System Decimal to Binary System

Conversion steps:

1. Divide the number by 2.
2. Get the integer quotient and remainder.
3. Divide the quotient again by 2.
4. Repeat the steps until the quotient is equal to 0.
5. Remainder of each step will give the binary digits.

Example: Convert 1310 to binary

Therefore

1310 = 11012

Example: Convert 17410 to binary:

Therefore

17410 = 101011102

Fractional Decimal to Binary System

Conversion steps:

1. Multiply the number by 2.
2. Get the product and the integer part.
3. Multiply the fractional part of the product by 2.
4. Repeat the steps until the fractional part is equal to 0.
5. Integer part of each step will give the binary digits.

Example: Convert 0.125 into Binary

Therefore,

(0.125)10 = (0.001)2

Binary to Decimal System

Conversion steps:

N = bn qn… b3 q3 + b2 q2 + b1 q1 + b0 q0 +….

Where bx = Binary digits (bits: 0,1)              qx = 20,21,22

Example: 1012 = (1 * 22) + (0 * 21) + (1 * 20) = 5

1011001012 =1*28+0*27+1*26+1*25+0*24+0*23+1*22+0*21+1*20= 357

Fractional Binary to Decimal System

Above formula can be expanded into
N= b-1 q-1 + b-2 q-2 +….

Example:

0.1012 = (1*1/2) + (0*1/22) + (1*1/23)

0.1012 = 1*0.5 + 0*0.25 + 1*0.125

0.1012 = 0.625

Therefore 101.1012 =5.625 