127 in Binary
Decimal 127 equals 1111111 in binary.
Why this number matters: 127 is the largest positive value of a signed 8-bit integer (int8) and the loopback IP octet (127.0.0.1).
127 in all number bases
Decimal127
Hexadecimal0x7F
Binary0111 1111
Octal177
Try another value
Edit this value or switch its base. Your changes are calculated in your browser with exact integer arithmetic.
Input base:
Decimal
127Hex
0x7FBinary
0b1111111Octal
0o177How 127 converts from decimal to binary
Divide by 2 repeatedly and keep each remainder, then read the remainders from bottom to top:
127÷ 2 =63remainder1
63÷ 2 =31remainder1
31÷ 2 =15remainder1
15÷ 2 =7remainder1
7÷ 2 =3remainder1
3÷ 2 =1remainder1
1÷ 2 =0remainder1
Result (remainders bottom to top): 1111111
This tool runs entirely in your browser - nothing you enter is uploaded or stored.