Number Base Calculator (Binary, Hex, Octal)
Convert between Decimal, Binary, Hexadecimal, and Octal systems. Includes bitwise arithmetic (AND, OR, XOR) and arbitrary-precision support for developers.
About
In systems programming and memory management, converting between numerical bases is a daily necessity. This tool provides immediate conversion between the four primary numbering systems used in computing: Decimal (Base 10), Binary (Base 2), Hexadecimal (Base 16), and Octal (Base 8). Unlike standard calculators that fail with integers exceeding 64 bits, this engine utilizes arbitrary-precision logic to handle inputs of any length, essential for cryptographic hashes or memory address mapping.
Beyond simple conversion, the tool supports bitwise arithmetic. Developers can perform logical AND, OR, XOR, and NOT operations directly in their preferred base. This functionality is critical when debugging bitmasks, setting permission flags, or analyzing raw data packets where binary alignment dictates functionality.
Formulas
Conversions rely on positional notation where a number N in base b is the sum of its digits d multiplied by their respective powers of the base.
For example, Hexadecimal AF to Decimal:
Reference Data
| Decimal (10) | Binary (2) | Hexadecimal (16) | Octal (8) |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
| 1024 | 10000000000 | 400 | 2000 |