Bitwise Calculator
Apply AND, OR, XOR, NOT and shifts, and see every representation.
Loading tool…
About this tool
Applies AND, OR, XOR, NOT and shifts, showing the result in decimal, hex and binary. Both the signed 32-bit and unsigned readings are given, because JavaScript's bitwise operators coerce to signed 32-bit integers and the difference surprises people.
Limitations
- JavaScript's bitwise operators coerce to signed 32-bit integers. A 32-bit and a 64-bit view are both shown so the difference is visible.
Questions
- Why are the signed and unsigned results different?
- JavaScript's operators work on signed 32-bit integers, so results with the top bit set read as negative. The unsigned row shows the same bits interpreted without a sign, and the 64-bit row uses BigInt and does not truncate.
- What does a left shift do to large numbers?
- In 32-bit arithmetic, bits shifted past the top are discarded — so shifting far enough yields zero, or flips the sign.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.