Introduction
Understand the number system
Since the early days of human civilization, people have been using their fingers, sticks, and other things for counting. It all started perhaps, with the need to figure out the assets a person had. As daily activities became more complex, numbers became more important in trade, time, distance, and in all other spheres of human life. It became apparent that we needed more than our fingers and toes to keep track of the number in our daily routine.
Since people realized the need to count objects, they have sought easier counting methods. To handle large numbers, humans began counting in groups, which led to the creation of various number systems.
A number system defines a set of values used to represent ‘quantity.’ For example, we talk about the number of people attending a class, the number of modules each student takes, or use numbers to represent grades achieved in tests. Quantifying values and items relative to each other helps us make sense of our environment. Number systems fall into two broad categories:
1.Non-Positional Number Systems
2.Positional Number Systems
Base (or Radix) of System
The word base (or radix) refers to the number of allowable symbols used in a particular number system. These symbols can be Arabic numerals, Latin letters, or other recognizable marks representing the numerical value of a quantity. The decimal number system, which originated in India, uses 10 as its base. We indicate this by writing the number followed by a subscript showing the base. For example, (7592)10(7592)_{10} represents a number in base 10 (decimal), and (214)8(214)_8 represents a number in base 8 (octal).
For a computer, everything is in the digital form (binary form) whether it is number, alphabet, punctuation mark, instruction, etc. Let us illustrate with the help of an example. Consider the word ‘INDIA’ that appears on the computer screen as a series of alphabetic characters.However,for the computer,it is a combination of numbers.To the computer it appears as:
01001001 | 01001110 | 01000100 | 01001001 | 01000001 |
I | N | D | I | A |
Types of Number Systems
Number System | Radix Value | Set of Digits | Example |
---|---|---|---|
Decimal | R = 10 | (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) | `left(25right)_10` |
Binary | R = 2 | (0, 1) | `left(11001right)_2` |
Octal | R = 8 | (0, 1, 2, 3, 4, 5, 6, 7) | `left(31right)_8` |
Hexadecimal | R = 16 | (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) | `left(19right)_16` |
Decimal Number System
The primary number system used is the base ten or decimal number system. We use the decimal system every day when counting. Its name comes from the Latin word decem, which means ten. This number system uses ten digits: 0 through 9. Each digit in a base ten number represents a value ten times greater than the digit to its right.
Starting at the decimal point and moving left, each position represents the base (radix) value—10 for the decimal system—raised to a power. The power starts at 0 for the position immediately to the left of the decimal point and increases by 1 for each position further to the left.
Example = `10^3`,`10^2`,`10^1`,`10^0` Where,
- `10^3` = 10×10×10 = 1000
- `10^2` = 10×10 = 100
- `10^1` = 10 =10
- `10^0` = 1
Moving to the right of the decimal point is just like moving to the left except that we will need to place a minus sign in front of each power.
9735 | 9000 | Is equivalent to | 9 x 1000 | Is equivalent to | `9times10^3` |
+700 | 7 x 100 | `7times10^2` | |||
+30 | 3 x 10 | `3times10^1` | |||
+5 | 5 x 1 | `5times10^0` |
∴9735 = (9 × `10^3` ) + (7 × `10^2` ) + (3 × `10^1` ) + (5 × `10^0` ).
Binary Number System
- The digital computer provides accurate solutions to the problems by performing arithmetic computations. These numbers are not expressed as decimal numbers within the computer because it is not suitable for machine processes. Computers are not only powered by electricity, they compute with electricity.
- They shift voltage pulses around internally. When numbers are represented in a computer’s memory by means of small electrical circuits, a number system with only two symbols is used. These symbols are ON or OFF states of the circuit. This system of representing numbers is known as the binary number system.
- Circuits allow electricity to flow or to be blocked depending on the type of circuit. Computer circuit is made out of transistors, which have only two states, ON and OFF. ON is interpreted as 1, while OFF as 0. Similar to the decimal system, the position of a digit in a number indicates its value.
- Instead of ones, tens, hundreds, thousands, etc., as in the decimal system, the columns in the binary system contains ones, twos, fours, eights, etc. Each additional column to the left has powers of 2,specifically, each place in the number represents two times (2×’s) the place to its right. Below Table represents the first 10 binary numbers.
Decimal Numbers | Binary Numbers | |||
---|---|---|---|---|
0 | 0 | |||
1 | 1 | |||
2 | 1 | 0 | ||
3 | 1 | 1 | ||
4 | 1 | 0 | 0 | |
5 | 1 | 0 | 1 | |
6 | 1 | 1 | 0 | |
7 | 1 | 1 | 1 | |
8 | 1 | 0 | 0 | 0 |
9 | 1 | 0 | 0 | 1 |
Octal Number System
- The octal number system is a base 8 system, having eight admissible marks:0, 1, 2, 3, 4, 5, 6, and 7 with no 8’s or 9’s in the system. This system is a positional number system. The octal system uses powers of 8 to determine the digit of a number’s position.
Decimal Number | Binary Number | Octal Number |
---|---|---|
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 10 |
9 | 100 | 11 |
Hexadecimal Number System
- Hexadecimal system is similar to the decimal, binary, and octal number systems, except that the base is 16. Each hexadecimal number represents a power of 16. To represent the decimal numbers, this system uses 0 to 9 numbers and A to F characters to represent 10 to 15, respectively. The largest hexadecimal digit F is equivalent to binary 1111.
Decimal | Binary | Octal | Hexadecimal |
---|---|---|---|
0 | 0000 | 000 | 0 |
1 | 0001 | 001 | 1 |
2 | 0010 | 002 | 2 |
3 | 0011 | 003 | 3 |
4 | 0100 | 004 | 4 |
5 | 0101 | 005 | 5 |
6 | 0110 | 006 | 6 |
7 | 0111 | 007 | 7 |
8 | 1000 | 010 | 8 |
9 | 1001 | 011 | 9 |
10 | 1010 | 012 | A |
11 | 1011 | 013 | B |
12 | 1100 | 014 | C |
13 | 1101 | 015 | D |
14 | 1110 | 016 | E |
15 | 1111 | 017 | F |
Conclusion
Number systems are the basis of digital computing, allowing computers to express, save, and process numerical information. It is essential for computer scientists, programmers, and individuals involved in digital systems to have knowledge of various number systems like binary, decimal, octal, and hexadecimal. Every number system has special features and uses that are important in the fields of technology and computation.