Number Base & Bitwise Converter
Convert between Binary, Octal, Decimal, Hexadecimal, and ASCII text. Compute bitwise AND, OR, XOR, NOT operations.
Bitwise Operations Calculator
How do I use Number Base & Bitwise Converter?
Select your input radix (Decimal Base 10, Hex Base 16, Binary Base 2, Octal Base 8, or ASCII Text) or click 'Load Sample Data'.
Type or paste your number (including 64-bit/128-bit integers) to view synchronized conversions across all bases.
Use the Bitwise Operations Calculator below to evaluate `AND`, `OR`, `XOR`, `NOT`, `<<`, and `>>` with `BigInt` precision.
What features does Number Base & Bitwise Converter offer?
Bidirectional Binary, Octal, Decimal, Hexadecimal, and ASCII text conversion
BigInt arbitrary-precision arithmetic (no integer overflow)
Bitwise calculator (AND, OR, XOR, NOT, Bit Shift)
100% client-side local browser execution
Arbitrary-Precision `BigInt` Radix Conversion & Bitwise Truth Tables
Standard JavaScript `Number` bitwise operators (`&`, `|`, `^`, `~`, `<<`) truncate operands to 32-bit signed integers. Our engine uses native ECMAScript `BigInt` so 64-bit, 128-bit, and 256-bit integers convert with zero precision loss.
| Base / Bitwise Op | Radix / Symbol | Literal Prefix | Example (Decimal 255 / Bitwise) |
|---|---|---|---|
| Binary (Base 2) | Digits 0–1 | 0b | 11111111 (8 bits) |
| Octal (Base 8) | Digits 0–7 | 0o | 377 (Unix chmod permissions) |
| Hexadecimal (Base 16) | 0–9, A–F | 0x | FF (Memory addresses, RGB colors) |
| Bitwise AND / XOR | A & B / A ^ B | BigInt(&, ^) | 12 (1100) ^ 10 (1010) = 6 (0110) |
Frequently Asked Questions about Number Base & Bitwise Converter
Why do standard JavaScript bitwise operators break on numbers larger than `2,147,483,647`?
In JavaScript, applying `&`, `|`, `^`, or `<<` to a standard `Number` coerces the 64-bit float into a 32-bit signed two's-complement integer (`ToInt32`), discarding all bits above bit 31. JoyTools uses `BigInt` arithmetic to support arbitrary-bit-width integers.
Why does `BigInt` bitwise `NOT` (`~12n`) equal `-13n`?
ECMAScript `BigInt` represents integers in infinite-precision two's complement, where the bitwise complement identity is always `~x === -(x + 1n)`. Thus `~12n` evaluates to `-13n`.
How does each Hexadecimal digit map to Binary bits?
Because $16 = 2^4$, every single hexadecimal digit (`0`–`F`) maps to an exact 4-bit binary nibble (`0x0 = 0000` through `0xF = 1111`), and two hex digits (`0x00`–`0xFF`) represent exactly 1 byte (8 bits).
How does ASCII Text mode convert strings into numbers?
ASCII mode converts each character's byte code (`charCodeAt`) into its packed hexadecimal, binary, octal, and decimal integer representation so you can inspect raw wire-protocol strings.
Explore Related Developer Tools
IPv4 CIDR Calculator
Calculate network address, broadcast address, subnet mask, wildcard mask, and usable host range from CIDR notation.
Universal Unit Converter
Convert Length, Mass, Temperature, Digital Data Storage (Bytes to Terabytes), and Speed units online.
Smart String Escaper & Unescaper (JSON, HTML, JS, SQL, Unicode)
Bidirectional escaping and unescaping tool for JSON, HTML Entities, JavaScript, SQL strings, and Unicode characters.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to text. Supports Unicode UTF-8 and URL-Safe modes.
URL Encoder / Decoder
Encode and decode URL strings with encodeURIComponent, encodeURI, and Base64URL modes.
Color Converter
Convert colors between HEX, RGB, and HSL formats with visual picker and quick presets.