Number Systems | Conversions
The following are conversion examples...
Power of 2's ...1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
CONVERT 123 (DECIMAL TO BINARY)
Find nearest power of 2 under 123 then subtract...
123 - 64 = 59
true statement, so 1 is first binary digit (1)
From remainder, subtract next lower power of 2...
59 - 32 = 27
true statement, so 1 is second binary digit (1 1)
From remainder, subtract next lower power of 2...
27 - 16 = 11
true statement, so 1 is third binary digit (1 1 1)
From remainder, subtract next lower power of 2...
11 - 8 = 3
true statement, so 1 is fourth binary digit (1 1 1 1)
From remainder, subtract next lower power of 2...
3 - 4 = not possible
false statement, so 0 is fifth binary digit (1 1 1 1 0)
From remainder, subtract next lower power of 2...
3 - 2 = 1
true statement, so 1 is sixth binary digit (1 1 1 1 0 1)
From remainder, subtract next lower power of 2...
1 - 1 = 0
true statement, so 1 is seventh binary digit (1 1 1 1 0 1 1)
The conversion is 1 1 1 1 0 1 1
Power of 2's ...1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
CONVERT 1 1 0 0 1 0 1 (BINARY TO DECIMAL)
Align the binary number with the power of 2's in columns. In the total row, place each power of 2 value under the column where there is a 1 binary digit. Place a 0 where there is a 0 binary digit. Add the total row together...
64 32 16 8 4 2 1 (power of 2's)
----------------------------------
1 1 0 0 1 0 1 (binary number)
----------------------------------
64 + 32 + 0 + 0 + 4 + 0 + 1 = 101 (total)
The conversion is 101
Power of 8's ...32768, 4096, 512, 64, 8, 1
CONVERT 321 (DECIMAL TO OCTAL)
Divide the number by 8...
321 / 8 = 40 (remainder 1)
40 is the answer, so divide 40 by 8...
40 / 8 = 5 (remainder 0)
5 is the answer, so divide 5 by 8...
not possible (remainder 5)
Based on the remainders from last to first, the conversion is 501.
Power of 8's ...32768, 4096, 512, 64, 8, 1
CONVERT 173 (OCTAL TO DECIMAL)
Align the octal number with the power of 8's in columns. Multiply the columns, then add the answers...
512 64 8 1 (power of 8's)
-----------------
1 7 3 (octal number)
64 * 1 = 64
8 * 7 = 56
1 * 3 = 3
---------------
123
The conversion is 123.
Power of 16's ...65536, 4096, 256, 16, 1
CONVERT 283 (DECIMAL TO HEXADECIMAL)
Divide the number by 16...
283 / 16 = 17 (remainder 11)
17 is the answer, so divide 17 by 16...
17 / 16 = 1 (remainder 1)
1 is the answer, so divide 1 by 16...
not possible (remainder 1)
Based on the remainders from last to first, the conversion is 11B.
(hexadecimal B = 11)
Power of 16's ...65536, 4096, 256, 16, 1
CONVERT 1FA (HEXADECIMAL TO DECIMAL)
Multiply each number with a power of 16 starting with the last value of the hexadecimal, then add the answers...
(hexadecimal 1 = 1, F = 15, A = 10)
A * 1 = 10
F * 16 = 240
1 * 256 = 256
------------------
506
The conversion is 506.