Binary to Decimal Formula
A decimal number is a most commonly used number in our everyday lives. The decimal number has a base of 10, and 0 to 9 digits are used to represent it. Some examples of decimal numbers are (14)10, (245)10, (1456)10, etc. Now, to convert a binary number “an-1….a3a2a1a0“, multiply every digit of the given binary number with the powers of 2.
If the binary number with n-digits is B = an-1….a3a2a1a0,
Now the decimal number is D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20).
Decimal Number |
Binary number |
Decimal Number |
Binary number |
---|---|---|---|
1 |
001 |
11 |
1011 |
2 |
010 |
12 |
1100 |
3 |
011 |
13 |
1101 |
4 |
100 |
14 |
1110 |
5 |
101 |
15 |
1111 |
6 |
110 |
16 |
10000 |
7 |
111 |
17 |
10001 |
8 |
1000 |
18 |
10010 |
9 |
1001 |
19 |
10011 |
10 |
1010 |
20 |
10100 |
Example: Convert the binary number (1101011)2 to decimal.
Solution:
Given binary number is (1101011)2.
(11001)2 = (1 × 26) + (1 × 25) + (0 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
= 64 + 32 + 0 + 8 + 0 + 2 + 1 = 107
Therefore, the binary number (1101011)2 is equal to the decimal number (107)10.
Binary Formula
Binary formulas are formulas that are used to convert binary numbers to other number systems. A binary number system is a system of numbers that has a base of 2 and uses only two digits, “0 and 1”. It is one of the four types of number systems and is most commonly employed by computer languages like Java and C++. “Bi” in the word “binary” stands for “two.” Some examples of binary numbers are (11)2, (1110)2, (10101)2, and so on.
In this article, we discuss the arithmetic operations of binary numbers and the conversion formulae to convert binary numbers into other three-number systems.
Table of Content
- Binary Formula
- Arithmetic Operation on Binary Numbers
- Binary to Decimal Formula
- Decimal to Binary Formula
- Binary to Octal Formula
- Binary to Hexadecimal Formula
Contact Us