Convert between binary, decimal, and hex, and perform simple binary operations (add, subtract, AND, OR, XOR).
Inputs explained: • Binary: base-2 numbers using only 0 and 1 (example: 101101). • Decimal: base-10 numbers (example: 45). • Hex: base-16 using 0–9 and A–F (example: 2D). The converter supports positive integers up to safe JavaScript range.
Choose the input base below. Spaces are ignored.
Binary
Decimal
Hex
Tip: For very large integers beyond JavaScript’s safe number range, you can upgrade this to use BigInt everywhere.
Binary Calculator — Description
The Binary Calculator helps you convert numbers between binary (base 2), decimal (base 10), and hex (base 16). It also supports basic binary operations such as addition, subtraction, AND, OR, and XOR. Enter a value, choose your input base, and the calculator will instantly display the equivalent representations in other bases.
This tool is useful for computer science students, programming practice, digital logic, networking, and working with bit-level values.