HomeBitwise Calculator

Bitwise Calculator

Online bitwise calculator with AND, OR, XOR, NOT, shifts and multi-base inputs, featuring 8/16/32-bit visualization for debugging and bitmask design

Operand Inputs

Bit Width

Select Operation

Calculation Results

Please enter operands
Decimal
-
Hex
-
Binary
-
Octal
-

Binary Visualization

Binary bits will appear after valid input

Bitwise Operations Guide

Bitwise operations act directly on binary digits and are useful for performance-sensitive logic, permissions, protocol parsing, and low-level data handling.

Common Bitwise Operations

AND (&)

Returns 1 only when both bits are 1. Commonly used for masking and bit checks.

OR (|)

Returns 1 when either bit is 1. Useful for setting specific flags.

XOR (^)

Returns 1 when bits are different. Useful for toggling bits and simple parity logic.

NOT (~)

Flips every bit. In JavaScript, bitwise operations use signed 32-bit integers.

Left Shift (<<)

Shifts bits left and fills the right side with 0. Often equals multiplying by powers of 2.

Right Shift (>>)

Shifts bits right and fills the left side with the sign bit. Often equals dividing by powers of 2.

Unsigned Right Shift (>>>)

Shifts bits right and always fills the left side with 0. Useful for unsigned integer workflows.

Base Conversion

Supports decimal, hex, binary, and octal input/output for fast debugging and comparison.

Operation Examples

ExpressionDescriptionSample Result
0b1100 & 0b1010AND operation0b1000 (8)
0b1100 | 0b1010OR operation0b1110 (14)
0b1100 ^ 0b1010XOR operation0b0110 (6)
~0b1100NOT operation...11110011 (-13)
0b1100 << 2Left shift by 20b110000 (48)
0b1100 >> 2Right shift by 20b11 (3)
-8 >>> 2Unsigned right shift by 21073741822

Typical Scenarios

Color Processing

Extract RGB channels and combine color values.

Permission Control

Represent, combine, and verify permissions with bitmasks.

Performance Tuning

Replace some multiply/divide operations with bit operations when appropriate.

Flag Management

Set, clear, and toggle flags efficiently.

Data is processed locally in your browser by default and will not be uploaded to any server. Upload will be clearly indicated if required.

© 2026 See-Tool. All rights reserved. | Contact Us