toolbin_

Binary calculator for bitwise operations online

Perform bitwise operations (AND, OR, XOR, NOT, shifts) on two numbers, in your browser.

Decimal : 8
Hex : 0x8
Binary : 0b1000

32-bit integer operations (JavaScript). Accepts 0x (hex) and 0b (binary) prefixes.

🔒 100% client-side — no data sent

Perform bitwise operations (AND, OR, XOR, NOT, shifts) on two numbers and see the result in binary, decimal and hexadecimal. Perfect for understanding bit masks and low-level logic. Calculations stay 100% in your browser, with no data sent.

What is it for?

  • Test a bit mask with the AND operator
  • Combine flags with the OR operator
  • Check the result of a left or right bit shift
  • Understand XOR behavior for a simple encryption algorithm

FAQ

What is the bitwise AND operation used for?

AND keeps a bit set to 1 only if both compared bits are 1. It is widely used to apply a mask and isolate specific bits of a value.

What is the difference between arithmetic and logical shift?

A logical shift always inserts zeros, whereas an arithmetic right shift keeps the sign bit to preserve negative numbers.

How does XOR work on two numbers?

XOR sets a bit to 1 only when the two compared bits differ. Applying the same XOR twice returns the original value.