Type a number in decimal, hex (0x), binary (0b) or octal (0o) and see it in all four, with the bits it needs and its two’s complement for 8, 16, 32 and 64 bits. Any size works.
| Decimal | Hex | Binary | Octal |
|---|---|---|---|
10 | 0xA | 1010 | 12 |
255 | 0xFF | 11111111 | 377 |
1024 | 0x400 | 10000000000 | 2000 |
65535 | 0xFFFF | 1111111111111111 | 177777 |
Computers store negative numbers as two’s complement: -1 in 8 bits is 1111 1111. Type a negative number to see its two’s complement at each width.
As big as you like: it uses JavaScript’s BigInt, so it’s exact well past 64 bits.
Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.