Binary Calculator
Perform bitwise AND, OR, XOR, NOT operations and left/right bit shifts with visu...Perform bitwise AND, OR, XOR, NOT operations and left/right bit shifts with visual bit-by-bit display. Supports 8-bit, 16-bit, and 32-bit modes.
1&0=0 1&1=1
1|0=1 1|1=1
1^0=1 1^1=0
Flips all bits
0011<<2=1100
1100>>2=0011
Calculator Features
Why Use Binary Calculator?
6 Bitwise Operations
AND (&), OR (|), XOR (^), NOT (~), Left Shift (<<), and Right Shift (>>) - all in one tool.
Visual Bit Display
Color-coded bit-by-bit view shows exactly how each operation transforms your binary values.
8/16/32-Bit Modes
Switch between 8-bit (byte), 16-bit (word), and 32-bit (dword) calculation modes.
Binary, Decimal, Hex Output
See results in all three formats simultaneously. One-click copy to clipboard.
Live Calculation
Results update instantly as you type. No submit button needed.
Keyboard Shortcuts
Power users can use 1-6 for operations, a/b for inputs, c to copy results.
Common Use Cases
Permission Flags
Use OR to add permissions, AND to check if a flag is set, XOR to toggle.
Color Manipulation
Extract RGB channels from hex colors using AND with masks like 0xFF.
Fast Math
Left shift to multiply by powers of 2, right shift to divide efficiently.
Cryptography
XOR is fundamental to many encryption and hashing algorithms.
How It Works
Select Bit Width
Choose 8-bit, 16-bit, or 32-bit mode for your calculation.
Enter Binary Values
Input your binary numbers using only 0s and 1s.
Choose Operation
Select AND, OR, XOR, NOT, or bit shift operations.
View Results
See the result in binary, decimal, and hex formats with visual bit display.
Tips & Techniques
Masking Technique
Use AND with a mask to extract specific bits. For example, AND with 0x0F gets the lower 4 bits.
XOR for Toggling
XOR with 1 toggles a bit: 0 XOR 1 = 1, 1 XOR 1 = 0. Great for flipping flags.
Signed vs Unsigned
Be careful with right shifts on negative numbers. Arithmetic shift preserves the sign bit.