Bitwise Calculator
Perform bitwise AND, OR, XOR, NOT, and shift operations.Runs in this tab.⌘ ↵ runs it
15
F
1111
Next step
AtriumKitFrom the team behind browserutils
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout Bitwise Calculator
Free online bitwise calculator. Perform AND, OR, XOR, NOT, left shift, and right shift operations and see results in decimal, hexadecimal, and binary. It runs in your browser. Nothing is sent to a server.
Questions
What is a bitwise AND operation?
Bitwise AND compares each bit of two numbers and returns 1 only when both bits are 1. For example, 12 AND 10 = 8 because 1100 AND 1010 = 1000.
What is the difference between logical and bitwise shift?
A logical right shift fills the leftmost bits with zeros, while an arithmetic right shift preserves the sign bit. Left shifts always fill with zeros.
When would I use bitwise XOR in practice?
XOR is used for toggling bits in flag registers, simple checksums, swapping two variables without a temporary (a ^= b; b ^= a; a ^= b), and basic encryption/obfuscation of data.
How do I use the bitwise calculator to set or clear a specific bit?
To set bit N, OR the number with (1 << N). To clear bit N, AND the number with the NOT of (1 << N). Enter both values into this tool to see the result in decimal, hex, and binary.
Is my data sent to a server when using this bitwise calculator?
No. All bitwise operations are computed in your browser using JavaScript. Nothing you enter leaves your machine.
Comments
More in Math & Calculators
- Percentage Calculator
- Aspect Ratio Calculator
- Scientific Calculator
- Hex Calculator
- Binary Calculator
- Matrix Calculator
- GCD & LCM Calculator
- Prime Number Checker
Comments