ToolHub
๐Ÿ”Œ

Bitwise Calculator

AND, OR, XOR, NOT and shifts with bit views.

A AND B
dec15hex0xFbin1111oct0o17
A OR B
dec255hex0xFFbin1111 1111oct0o377
A XOR B
dec240hex0xF0bin1111 0000oct0o360
NOT A
dec4294967040hex0xFFFFFF00bin1111 1111 1111 1111 1111 1111 0000 0000oct0o37777777400
NOT B
dec4294967280hex0xFFFFFFF0bin1111 1111 1111 1111 1111 1111 1111 0000oct0o37777777760
A << 2
dec1020hex0x3FCbin11 1111 1100oct0o1774
A >> 2
dec63hex0x3Fbin11 1111oct0o77

NOT and shifts are masked to 32 bits. Enter values in the base you picked (digits are validated).

About the Bitwise Calculator

Compute AND, OR, XOR, NOT and left or right shifts on two values entered in hexadecimal, decimal, binary or octal. Every result is displayed in all four bases at once with grouped binary digits, and BigInt math means values beyond the 32-bit range still parse correctly. Digits are validated per base with clear errors.

How to use the Bitwise Calculator

  1. Enter values A and B in the input base you pick โ€” hexadecimal by default.
  2. Choose the Input base: hexadecimal, decimal, binary or octal.
  3. Set the Shift amount used for the A << n and A >> n rows.
  4. Read each result row in decimal, hex, binary and octal simultaneously.

Bitwise Calculator FAQ

Why are NOT and shifts shown as 32-bit results?

NOT is infinite-width by definition, so the result is masked to 32 bits to give a stable, conventional answer; A >> n shifts arithmetic-style for negative values.

Can I mix bases between A and B?

No โ€” both values are read in the single base chosen in the Input base dropdown, so convert one operand first if it uses another base.

What does the error about invalid digits mean?

Each input is validated character by character against the selected base, so a G in hexadecimal input is rejected before any operation runs.