1. How to convert binary to decimal ?

1. Find the position of every binary digit. We should count the position from the right direction of the number. And the position count starts from 0.

Example

0001 - position of 1 = 0, 0 = 1, 0 = 2, 0 = 3.

2. Multiply every digit with 2 to the power of their corresponding position. (2 position)

3. Finally, calculate the sum of all the multiples.

Convert (1111)2 to decimal

= 1 x 2 3 + 1 x 2 2 + 1 x 2 1 + 1 x 2 0

= 8 + 4 + 2 + 1

= (15)10

Convert (1001)2 to decimal

= 1 x 2 3 + 0 x 2 2 + 0 x 2 1 + 1 x 2 0

= 8 + 0 + 0 + 1

= (9)10




2. How to convert binary to octal ?

Group every 3 binary bits from right to left and construct the octal number system.

(101010101)2 to octal

= (101010101)2

= (101)(010)(101)

= (525)8

(11111111)2 to octal

= (11111111)2

= (11)(111)(111)

= (377)8




3. How to convert binary to hexadecimal ?

Group every 4 binary bits from right to left and construct the hexadecimal number system.

(101010101)2 to hexadecimal

= (101010101)2

= (1)(0101)(0101)

= (155)16

(11111111)2 to hexadecimal

= (11111111)2

= (1111)(1111)

= (15)(15)

= (ff)16


15 equivalent hexadecimal value is f.