Base Converter & Bitwise

Bin/oct/dec/hex conversion with prefix detection, plus a 32-bit bitwise calculator and bit view.

Protocol docs say 0x1F, flag debugging needs 0xFF00 & 0x0F0F, source code hides (flags >> 3) & 1 — base conversion and bitwise math are unavoidable in embedded work, protocol parsing and permission systems, and they are exactly where mental arithmetic fails. This tool converts between binary, octal, decimal and hex (0x/0b/0o prefixes auto-detected) and shows all four representations at once.

The built-in 32-bit bitwise calculator evaluates AND/OR/XOR/NOT and both shifts, printing each result in decimal and hex; the bit view lays all 32 bits out as clickable cells — flip one and watch the decimal value move. It is the most direct way to understand flag registers.

Signed vs unsigned: one bit pattern, two values

32 ones (0xFFFFFFFF) reads as 4294967295 unsigned and -1 signed — two's complement gives the same bits two interpretations. Both readings are printed under the bit view; when a flag computation "comes out negative", check which convention you meant.

Shifts and overflow

JavaScript bitwise operations are fixed at 32 bits: left shifts drop high bits, right shifts keep the sign (>> is arithmetic). This tool computes with the same semantics as C/Java int; for 64-bit values, work in hex segments.

Frequently asked questions

Are decimals supported?
No. Conversion and bitwise math operate on integers (BigInt and 32-bit ints); IEEE 754 float encoding is a different topic that would only confuse the picture.
Is 64-bit supported?
Base conversion uses BigInt, so 64-bit integers display correctly; the bitwise calculator and bit view stay at 32 bits, the standard convention for such tools.
What is the bit view for?
Toggling any single bit and watching the decimal/hex value follow — hand-assembling flag masks (like permission codes 1|2|8) becomes point-and-click instead of mental arithmetic.

Related tools