Number System represents value of number with respect to its given base. Based on its Base value, a number has unique representation and different number systems have different representation of the same number. For example, Binary, Octal, Decimal and Hexadecimal Number systems are used in microprocessor programming.
If the Base value of a number system is 10, then it is called Decimal number system which has most important role in the development of science and technology. This is the weighted (or positional) number representation, where value of each digit is determined by its position (or their weight) in a number. This is also known as base-10 number system which has 10 symbols, these are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Position of every digit has a weight which is a power of 10. Each position in the decimal system is 10 times more significant than the previous position, that means numeric value of a decimal number is determined by multiplying each digit of the number by the value of the position in which the digit appears and then adding the products.
Example 1: The number 2025 is interpreted as −
2025 = 2×103+0x10x2+2x10x1+5×100 = 2000+0+20+5 = 2005
Here, right most bit 5 is the least significant bit (LSB) and left most bit 2 is the most significant bit (MSB).
Advantages and Disadvantages
The main advantages of Decimal Number System are easy readable, used by humans, and easy to manipulate.
However, there are some disadvantages, like wastage of space and time. Since digital system (e.g., Computers) and hardware is based on binary system (either 0 or 1), so we need to 4 bit space to store each bit of Decimal number, whereas Hexadecimal number is also needed only 4 bit and hexadecimal number has more digits than decimal number which is an advantage of Hexadecimal Number System.
9’s and 10’s Complement of Decimal (Base-10) Number
Simply, 9’s complement of a decimal number is the subtraction of it’s each digits from 9. For example, 9’s complement of decimal number 2005 is 9999 – 2005 = 7994.
10’s complement of decimal number is 9’s complement of given number plus 1 to the least significant bit (LSB). For example 10’s complement of decimal number 2005 is (9999 – 2005) + 1 = 7995.