Advertisement
BIN
OCT
DEC
HEX

Supports integers up to 2⁵³ (JavaScript safe integer limit).

Advertisement

Frequently Asked Questions

What is number base conversion?

Number base conversion is the process of representing the same integer value in different positional numeral systems. Decimal (base 10) uses digits 0–9 and is the system humans use daily. Binary (base 2) uses only 0 and 1, and is the native language of computers — every piece of data is ultimately stored as binary. Octal (base 8) uses digits 0–7 and was historically used as a compact notation for binary. Hexadecimal (base 16) uses 0–9 and A–F and is ubiquitous in computing for color codes, memory addresses, and binary file editing.

What are common uses for hexadecimal and binary?

Hexadecimal is widely used in web development (CSS color codes like #FF5733), low-level programming (memory addresses, CPU registers, bitmasks), and file inspection (hex editors). Binary is used directly in digital logic design, networking (IP subnet masks), and understanding CPU instruction sets. Octal appears in Unix/Linux file permission modes (e.g., chmod 755) and was common in early minicomputer architectures.

What are the limitations of JavaScript integer precision?

JavaScript represents all numbers as 64-bit IEEE 754 floating-point values. The largest integer that can be represented exactly is 2⁵³ − 1 (Number.MAX_SAFE_INTEGER = 9,007,199,254,740,991). Beyond this limit, consecutive integers can no longer be distinguished from each other, which means conversions may produce incorrect results. For working with very large integers beyond this limit, BigInt or a dedicated arbitrary-precision library is required.