A number system in base r or radix r uses unique symbols for r digits. One or more digits are combined to get a number. The base of the number decides the valid digits that are used to make a number. In a number, the position of digit starts from the right-hand side of the number. The rightmost digit has position 0, the next digit on its left has position 1, and so on. The digits of a number have two kinds of values—
• Face value
• Position value
The face value of a digit is the digit located at that position. For example, in decimal number 52, face value at position 0 is 2 and face value at position 1 is 5.
The position value of a digit is (base position).
Example : In decimal number 52, the position
value of digit 2 is 100 and the position value of digit 5 is 101. Decimal numbers have a base of 10.
The number is calculated as the sum of, face value * baseposition, of each of the digits. For
decimal number 52, the number is 5*101 + 2*100 = 50 + 2 = 52.
In computers, we are concerned with four kinds of number systems, as follows —
• Decimal Number System — Base 10
• Binary Number System — Base 2
• Octal Number System — Base 8
• Hexadecimal Number System — Base 16
The numbers given as input to computer and the numbers given as output from the computer, are generally in decimal number system, and are most easily understood by humans. However, computer understands the binary number system, i.e., numbers in terms of 0s and 1s. The binary data is also represented, internally, as octal numbers and hexadecimal numbers due to their ease of use.