Bitwise AND OR XOR Calculator
Enter two non-negative whole numbers to compute AND, OR and XOR.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
Bitwise AND, OR and XOR compare two numbers one binary digit at a time. AND returns 1 only where both numbers have a 1 in that position, OR returns 1 where either number has a 1, and XOR (exclusive or) returns 1 only where exactly one of the two numbers has a 1 — meaning matching bits cancel out to 0. Applying an operation to every bit position at once is what makes these ‘bitwise’ rather than the plain logical AND/OR used on whole true/false values.
Programmers use bitwise AND to mask off specific bits — such as checking a subnet mask against an IP address, or testing whether a particular flag is set in a bitfield — bitwise OR to combine flags together, and XOR for tasks like toggling bits, swapping two values without a temporary variable, simple stream ciphers, and detecting differences between two binary values, since XOR-ing something with itself always produces zero.
Enter two non-negative whole numbers and the calculator computes their AND, OR and XOR, with the XOR result also shown in binary so you can see exactly which bit positions differ.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)