⚙️ Bitwise Calculator
AND - OR - XOR - NOT - Shift - with bit visualisation
bin: 00101010 - hex: 0x002A
bin: 00011011 - hex: 0x001B
AND
10
0x000A
OR
59
0x003B
XOR
49
0x0031
NOT A
4294967253
0xFFFFFFD5
NOT B
4294967268
0xFFFFFFE4
A << 2
168
0x00A8
A >> 2
10
0x000A
A >>> 2
10
0x000A
📊 Key Data Points
Bitmask flags
Bitwise operations are fundamental to permission systems, network protocols, and hardware interfaces
Signed vs unsigned
JavaScript NOT (~) treats numbers as signed 32-bit integers: ~0 = -1 (all bits set)
Integer width
The bit width affects NOT complement and shift overflow behavior
Bitwise Calculator — AND OR XOR NOT Operations -- Complete USA Guide 2026
Bitwise operations are fundamental to low-level programming, network protocols, and permission systems. Bitmask flag checking, subnet mask calculation, and bitwise swap algorithms all require AND, OR, XOR, and NOT operations that are difficult to reason about without seeing the binary representation.
This calculator performs all bitwise operations and shows inputs/output in all number bases simultaneously. Runs in your browser.
**Long-tail searches answered here:** bitwise calculator online free, AND OR XOR NOT bit operations browser, binary bitwise operations calculator no install.
For related operations, pair with Base Converter.
🔬 How This Calculator Works
Performs bitwise AND (&), OR (|), XOR (^), NOT (~), left shift (<<), right shift (>>), and unsigned right shift (>>>) operations. Shows inputs and output in binary, decimal, hexadecimal, and octal simultaneously. Supports 8-bit, 16-bit, 32-bit, and 64-bit integer widths.
✅ What You Can Calculate
All bitwise operations
AND, OR, XOR, NOT, left shift, right shift, and unsigned right shift — all the bitwise operations you need for bitmask work and low-level protocols.
Multi-base display
Shows inputs and output in binary, decimal, hexadecimal, and octal simultaneously — see the operation in the most appropriate format for your context.
Integer width selection
Supports 8-bit, 16-bit, 32-bit, and 64-bit integer widths. The bit width affects NOT (ones complement) and signed vs unsigned shift behavior.
Step-by-step binary display
Shows the operation as a binary alignment — each bit column aligned for visual verification of AND, OR, and XOR operations.
🎯 Real Scenarios & Use Cases
Bitmask flag operations
flags & FEATURE_FLAG !== 0 checks if a bit is set. flags | NEW_FLAG sets a bit. flags & ~REMOVE_FLAG clears a bit. Verify your bitmask operations here before putting them in code.
Subnet mask calculation
IP subnet calculation is bitwise: IP & MASK = network address. Verify the subnet arithmetic here alongside CIDR Calculator.
Permission flag systems
Many systems encode permissions as bit flags (read=4, write=2, execute=1). Verify flag combinations here before implementing.
XOR swap algorithm
a ^= b; b ^= a; a ^= b swaps two integers without a temporary variable using XOR. The calculator shows the intermediate values.
💡 Pro Tips for Accurate Results
Bitmask flag patterns. flags & FEATURE_FLAG !== 0 checks if a bit is set. flags | NEW_FLAG sets a bit. flags & ~REMOVE_FLAG clears a bit. Verify your bitmask operations here before putting them in code.
Signed vs unsigned. JavaScript NOT (~) treats numbers as signed 32-bit integers: ~0 = -1 (all bits set). Unsigned right shift (>>>) treats as unsigned. Watch the sign when interpreting results.
Subnet mask as AND. IP subnet calculation is bitwise: IP & MASK = network address. The CIDR Calculator uses this — verify subnet arithmetic here.
XOR for value swapping. a ^= b; b ^= a; a ^= b swaps two integers without a temporary variable using XOR. The calculator shows the intermediate values.
🔗 Use These Together
🏁 Bottom Line
Bitwise operations are fundamental to low-level programming, network protocols, and permission systems. Seeing the binary representation alongside decimal and hex makes the operations concrete. For related operations: Base Converter and chmod Calculator.
Does this tool send my data to a server?
No — all processing happens entirely in your browser using JavaScript on your device. Nothing is transmitted to any server. Your data is cleared when you close the tab.
What is the most common mistake when using this tool?
The most frequent issue is incorrect input format — this tool follows the standard specification for its data type. If you get unexpected results, verify your input is well-formed and matches the expected format shown in the placeholder.
Does this work on mobile devices?
Yes — this tool is fully responsive and works on modern mobile browsers including Safari on iOS and Chrome on Android. For tools involving large text input, a desktop browser provides a better experience.
Can I use the output in production?
Yes — the output follows standard specifications and conventions. Always test in your specific context before deploying to production, especially for security-sensitive tools.
Is there a file size or input length limit?
No hard limit is imposed. Processing happens in your browser using your device memory. Very large inputs may slow performance on lower-powered devices.
What browsers are supported?
All modern browsers: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+. No extensions, plugins, or installs required.
What other tools complement this one?
The JSON Formatter, Diff Checker, and Regex Tester are frequently used alongside this tool for complete development workflows. All are in the Dev Tools section.