Base Converter & Programmer Calculator

Convert binary, octal, decimal and hexadecimal values and perform width-aware bitwise operations using browser BigInt arithmetic.

All arithmetic runs locally with JavaScript BigInt to avoid ordinary Number precision loss. Inputs are limited to 4,096 digits; operations use an explicit 8–128 bit width.

Converted value

Bitwise operation

Why BigInt matters for programmer calculations

JavaScript's ordinary Number type cannot represent every integer above 253 exactly, and its built-in number bitwise operators historically coerce values to 32-bit integers. This calculator uses BigInt and an explicit bit mask, so 64-bit and 128-bit patterns are handled without that precision loss.

Prefixes and signed values

0b, 0o and 0x prefixes are accepted only when they match the selected base. This prevents a hexadecimal value such as 0beef from being damaged by blindly removing a binary-looking prefix. Signed mode uses two's-complement interpretation at the selected width; out-of-range values are rejected instead of silently wrapping input.

Bitwise rules

AND, OR, XOR, NOT and shifts are masked to the selected width. Right shift is logical on the width-limited unsigned bit pattern. Shift counts are decimal and limited to 0–4,096. The tool never sends your numeric input to the server.