🎓 Computer Science • Programming
100% Client-Side Privacy
Bitwise Calculator (AND, OR, XOR, Shifts)
Calculates bitwise operations with aligned 8-bit binary registers, bit masks, and arithmetic shifts.
Bitwise Logic Operators & Shifts
A (42)0010 1010
B (15)0000 1111
Result (A & B)
0000 1010
Dec: 10 | Hex: 0x0AWhat are Bitwise Operations?
Bitwise operations operate directly at the individual bit level of integers, executing fast low-level hardware manipulations.
Formula & Step-by-Step Calculation
x << n = x × 2^n, x >> n = ⌊x / 2^n⌋
Binary bit shifting equivalent to powers-of-two multiplication and division.
Worked Step-by-Step Examples
Example 1
Bitwise AND of 42 (00101010) and 15 (00001111)
Solution: 10 (00001010₂)
• 00101010 & 00001111 = 00001010 (Decimal 10)
Common Real-World & Academic Use Cases
- ✓ Bit flags and permission masks in systems programming
- ✓ Cryptography stream ciphers and hash functions
- ✓ Graphics color channel packing (ARGB 32-bit packing)
How to Use the Bitwise Calculator (AND, OR, XOR, Shifts)
1
Enter Operands
Input decimal numbers.
2
Select Bitwise Operator
Choose AND, OR, XOR, NOT, <<, or >>.
3
Inspect Bit Breakdown
Review the aligned 8-bit visual registers.
Frequently Asked Questions
Q: What is the difference between >> and >>> in JavaScript/Java?
>> is sign-preserving arithmetic shift right; >>> is zero-fill unsigned logical shift right.