Humans have been seeking a means to keep track of things and count them since the beginning of time. Earlier civilizations utilized various forms and techniques to keep track of things, but as human history progressed, man developed a number system to make counting things quicker and simpler.
What is a Number System in Maths?
A number system is a way of expressing numbers through writing. It represents the arithmetic and algebraic structure of the figures and offers a unique representation for each number. We can also do mathematical operations like addition, subtraction, and division using it.
The value of any digit in a number may be calculated using the following formula:
- The number
- Its numerical position
- The number system’s foundation
Binary System
One form of the Number Representation method is the Binary Number System. The binary system is used to represent binary quantities that can be represented by any device with only two possible operating states. A switch, for example, has only two states: open and closed.
There are just two symbols or potential digit values in the Binary System, namely 0 and 1. The addition of a 0b prefix or a 2 suffix to a binary number indicates it is binary. By clicking here you can convert binary systems to other number systems.
Every digit’s position has a weight that is a power of two. Each place in the Binary system is worth twice as much as the preceding one, therefore the numeric value of a Binary number is calculated by multiplying each digit by the value of the position in which the digit appears, then adding the results.
Most Significant Bit (MSB) | Binary Point | Least Significant Bit (LSB) | |||
22 | 21 | 20 | 2-1 | 2-2 | 2-3 |
4 | 2 | 1 | 0.5 | 0.25 | 0.125 |
Example-1 − The number 125 is interpreted as
125 = 1×26+1×25+1×24+1×23+1×22+0x21+1×20=1111101
The least significant bit (LSB) is the first bit on the right, while the most important bit is the first bit on the left (MSB).
Decimal Number System
When a number system’s base value is 10, it’s known as a decimal number system, and it plays a crucial part in the advancement of science and technology. The value of each digit is determined by its location (or weight) in a number in the weighted (or positional) number representation. This is also known as the base-10 number system, which contains ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and so on. Every digit’s position has a weight that is a power of ten. Each place in the decimal system has ten times the significance of the preceding position, which implies that the numeric value of a decimal number is calculated by multiplying each digit by the value of the position in which the digit appears, then adding the products.
Example-1 − The number 2025 may be written as
2×103+0x10x2+2x10x1+5×100 = 2000+0+20+5 = 2005.
The least significant bit (LSB) is the fifth bit from the right, while the most important bit is the second bit from the left (MSB)
Most Significant Bit (MSB) | Decimal Point | Least Significant Bit (LSB) | |||
102 | 101 | 100 | 10-1 | 10-2 | 10-3 |
100 | 10 | 1 | 0.1 | 0.01 | 0.001 |
A number represented in the base system has coefficients multiplied by the power of r in general. An aj coefficient is a number that varies from 0 to 1. (r-1).
The following is an example of how to represent a real number in base-r:
anxrn+a(n-1) xr(n-1) +… … +a1xr1+a0+a-1xr-1+a-2xr-2+… … +a-mxr-m
Where a0, a1, …, an (n-1) are integer component digits and an is the total number of integer digits, and n is the total number of integer digits. Fractional part digits a-1, a-2, …, and a-m, where m is the total number of fractional digits.
Hexadecimal Number System
The Hexadecimal Number System is a kind of numerical representation in which the base number is 16. This indicates that there are only 16 potential digit values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Where A, B, C, D, E, and F represent the decimal values 10, 11, 12, 13, 14, and 15 in single bits. Any digit’s value can be represented using only four bits. The addition of a 0x prefix or an h suffix to a decimal number indicates it is hexadecimal.
Every digit’s position has a weight that is a power of 16. The numeric value of a hexadecimal number is calculated by multiplying each digit by the value of the place in which the digit appears and then adding the products in the Hexadecimal system. As a result, it’s also a weighted (or positional) number system.
Representation of Hexadecimal Number
Each Hexadecimal number may be represented with only four bits, with distich values ranging from 0000 (for 0) to 1111 (for F = 15 = 8+4+2+1). The binary equivalents of Hexadecimal numbers are listed below.
Hex digit | 1 | 0 | 2 | 3 | 4 | 5 | 6 | 7 |
Binary | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 |
Hex digit | 8 | 9 | A = 10 | B = 11 | C = 12 | D = 13 | E = 14 | F = 15 |
Binary | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
Because the Hexadecimal number system’s base value is 16, the maximum value of a digit is 15, and it cannot be greater than 15. The weights of 160, 161, 162, 163, and so on are assigned to the places to the left of the hexadecimal point in this number system.
Most Significant Bit (MSB) | Hex Point | Least Significant Bit (LSB) | |||
162 | 161 | 160 | 16-1 | 16-2 | 16-3 |
256 | 16 | 1 | 1/16 | 1/256 | 1/4096 |
Similarly, the weights of 16-1, 16-2, 16-3, and so on are assigned to the places to the right of the hexadecimal point. This is referred to as the base power of 16. Any hexadecimal number’s decimal value may be calculated by adding the sum of each digit’s positional value.
Example 1: The number 512 may be deduced as
512=2×162+0x161+0x160=200
The least significant bit (LSB) is 0 on the right, while the most significant bit is 2 on the left (MSB).
Conclusion
In Boolean algebra, the binary number system can also be utilized. The advantages of the Binary Number System are simplicity of coding, fewer computations, and fewer computational mistakes.
Because digital systems (e.g., computers) and hardware are based on the binary system (either 0 or 1), we need 4-bit space to store each bit of a decimal number, whereas a hexadecimal number requires only 4-bit and has more digits than a decimal number, which is a benefit of the Hexadecimal Number System.