跳转到正文
&|

位运算计算器

AND / OR / XOR / NOT / 移位,并可视化二进制。

DEC
8
HEX
0x08
BIN
0000 1000
A
00001100
B
00001010
Result
00001000

8-bit · unsigned · &

关于位运算计算器

Bitwise ops are everyday work for masks, flags, protocol fields, and embedded code. Bit width and signed vs unsigned change how the same pattern reads in decimal. toco.tools’s Bitwise Calculator supports AND, OR, XOR, NOT, left shift, logical right shift, and arithmetic right shift. Choose 8/16/32/64-bit width and unsigned or signed (two’s complement), then inspect decimal, hex, binary, and a bit grid. Inputs accept decimal, 0x, 0b, and 0o. Math uses BigInt so 64-bit values stay exact. Everything runs locally—nothing is sent to a server.

使用方法

  1. Pick bit width and signed/unsigned
  2. Choose an op (AND/OR/XOR/NOT/shift)
  3. Enter values and read bin/hex/dec

常见问题

Logical vs arithmetic right shift?

Logical (>>>) fills vacated high bits with 0. Arithmetic (>>) copies the sign bit, so negative values stay negative.

What does signed mode change?

The bit pattern is unchanged. Decimal display uses two’s complement, so an MSB of 1 means a negative value.

Is my input sent externally?

No. All computation runs in your browser.