# The Binary Numbering System (base-2)

Every machine is an electronic system. in order to communicate with machines, the best way is to via electrical signals. Every electronic machine has a minimum of two signals i.e. “positive” and “negative”. Considering this as fundamental principles computers used binary to build their systems

The Binary Numbering System is the most fundamental numbering system in all digital and computer-based systems. a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically, “0” (zero) and “1” (one).

## Representation of a Binary Number

In the binary number system, the weight of each digit increases by a factor of 2. The first digit has a weight of 1 (20), the second digit has a weight of 2 (21), the third weight of 4 (22), the fourth weight of 8 (23), and so on.

Example: 10110011
• The place value of the last 1 (rightmost position) is 1.
• The place value of the 1 before that is 2.
• The place value of the 0 before that is 4.
• The place value of the 0 before that is 8.
• The place value of the 1 before that is 16.
• The place value of the 1 before that is 32.
• The place value of the 0 before that is 64.
• The place value of the 1 before that is 128.

Adding together all the place values that have 1s, it would be 1+2+16+32+128 = 179

Note: Do you know in the 2nd century BC the Indian scholar Pingala developed a binary system for describing prosody. He used binary numbers in the form of short and long syllables (the latter equal in length to two short syllables), making it similar to Morse code. They were known as laghu (light) and guru (heavy) syllables.

In the base-2 system, numbers represent using a series of bits (digit in the binary number system is called bit example 0 is a bit or 1 is a bit):

The benefits of using binary are that it is a base that is easily represented by electronic devices. The Binary Number System is used easily in coding, fewer computations, and less computational errors.

C# Source code to convert binary number to decimal