Assume we have a n-digits binary number:
dn-1 ... d3 d2 d1 d0
The decimal number is calculated as the sum of the binary digits (dn) multiplies their power of 2 (2n):
decimal number = d0×20 + d1×21 + d2×22 + ...
Example:
Calculate the decimal number of 11010:
110102 = 1â‹…24+1â‹…23+0â‹…22+1â‹…21+0â‹…20 = 2610
Below is the reference table for converting binary number to decimal, octal, hexadecimal, ranging from 010 to 1510:
Binary | Decimal | Octal | Hexadecimal |
---|---|---|---|
0000 | 0 | 0 | 0 |
0001 | 1 | 1 | 1 |
0010 | 2 | 2 | 2 |
0011 | 3 | 3 | 3 |
0100 | 4 | 4 | 4 |
0101 | 5 | 5 | 5 |
0110 | 6 | 6 | 6 |
0111 | 7 | 7 | 7 |
1000 | 8 | 10 | 8 |
1001 | 9 | 11 | 9 |
1010 | 10 | 12 | A |
1011 | 11 | 13 | B |
1100 | 12 | 14 | C |
1101 | 13 | 15 | D |
1110 | 14 | 16 | E |
1111 | 15 | 17 | F |