← grid/G · SYSTEMS & INFRA/Bitwise Calculatorlive · localpick another

Bitwise Calculator

Visual calculator for bit masking, shifting, and endianness swapping

Bit Width & Operation
Bit Visualization
A0x2A | 42
0
0
1
0
1
0
1
0
4
0
B0x0F | 15
0
0
0
0
1
1
1
1
4
0
Result(AND)
Result0x0A | 10
0
0
0
0
1
0
1
0
4
0
Result Representations
Decimal10
Hexadecimal0x0A
Binary0000 1010
Octal0o12
Common Patterns
Check bit nval & (1 << n)
Set bit nval | (1 << n)
Clear bit nval & ~(1 << n)
Toggle bit nval ^ (1 << n)
Check if power of 2val & (val - 1) == 0
Lower nibbleval & 0x0F
Upper nibble (8-bit)(val >> 4) & 0x0F
Align to 4 bytes(val + 3) & ~3
DWG · G-BITWISE-CALCULATOR100% client-side·⌘C copy · ESC → grid