Free online tools to generate, calculate,
convert, format, encode, and play.
 

Bitwise Operation Calculator

Perform bitwise operations on integers. Enter values in decimal, hexadecimal, octal, or binary and view results across all bases with bit-level visualization.


Bit Width
Operation
Input Base
Operand A
Enter a decimal integer (0 – 255)
Operand B
Enter a decimal integer (0 – 255)
The result updates as you type.

How It Works

Bitwise operations act on individual bits of integer values. They are fundamental to low-level programming, networking, cryptography, and hardware design.

Operation Symbol Description Example (8-bit)
AND&1 only when both bits are 110101010 & 01010101 = 00000000
OR|1 when either bit is 110100000 | 00001010 = 10101010
XOR^1 when bits differ11110000 ^ 00001111 = 11111111
NOT~Inverts every bit~10101010 = 01010101
Left Shift<<Shifts bits left, fills with 000000011 << 2 = 00001100
Right Shift>>Shifts bits right, fills with 011000000 >> 3 = 00011000

Common Uses

  • Masking — use AND to extract specific bits (e.g., value & 0x0F gets the low nibble)
  • Setting bits — use OR to set bits without affecting others (e.g., flags | 0x04)
  • Toggling bits — use XOR to flip specific bits (e.g., value ^ mask)
  • Clearing bits — use AND with inverted mask (e.g., flags & ~0x04)
  • Multiplication/division by powers of 2 — left/right shift (e.g., x << 3 is x × 8)

Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with