Home · Everyday · Bases, Binary & Logic · Bitwise Calculator
Bitwise Calculator
Bitwise AND, OR, XOR and NOT on two integers — bit-by-bit logic with no carries.
What this calculator does
Bitwise AND, OR, XOR and NOT on two integers — bit-by-bit logic with no carries. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
Digits are validated against the chosen base — a binary field rejects the digit 2.
Conversion goes through the exact integer value, so results are exact for the sizes accepted.
Negative values keep their sign in every base.
Worked example
With the example inputs this page opens with (first integer 12, second integer 10), the result is 1000 — result of and (binary shown). Bitwise operators compare the two numbers bit by bit, position by position, with no carries — each output bit depends only on the two input bits in its column. NOT flips every bit of the first number (shown in 32-bit unsigned form).
Quick reference
| First integer | Result of AND (binary shown) |
|---|---|
| 6 | 10 |
| 9.6 | 1010 |
| 12 | 1000 |
| 15 | 1010 |
| 18 | 10 |
| 24 | 1000 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Bitwise Calculator work?
Bitwise AND, OR, XOR and NOT on two integers — bit-by-bit logic with no carries. A · b · Operation → Result. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Bitwise Calculator need?
A · b · Operation → Result. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Bitwise Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.