Converting Number Systems - Owlcation - Education
Updated date:

Converting Number Systems

Stive has a 1st Class Honors Electronics Engineering degree including a high level math module and also masters level modules, from the O.U.

Number Bases

Number Bases

Common Number Systems Refresher

The default decimal, Base10, system ideally should be annotated 0, 110, 210, 310, 410, 510, 610, 710, 810, 910, but the subscripts are omitted in everyday use.

The Decimal Base10 system columns

Column Name 10Mils Mils 100Ths 10Ths Ths 100s 10s Units

Base10 Column Value 107 106 105 104 103 102 101 100

Decimal Column Value 10Mil10 1Mil.10 100Th.10 10Th.10 100010 10010 1010 110


The Binary, Base2, system has two discrete numeric values of 0 and 12, equivalent to 0 and 110.

Column values are shown for an 8-bit computer binary word, for a 16-bit word the MSB column would be 215 (32,76810).

Column Name (MSB)128s 64s 32s 16s 8s 4s 2s 1s (LSB)

Base2 Column Value 27 26 25 24 23 22 21 20

Decimal Column Value 12810 6410 3210 1610 810 410 210 110


The Octal, Base8, system has eight discrete numeric values of 0, 18, 28, 38, 48, 58, 68, and 78, equivalent to 0, 110, 210, 310, 410, 510, 610, and 710.

Column Name 32768s 4096s 512s 64s 8s 1s (Units)

Base8 Column Value 85 84 83 82 81 80

Decimal Column Value 3276810 409610 51210 6410 810 110


The Hexadecimal, Base16, system has sixteen discrete alpha-numeric values of 0, 116, 216, 316, 416, 516, 616, 716, 816, 916, A16, B16, C16, D16, E16, and F16, equivalent to 0, 110, 210, 310, 410, 510, 610, 710, 810, 910, 1010, 1110, 1210, 1310, 1410, and 1510.

Column Name 65536s 4096s 256s 16s 1s (Units)

Base16 Column Value 164 163 162 161 160

Decimal Column Value 6553610 409610 25610 1610 110

Converting Decimal Base10 to Binary Base2, (the quicker way)

Example Convert 45810 to Binary Base2

Divide the number by 2 continuously until the value is 0.

2 ) 458 Remainder(R)

2 ) 229 (R)0

2 ) 114 (R)1

2 ) 057 (R)0

2 ) 28 (R)1

2 ) 14 (R)0

2 ) 07 (R)0

2 ) 3 (R)1

2 ) 1 (R)1

0 (R)1

Then read the binary value from the bottom (MSB) to the top (LSB) of the remainder column.

So 45810 is 1110010102

Converting Number Systems

Converting Number Systems

Converting Decimal Base10 to Octal Base8, (the quicker way)

Example Convert 91610 to Octal8

Divide the number by 8 continuously until the value is 0.

8 ) 916 Remainder(R)

8 ) 114 (R)4

8 ) 14 (R)2

8 ) 1 (R)6

0 (R)1

Then read the octal value from the bottom to the top of the remainder column.

So 91610 is 16248

Converting Decimal Base10 to Hexadecimal Base16, (the quicker way)

Example Convert 183210 to Hexadecimal16

Divide the number by 16 continuously until the value is 0.

16 ) 1832 Remainder(R)

16 ) 114 (R)8

16 ) 7 (R)2

0 (R)7

Then read the hexadecimal value from the bottom to the top of the remainder column.

So 183210 is 72816

Longer Method of Converting, understanding the columns

Converting Decimal Base10 (45810) to Binary Base2

Converting Decimal Base10 (91610) to Octal Base8

Converting Decimal Base10 (183210) to Hexadecimal Base16


Write the Basen columns from the right-hand column (1s column or Binary LSB) moving left, adding more, until the Column Base10 Value is greater than the decimal value to be converted (maximum required column or Binary MSB).

Write 0 in this final, maximum, column (discarded later),


Binary Base2 –write 1 in the next column.

Octal Base8 & Hexadecimal Base16 – calculate the next column numerical value by dividing the decimal starting value by the column Base10 value and write the integer obtained as the column numeric value.


Base2

29 28 27 26 25 24 23 22 21 20

51210 25610 12810 6410 3210 1610 810 410 210 110

0 1

Base8

84 83 82 81 80

409610 51210 6410 810 110

0 1

Base16

163 162 161 160

409610 25610 1610 110

0 7


Base2 Subtract the decimal value of that column from the starting value

Base2 45810 – 25610 = Remainder 20210


Base8 & Base16 Multiply the integer, the column numeric value, by the column Base10 value and then subtract the result from the starting value

Base8 91610 – 51210 = Remainder 40410

Base16 183210 – 179210 = Remainder 4010


Move along all columns, writing 0 when the column Base10 value is greater than (>) the remainder.


When the column Base10 value is less than (<) the remainder –

Base2 Write 1 then subtract the column Base10 decimal value from the current remainder...

Base8 & Base16 Calculate the required column numeric value by dividing the remainder value by the column Base10 value and write the integer obtained, as the column numeric value, then multiply the integer by the column Base10 value and subtract the result from the current remainder...

... to produce a new remainder value.


Base2

12810 < 20210 hence 27 column = 1; 20210 - 12810 = 7410 (new remainder)

6410 < 7410 hence 26 column = 1; 7410 - 6410 = 1010 (new remainder)

And so on resulting in the remaining columns being 0, 0, 1, 0, 1, 0

So 45810 is 1110010102


Base8

6410 < 40410 hence 40410 ÷ 6410 = 6; 6410 x 6 = 38410; 40410 - 38410 = 2010 (new remainder)

810 < 2010 hence 2010 ÷ 810 = 2; 810 x 2 = 1610; 2010 - 1610 = 410 (new remainder)

And so on, resulting in the remaining column value being 4.

So 91610 is 16248


Base16

1610 < 4010 hence 4010 ÷ 1610 = 2; 1610 x 2 = 3210; 4010 - 3210 = 810 (new remainder)

And so on, resulting in the remaining column value being 8.

So 183210 is 72816

Suggested Conversion Plan

Suggested Conversion Plan

Converting Binary Base2 to Octal Base8, Hexadecimal Base16 and Decimal Base10

Convert Binary Base2 (1110010102) to Octal Base8

Group the binary digits into groups of three beginning at the right-hand side

111 001 010

Then convert each group to Decimal Base10, equivalent Base8, values,

7128 [Check 2+(1x8)+(7x64)= 2+8+ 448= 458]


Convert Binary Base2 (1110010102) to Hexadecimal Base16

Group the binary digits into groups of four beginning at the right-hand side

1 1100 1010

Then convert to Decimal Base10, equivalent Base16, values,

1CA16 [Check 10+(12x16)+(1x16)= 10+192+ 256= 458]


Convert Binary Base2 (1110010102) to Decimal Base10

First group the columns and then convert them to either Octal or Hexadecimal (personal preference), as above, and then convert to Decimal.

Converting Octal Base8 to Binary Base2, Hexadecimal Base16 and Decimal Base10

Convert Octal Base8 (7128) to Binary Base2

Write out the numbers in groups of three binary digits

7128 = 1110010102


Convert Octal Base8 (7128) to Hexadecimal Base16

Write out the numbers in groups of four binary digits

Then convert these groups to Hexadecimal Base16 values

7128 = 1 1100 1010 = 1CA16


Convert Octal Base8 (7128) to Decimal Base10

Calculate each individual column Base10 value and sum them

7128 = (7x6410) + (1x810) + 210 = 45810

Convert Hexadecimal Base16 (91616) to Binary Base2

Write out the numbers in groups of four binary digits

91616 = 1001 0001 01102 (without spaces)

Converting Hexadecimal Base16 to Octal Base8 and Decimal Base10

Convert Hexadecimal Base16 (91616) to Octal Base8

Write out the numbers in groups of four binary digits

91616 = 1001 0001 01102

Then group them in threes

= 100 100 010 1102

Then convert these groups to Octal Base8 values

= 44268


Convert Hexadecimal Base16 (91616) to Decimal Base10

Calculate each individual column Base10 value and sum them

91616 = (9x25610) + (1x1610) + 610 = 411810

© 2019 Stive Smyth

Comments

Stephen on June 28, 2020:

Great site.