For any counting system, each individual digit of a given number represents a value according to its position relative to the unit position10 and according to the base underlying the respective system:
The conversion from integer decimal to binary numbers is done by repeated division by 2. The remainder of this division, which is either 0 or 1, successively provides the digits of the binary number (from right to left). As an example it is shown how to convert the decimal value 6 to the binary system:
The conversion of fractional decimal to fractional binary numbers smaller than 1 is done by repeated multiplication by 2. The value at the decimal point, which is either 0 or 1, is the next binary digit (from left to right), and the remaining fraction is further multiplied by 2. This is shown as an example for the decimal value 3/8:
As in the decimal system, an integer exponent \(n\gt 0\) tells the number of trailing zeros of \(2^n\) (or, equivalently, the number of places of the next-smallest integer):
| \begin{equation*} 2^n=\underbrace{1000...0}_{n+1\text{ places}}\,,\quad 2^n-1=\underbrace{111...1}_{n\text{ places}}\,. \label{eq:numberofplaces1} \end{equation*} | (1.4) |
On the other hand, an integer exponent \(n\lt0\) tells the number of leading zeros of \(2^n\) up to the unit position (or, equivalently, the number of nonzero places of \(1-2^n\)):
| \begin{equation*} 2^{-|n|}=\underbrace{0.00...01}_{|n|+1\text{ places}}\,,\quad 1-2^{-|n|}=0.\!\underbrace{11...11}_{|n|\text{ places}}\,. \label{eq:numberofplaces2} \end{equation*} | (1.5) |
In the hexadecimal system (abbreviated as “hex”), the base 16 is used. Therefore, at each place of a number, values between zero and fifteen can occur. In this system, the letters A through F serve as signs to denote the values ten through fifteen. The hexadecimal digits therefore are: 0, 1, 2, ..., 9, A, B, C, D, E, F. Example:
| \begin{equation*} 17\text{F}_{\text{hex}} = (1\times16^2+7\times16^1+15\times16^0)_{10} = 383_{10}\,. \end{equation*} | (1.6) |
10For integer numbers, the unit position is the last digit to the right; for fractional numbers it is the one left of the (respective) point.
![]() |
![]() |
![]() |
![]() |
© J. Carstensen (Comp. Math.)