30 in binary = 11110 (1 1110)
In other bases: hexadecimal 1E, octal 36. The binary number has 5 bits.
Divide by 2 repeatedly and note each remainder. Read the remainders from bottom to top.
| Division | Quotient | Remainder |
|---|---|---|
| 30 ÷ 2 | 15 | 0 |
| 15 ÷ 2 | 7 | 1 |
| 7 ÷ 2 | 3 | 1 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Remainders bottom to top: 11110.
| Power of 2 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|
| Bit | 1 | 1 | 1 | 1 | 0 |
Add the powers of 2 where the bit is 1: 16 + 8 + 4 + 2 = 30.
Need another number or the reverse direction? Use the binary to decimal converter or the text to binary converter.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 26 | 11010 | 1A | 32 |
| 27 | 11011 | 1B | 33 |
| 28 | 11100 | 1C | 34 |
| 29 | 11101 | 1D | 35 |
| 31 | 11111 | 1F | 37 |
| 32 | 100000 | 20 | 40 |
| 33 | 100001 | 21 | 41 |
| 34 | 100010 | 22 | 42 |