Hex Calculator

๐Ÿค– Agent Ready

Hexadecimal arithmetic and bitwise operations. Input hex values โ†’ result in hex, decimal, and binary.

0x
0x

Quick Reference

0xFF = 255 = 11111111โ‚‚
0x0F & 0xFF = 0x0F
0x0F | 0xF0 = 0xFF
0xFF ^ 0x0F = 0xF0
NOT(0x00) = 0xFFFFFFFF
0x01 << 4 = 0x10

Field guide ยท verified August 2026

Hex arithmetic without the ambiguous parts

This calculator uses arbitrary-precision integers for binary arithmetic. Negative output is displayed as a 64-bit two's-complement value; NOT, NEG, and byte reversal intentionally operate on 32 bits. Those width rules matter when you are debugging masks, registers, colors, binary protocols, or file headers.

Extract a byte

0xA1B2C3D4 AND 0xFF โ†’ 0xD4

AND with FF keeps the lowest eight bits and clears every higher bit.

Build a bit flag

0x01 SHL 0x08 โ†’ 0x0100

A left shift by eight moves the set bit into the ninth bit position.

Reverse byte order

REV(0x12345678) โ†’ 0x78563412

Useful when comparing 32-bit values across big-endian and little-endian representations.

Behavior and limitations

  • Inputs may include an optional 0x prefix; spaces are ignored.
  • Division is integer division, so any fractional remainder is discarded.
  • Shift counts are entered in hexadecimal too: 0x10 means sixteen bit positions.
  • The calculator does not infer a CPU's signedness, overflow rules, or register width.