Bitwise Tools
Run AND, OR, XOR, and NOT bitwise operations on hex values, with aligned binary output showing exactly which bits changed at a given width.
- Hex Bitwise CalculatorRun AND, OR, XOR, and NOT on hex values with aligned binary output.
- Hex AND CalculatorBitwise AND two hex values, bit by bit.
- Hex OR CalculatorBitwise OR two hex values, bit by bit.
- Hex XOR CalculatorBitwise XOR two hex values, bit by bit.
- Hex NOT CalculatorBitwise NOT (invert) a hex value at your chosen bit width
- Hex NAND CalculatorBitwise NAND (NOT AND) two hex values
- Hex NOR CalculatorBitwise NOR (NOT OR) two hex values
- Hex XNOR CalculatorBitwise XNOR (NOT XOR) two hex values
- Hex Shift CalculatorShift a hex value left or right by any amount, with logical and arithmetic right-shift modes.
- Hex Left Shift CalculatorShift a hex value left by any amount
- Hex Right Shift CalculatorShift a hex value right by any amount, in either logical or arithmetic mode.
- Hex Arithmetic Shift CalculatorArithmetic right-shift a hex value, preserving its sign bit
- Hex Logical Shift CalculatorLogically shift a hex value left or right, always filling vacated bits with 0
- Hex Rotate Left CalculatorRotate a hex value's bits left by any amount
- Hex Rotate Right CalculatorRotate a hex value's bits right by any amount
- Hex Bit Mask CalculatorBuild a hex bitmask covering a specific bit range
- Hex Bit Set CalculatorSet a specific bit of a hex value to 1 by its index
- Hex Bit Clear CalculatorClear a specific bit of a hex value to 0 by its index
- Hex Bit Toggle CalculatorFlip a specific bit of a hex value by its index
- Hex Bit Count CalculatorCount how many bits are set to 1 in a hex value (popcount) at your chosen bit width.
About Bitwise Tools
Bitwise operations work on the individual bits of a value rather than its numeric value as a whole. This category runs AND, OR, XOR, and NOT on hex values at an explicit bit width, with aligned binary output so you can see exactly which bits changed.
Further reading: Bitwise operation — Wikipedia
Frequently Asked Questions
Why does bit width matter for bitwise operations?
A bitwise NOT on 0xF at 4-bit width gives 0x0, but the same NOT at 8-bit width gives 0xF0 — the result depends entirely on how many bits are involved.
What's XOR commonly used for?
Toggling specific bits, simple checksums, and swapping values without a temporary variable — it's one of the most widely used bitwise operations in low-level programming.