Number base and bit calculator
See one number in binary, octal, decimal and hex at once, and try AND, OR, XOR, NOT and shifts on 8 to 64 bits, right in your browser.
The numbers you enter never leave this device.
How to use it
- 1
Type a number
Pick the base of the number you type (2, 8, 10, 16 or another from 2 to 36) and type it. The prefix that matches the chosen base (0x for 16, 0b for 2, 0o for 8) and underscores or spaces between digits are fine.
- 2
Choose the bit width and sign
Pick 8, 16, 32 or 64 bits, and Signed (two's complement) or Unsigned. A number that does not fit is not cut; the tool shows the allowed range instead.
- 3
Read it in every base
The same number appears in binary, octal, decimal and hex. Binary, octal and hex show the bits as stored, so -1 in 8 bits is 1111 1111 and FF.
- 4
Try a bit operation and copy
Pick AND, OR, XOR, NOT, or a shift, and read the result in every base. Bits shifted out on the left are dropped and marked. Press Copy on any row.