Online Bitwise Operations Calculator
Perform binary bitwise computations on integer values. Convert and evaluate AND, OR, XOR, NOT bitwise logic, and shifts across decimal, binary, and hexadecimal formats.
* Negative numbers are shown in two's complement representation
| Operation | Decimal | HEX | Binary | |
|---|---|---|---|---|
| A | 42 | 0x2A | 0010 1010 | |
| B | 25 | 0x19 | 0001 1001 | |
| AND — Bitwise AND (A & B) | 8 | 0x08 | 0000 1000 | |
| OR — Bitwise OR (A | B) | 59 | 0x3B | 0011 1011 | |
| XOR — Bitwise exclusive OR (A ^ B) | 51 | 0x33 | 0011 0011 | |
| NOT A — Bitwise inversion (~A) | -43 | 0xD5 | 1101 0101 | |
| NOT B — Bitwise inversion (~B) | -26 | 0xE6 | 1110 0110 | |
| Left Shift (A << N) | 168 | 0xA8 | 1010 1000 | |
| Sign-propagating Right Shift (A >> N) | 10 | 0x0A | 0000 1010 | |
| Zero-fill Right Shift (A >>> N) | 10 | 0x0A | 0000 1010 |
How to use
- Input integer operands in decimal, binary, or hexadecimal notation.
- Choose bitwise logic operator (AND, OR, XOR, NOT, shifts << >>).
- View multi-radix outputs in binary (BIN), decimal (DEC), and hex (HEX).
Bitwise Calculation Examples
For integers 12 (1100₂) and 10 (1010₂):
AND (12 & 10) = 8 (1000₂)
OR (12 | 10) = 14 (1110₂)
XOR (12 ^ 10) = 6 (0110₂)
NOT (~12) = depends on bit-depth (-13 in standard 32-bit two's complement).
Calculation Methodology
Bitwise logic applies Boolean operations individually to each paired bit position. AND outputs 1 if both bits are 1; OR outputs 1 if either bit is 1; XOR outputs 1 if bits differ.
Frequently Asked Questions
What are bitwise operations?
Operators that manipulate individual binary digits (bits) of computer data directly.
Where are AND, OR, and XOR applied?
In embedded systems, cryptographic hashing, bitmask manipulation, and hardware-level computing.
How do bitwise operators differ from logical operators?
Bitwise operators evaluate every bit across an integer word, whereas logical operators (&&, ||) yield a single Boolean true/false.
Why does the NOT operation produce negative numbers?
Because modern computers store signed integers using two's complement representation.
Related Tools
Compound Interest Calculator
Calculate monthly investment growth with compounding interest.
Cash Loan Calculator
Calculate monthly payment, total interest, and comparison between annuity and differentiated loans.
Mortgage Early Payoff
Evaluate interest saved and mortgage term reduction with extra principal payments.
Customs Clearance Calculator (EU & USA)
Calculates vehicle customs clearance taxes in Ukraine: import duty, excise tax, VAT, and US import delivery fees.