NOTE: It may be necessary for the reader to read this article more then once for complete understanding.
Two of the most common number systems used in the world of computers are the Binary and Hexadecimal. However, Hexadecimal is the dominant one of the two.
Number systems use symbols to represent values. The ones covered in this article are as follows:
The base value of a number system is the number of values it has before repeating itself. Binary has a base of 2 with digits ranging from 0 -1. Decimal has a base value of 10, meaning it has ten single digits ranging from 0 - 9. Hexadecimal has 16, ten of which are numerical (0 - 9) and the remaining six are alphabetic (A - F).
When a single digit in any number system exceeds its Base value, it returns to zero, then the remainder is carried to its left one place.
BASEmultiplier value - A multiplier value is used in each column position of a number. It represents the weight factor. Its value determines how many times the Base value is multiplied by itself thus giving the placeholders seen below from right to left labelled as "Ones", "Tens", "Hundreds", "Thousands", "Ten Thousands" and so on. . . .
It is important to understand that the base number IS NOT multiplied by the weighting factor, rather the weighting factor shows how many copies of the base number are part of a sequence of multiplies ie; 104=10 x 10 x 10 x 10. Furthermore, any number to the zero power equals 1.
The least sigificant digit (LSD) is on the right and the most significant digit (MSD) is on the left.Base 2 (Binary)
In the Binary numbering system each Binary place is weighted with the least significant bit on the right and the most significant bit on the left. Notice the 2's? In Binary there are only two single digits in its base as noted above, 0 and 1.
A single Binary digit is called a bit, four bits are called a "Nibble" and eight bits are called a "Byte". With eight bits you can represent any decimal number from 0 to 255 giving 256 possibilities.
Adding the sum of each of the corresponding places that have a one under them gives:
1×27 + 1×26 + 1×25 + 1×24 + 0×23 + 1×22 + 0×21 + 0×20 = 24410
1×128 + 1×64 + 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 0×1 = 24410
128 + 64 + 32 + 16 + 0 + 4 + 0 + 0 = 24410
With Excedance in mind you can see how the below Binary sums are derived at:
Below is a table that shows another example for adding Binary digits:
Because Binary takes more placeholders then Decimal does to represent a number of the same value it is generally not used. Higher based number systems allow for the representation of a larger number with fewer digits then lower based number systems can.
Base 16 (Hexadecimal)
As you can see below, the base is being referred to as 16 and the weights above and to the right tell how many times the Base is multiplied by itself giving the values below.
There isn't much else to reflect on here because Hexadecimal is much like the other two numbering systems discussed, so I'll move on to converting between the three.
PART II - CONVERTING BETWEEN SYSTEMS
To convert from Decimal to Binary requires a series of divides. The Decimal number is divided by the Base value for the Binary numbering system which is 2. The remainders are kept track of during the division and reveal the single digits within the Binary number when the computation is complete.
As the divisions are calculated, the Binary digit is found through the remainder. The first remainder is the first digit in the Binary number and so on. So, the Binary conversion for 35710 is 1011001012.
Hexadecimal to Decimal conversion
Convert F9BD16 to decimal notation.
It is easiest to convert the single Hexadecimal digits to their corresponding Decimal values first; F=15 9=9 B=11 D=13.
Now do the multiplication and addition keeping in mind how weighting factors work.
15×163 + 9×162 + 11×161 + 13×160
=15×4096 + 9×256 + 11×16 + 13×1
=61440 + 2304 + 176 + 13
With what you learned on this page you should be able to understand any Number system and convert between them .