DEV Community

Hrachya
Hrachya

Posted on

Understanding Binary Numbers: The language of Computers.

Binary numbers are the fundamental language used by computers to process information and communicate in the fields of computer science and digital technology. Binary is a system built on simplicity and elegance, despite the fact that it may initially seem cryptic or difficult. This blog article will explore the world of binary numbers and their useful uses in the digital sphere.
Binary numbers only use the digits 0 and 1, which makes them a base-2 numerical system. Binary represents numbers and data using a series of 0s and 1s, in contrast to our common decimal system (Base-10), where each digit can take on ten distinct values (0=9, for example). All digit computing systems are built around the binary system. In this concept, 1 means the on and 0 the off.
Each digit, or bit, in the binary format holds a place value based on powers of two. The bit on the far right stands for 20(1), the bit to its left for 21(2), the bit after that for 22(4), and so on. These bits can be combined to represent any positive integer. For instance, the decimal equivalent of the binary number 1011 is (1*2*3) + (0*2*2) + (1*2*0) = 11.
If we go more deeper into this topic, we can also convert binary to decimal and Vice Versa. To convert a binary number to decimal, we multiply each digit by its corresponding power of two and sum them up. To convert a decimal number to binary, we repeatedly divide the number by 2 and note the remainders until the quotient becomes zero.
It is important to note that binary numbers (Base-2) have no difference between our everyday used numbers. They also have the operations such as addition, subtraction, multiplication and division. For instance, you add the corresponding bits in binary addition from right to left, just like you do in decimal addition. The result is obvious if the sum of two bits is 0 or 1. If the total is 2, on the other hand, you put 0 and carry over 1 to the following column. Following this further using a concept known as two's complement, binary subtraction can be made simpler. Binary subtraction can be a little challenging. You can add the two's complement of the number being subtracted to the first number to subtract two binary numbers from each other.
Multiplication: Similar to decimal multiplication, binary multiplication only uses 0s and 1s. You must first do a sequence of partial products, then sum the results to multiply two binary values. And following this further, the division of binary numbers is the same as of the decimals. To divide one binary number by another, you keep track of the remainders.
Apart from binary, there are other number representations commonly used in computing, such as the well known decimal (The base-10), hexadecimal (Base-16), and octal(Base-8). This numbers have the same principles for operations such as addition, subtraction, multiplication and division. But for the case of the hexadecimal numbers, the digits range is from 0 to 9 and then instead of numbers we have letters from A to F, which are representing the values from 0 to 15.
In conclusion, understanding binary numbers is crucial for working in the sphere of computer science, because if a person wants to be a computer scientist, at first he must understand the language of computers and only then try to become a professional. Embracing binary allows us to unlock the power potential of the digital world.

Top comments (0)