Number Conversion
The purpose of this program is to show - in a step by step - how numbers are converted
from one base to another by using three of the most common and most used bases.
Number conversion is a process by which a number can be converted from one
base to another. Natural numbers, for example, are numbers of base
10; they are represented by the digits 0-9.
Binary numbers are numbers of base 2; and they represented by the
digits 0-1.
Octal numbers are numbers of base 8; and they are represented by the
digits 0–7.
Hexadecimal numbers are numbers of base 16; and they are represented
by the numbers 0–15, but because the numbers 10 to 15 are numbers of two
digits, 10-15 are replaced the the letters A-F. The following example explains why.
As an example, converting the decimal number 1234, to hexadecimal will produce 2,
13 and 4 as remainders of continual division by 16, from which the hexadecimal number
can be built by collecting the remainder in a reversed order to give 4132, but this
is not correct, because if this number is to be reversed back to its decimal form,
it will give a completely different number from 1234. Hence, to avoid confusion,
remainders greater than 9 are represented by the letters A-F, as in A is
10, B is 11 and so on to F is 15.
Other number bases exit and can be converted to and from, each has its name. The
table to the right lists some of them with direct link to a more in depth details
of some of them.
For more in depth details about number bases and their uses, visit the Wikipedia
link,
List of numeral systems.