Step:
(1) Each three bits in binary (right to left) equals one octal digit in the same direction)
Example - Convert (10110111) 2 to an Octal number.
Reverse the process to convert from Octal to Binary
Binary ↔ Hexadecimal Conversion - “Group of 4 method”
Steps:
(1) Each four bits in binary (right to left) equals one hex digit in the same direction)
Example:- Convert (110110111) 2 to a hexadecimal number
Reverse the process to convert from hexadecimal to binary
Any base to Decimal Conversion - “Polynomial Function Method”
The most general number in any base is the real number and the general rule is as follows:
(Real Number)r = (dj...d 1 d 0. d- 1 d-2...)r = (djrj + ... +d 1 r^1 + d 0 r^0 + d -1r-1 + d -2r-2 + ...) 10
Example – The most common conversion is Hex integer to decimal base. For this example,
convert (1CAB) 16 to decimal:
(1CAB) 16 = (1*16^3 + 12*16^2 + 10*16^1 + 11*16^0 ) = (7339) 10
Example - Although not common, let’s do an example of converting a real binary number to
decimal so Convert (11010) 2 to decimal.
(11010.11) 2 = ( 1*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 + 1*2-1 + 1*2 -2) = (26.75) 10
Integer Decimal Conversion to any Base – “Repeated Radix Division Method”
The solution is based on the fact that
(integer number) 10 = d nrn + ... + d 2 r^2 + d 1 r^1 + d 0 r^0 = (dn...d 2 d 1 d 0 )r
Steps:
(1) If (integer number) 10 is divided by r, the remainder is d 0 (Least Significant Digit, LSD)
(2) If the quotient from step 1 is divided by r the remainder is the next digit
(3) Repeat step 2 until the quotient is zero were the remainder is the d n (Most Significant
digit, MSD)
( 000 1 1011 0111 ) 2
( 1 B 7 ) 16
( 010 110 111 ) 2
( 2 6 7 ) 8
“0” is added to
make a group of 3