126 in binary = 1111110 (111 1110)
In other bases: hexadecimal 7E, octal 176. The binary number has 7 bits.
Divide by 2 repeatedly and note each remainder. Read the remainders from bottom to top.
| Division | Quotient | Remainder |
|---|---|---|
| 126 ÷ 2 | 63 | 0 |
| 63 ÷ 2 | 31 | 1 |
| 31 ÷ 2 | 15 | 1 |
| 15 ÷ 2 | 7 | 1 |
| 7 ÷ 2 | 3 | 1 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Remainders bottom to top: 1111110.
| Power of 2 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| Bit | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Add the powers of 2 where the bit is 1: 64 + 32 + 16 + 8 + 4 + 2 = 126.
Need another number or the reverse direction? Use the binary to decimal converter or the text to binary converter.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 122 | 1111010 | 7A | 172 |
| 123 | 1111011 | 7B | 173 |
| 124 | 1111100 | 7C | 174 |
| 125 | 1111101 | 7D | 175 |
| 127 | 1111111 | 7F | 177 |
| 128 | 10000000 | 80 | 200 |
| 129 | 10000001 | 81 | 201 |
| 130 | 10000010 | 82 | 202 |