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