Decimal to Binary Converter
Table of Contents
- How does decimal to binary conversion work?
- Decimal to binary conversion formula
- Example #1
- Example #2
- Decimal to binary conversion table
How does decimal to binary conversion work?
Decimal to binary conversion is a mathematical process that allows a decimal number (base 10) to be represented in the binary system (base 2). The decimal system, which we use daily, consists of ten digits (0 to 9), while the binary system uses only two digits: 0 and 1. This conversion is essential in computing since computers process information in binary format.
Decimal to binary conversion formula
To convert a decimal number to binary, we use a method of successive divisions by 2. The formula, in this case, is based on recording the remainders of each division until reaching 0. The remainders, written in reverse order, form the equivalent binary number.
- Divide the decimal number by 2.
- Record the remainder of the division (it will be 0 or 1).
- Divide the quotient obtained by 2 again and repeat the process.
- Continue until the quotient is 0.
- Read the remainders from bottom to top to get the binary number.
Example #1
Conversion of 45 to binary:
- 45 ÷ 2 = 22, remainder = 1
- 22 ÷ 2 = 11, remainder = 0
- 11 ÷ 2 = 5, remainder = 1
- 5 ÷ 2 = 2, remainder = 1
- 2 ÷ 2 = 1, remainder = 0
- 1 ÷ 2 = 0, remainder = 1
Reading the remainders in reverse order, the binary number of 45 is 101101.
Example #2
Conversion of the number 29 to binary:
- 29 ÷ 2 = 14, remainder = 1
- 14 ÷ 2 = 7, remainder = 0
- 7 ÷ 2 = 3, remainder = 1
- 3 ÷ 2 = 1, remainder = 1
- 1 ÷ 2 = 0, remainder = 1
Reading the remainders in reverse order, we get the binary number: 11101. Therefore, 29 in binary is 11101.
Decimal to binary conversion table
Decimal | Binary |
---|---|
0 | 0 |
1 | 1 |
2 | 10 |
3 | 11 |
4 | 100 |
5 | 101 |
6 | 110 |
7 | 111 |
8 | 1000 |
9 | 1001 |
10 | 1010 |
15 | 1111 |
16 | 10000 |
20 | 10100 |
25 | 11001 |
30 | 11110 |
32 | 100000 |
50 | 110010 |
64 | 1000000 |
100 | 1100100 |
128 | 10000000 |
255 | 11111111 |
256 | 100000000 |