Understanding Binary & Decimal Number Systems:
Binary Number System
The binary number system, or base 2, is the language of digital systems, computers, and networks. It uses only two digits or symbols: 0 and 1, representing the concept of "off" and "on". Binary numbers are a fundamental component of computing and electronic communication.
The binary number "100011" can be understood as follows:
- The first digit (the rightmost or LSB digit) (1) is in the one's place, (1 * 1 = 1)
- The second digit (1) in the two's place (1 * 2 = 2)
- The third digit (0) is in the four's place (0 * 4 = 0)
- The fourth digit (0) is in the eight's place, (0 * 8 = 0)
- The fifth digit (0) is in the sixteenth place, (0 * 16 = 0)
- And the sixth digit (the leftmost or MSB digit) (1) is in the thirty-second place, (1 * 32 = 32)
Therefore, the binary number (100011)2 is equivalent to decimal value of (1 + 2 + 0 + 0 + 0 + 32) = (35)10.
Now let's take a look at a binary number that has a fractional part. For instance, 10010.0101. The binary number "10010.0101" has two parts: part one is the integer part (e.g.10010), and part two is the fractional part (e.g. .0101)
The integer part (10010) of the binary number can be understood as follows:
- The first digit (the rightmost digit) (0) in the one's place (0 * 1 = 0)
- The second digit (1) in the two's place (1 * 2 = 2)
- The third digit (0) is in the four's place (0 * 4 = 0)
- The fourth digit (0) is in the eight's place, (0 * 8 = 0)
- The fifth digit (the leftmost digit) (1) is in the sixteenth's place, (1 * 16 = 16)
So the integer binary part 10010 is equivalent to decimal number 0 + 2 + 0 + 0 + 16 = 18.
And the fractional part (0101) of the binary number can be understood as follows:
- The first digit after the decimal (0) in the 2-1 or 1/2th place (0 * 2-1 = 0 * 1/2 = 0)
- The second digit after the decimal (1) in the 2-2 or 1/4th place (1 * 2-2 = 1 * 1/4 = .25)
- The third digit after the decimal (0) in the 2-3 or 1/8th place (0 * 2-3 = 0 * 1/8 = 0)
- The fourth digit after the decimal (1) in the 2-4 or 1/16th place (1 * 2-4 = 0 * 1/16 = .0625)
So the fractional binary part .0101 is equivalent to decimal number 0 +.25 + 0 + .0625 = 0.3125.
Therefore, the binary number (10010.0101)2 is equivalent to decimal value of (18.3125)10.
In summary, when converting a binary number to its equivalent decimal, we multiply each binary digit with its place value and add the products. Please note that place value is positive for integer numbers and negative for fractional numbers.
(10010.0101)2 = (0 x 20) + (1 x 21) + (0 x 22) + (0 x 23) + (1 x 24) +
(0 x 2-1) + (1 x 2-2) + (0 x 2-3) + (1 x 2-4)
= 0 + 2 + 0 + 0 + 16 + 1/4 + 1/16 = 2 + 16 + 0.25 + 0.0625 = (18.3125)10
It is worth remembering that the binary system is essential for encoding and processing data in the digital world, making it a cornerstone of computer science and technology.
Decimal Number System
The decimal number system, often referred to as base 10, is the number system familiar to most of us as we have always used it for our daily-life necessities. It's built upon ten possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Each place value represents a power of ten, making it a straightforward system for everyday use. For example, the decimal number "8216" can be understood as follows:
- The first digit (the rightmost or LSB digit) (6) is in the one's place, (6 * 1 = 6)
- The second digit (1) is in the ten's place, (1 * 10 = 10)
- The third digit (2) is in the hundred's place, (2 * 100 = 200)
- And the fourth digit (the leftmost or MSB digit) (8) is in the thousand's place, (8 * 1000 = 8000)
Therefore, 6 + 10 + 200 + 8000 = 8216, or 8000 + 200 + 10 + 6 = 8216.
The decimal number system is used for most common calculations, such as currency, time, and many real-world measurements.
Now let's take a look at a decimal number that has a fractional part. For instance, 5040.25.
The integer part (5040) can be understood as follows:
- The first digit (0) in the 100 or one's place (0 * 1 = 0)
- The second digit (4) in the 101 or ten's place (4 * 10 = 40)
- The third digit (0) is in the 102 hundred's place (0 * 100 = 0)
- The fourth digit (5) is in the 103 thousand's place, (5 * 1000 = 5000)
So the integer binary part = 0 + 40 + 0 + 5000 = 5040, or, 5000 + 40 + 0 = 5040.
And the fractional part (.25) can be understood as follows:
- The first digit after the decimal (2) in the 10-1 or 1/10th place (2 * 10-1 = 2 * 1/10 = 0.2)
- The second digit after the decimal (5) in the 10-2 or 1/100th place (5 * 10-2 = 5 * 1/100 = 0.05)
So the fractional part = 0.2 + 0.05 = 0.25
Therefore, adding the integer parts and fractional parts gives us (5040 + 0.25 = 5040.25)
Please note that binary numbers are often represented using the base 2, like this: (1001011)2 while the decimal number's base may or may not be used (in most cases they are not used), like this: (609754)10.
It is worth noting that, base 10 is omitted as it is the default number system for us. So, if there is no number base mentioned for a number, assume that it is a decimal number.