Binary Base to Integers Converter
Convert binary, octal, or hexadecimal numbers to decimal integers instantly. Batch conversion with validation, copy support, and multiple output formats.
| # | Input | Decimal | Status |
|---|
About
Incorrect base conversion produces silent data corruption. A single misread bit in a 32-bit address shifts the result by orders of magnitude. This tool converts numbers from binary (base-2), octal (base-8), or hexadecimal (base-16) into standard decimal integers using the positional notation expansion dn × rn. It handles batch input, validates each token against the legal digit set for the chosen radix, and flags overflow beyond 253 − 1 (JavaScript's safe integer ceiling). Negative values are accepted via sign prefix.
Limitation: this tool operates within IEEE 754 double-precision bounds. Values exceeding 9,007,199,254,740,991 lose precision. For cryptographic-scale integers, use arbitrary-precision libraries. The converter assumes unsigned interpretation unless a leading minus sign is present. It does not perform two's complement inference automatically - if you need signed 8-bit or 16-bit interpretation, convert the unsigned result manually.
Formulas
Positional notation defines the decimal value of a number in any base. Each digit is multiplied by the radix raised to the power of its position index, counted from zero at the rightmost digit.
Where N = resulting decimal integer, di = digit at position i, r = radix (base), and n = total number of digits.
For binary 11010110: 1×27 + 1×26 + 0×25 + 1×24 + 0×23 + 1×22 + 1×21 + 0×20 = 214.
The safe integer boundary in JavaScript is 253 − 1 = 9,007,199,254,740,991. Any input whose decimal result exceeds this value is flagged as potentially imprecise.
Reference Data
| Base | Name | Digits | Example | Decimal Value | Common Use |
|---|---|---|---|---|---|
| 2 | Binary | 0, 1 | 11010110 | 214 | CPU registers, bit flags |
| 8 | Octal | 0 - 7 | 326 | 214 | Unix file permissions |
| 16 | Hexadecimal | 0 - 9, A - F | D6 | 214 | Memory addresses, colors |
| 2 | Binary | 0, 1 | 11111111 | 255 | Max unsigned 8-bit byte |
| 16 | Hexadecimal | 0 - F | FF | 255 | CSS color channel max |
| 2 | Binary | 0, 1 | 10000000 | 128 | Sign bit in signed byte |
| 8 | Octal | 0 - 7 | 777 | 511 | chmod full permissions |
| 16 | Hexadecimal | 0 - F | FFFF | 65535 | Max unsigned 16-bit |
| 2 | Binary | 0, 1 | 1 | 1 | Boolean true |
| 2 | Binary | 0, 1 | 0 | 0 | Boolean false / null byte |
| 16 | Hexadecimal | 0 - F | 7FFFFFFF | 2,147,483,647 | Max signed 32-bit integer |
| 16 | Hexadecimal | 0 - F | FFFFFFFF | 4,294,967,295 | Max unsigned 32-bit |
| 8 | Octal | 0 - 7 | 644 | 420 | Default file permission |
| 16 | Hexadecimal | 0 - F | A | 10 | Newline char (LF) |
| 16 | Hexadecimal | 0 - F | 41 | 65 | ASCII uppercase "A" |
| 2 | Binary | 0, 1 | 1111111111111111111111111111111111111111111111111111 | 4,503,599,627,370,495 | 52-bit mantissa max |