💻 Computer Science & Programming
Debug memory dumps, parse hex color codes (#FF5733), analyze bitflags, and understand pointer addresses. All languages use the same bases.
Choose any two bases from 2–36. Digits above 9 use letters: A=10, B=11, ..., Z=35. Case-insensitive input.
Encode text to binary, octal, decimal, hex bytes (UTF-8 / ASCII) or decode numeric byte strings back to text.
Perform AND, OR, XOR, shifts, NOT on two integers. Input accepts 0b (bin), 0o (oct), 0x (hex), or plain decimal prefixes.
0b1010 = binary |
0o755 = octal |
0xFF = hex |
1234 = decimal
| Decimal (10) | Binary (2) | Octal (8) | Hex (16) | Powers of 2 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 2⁰ = 1 |
| 1 | 1 | 1 | 1 | 2¹ = 2 |
| 2 | 10 | 2 | 2 | 2² = 4 |
| 3 | 11 | 3 | 3 | 2³ = 8 |
| 4 | 100 | 4 | 4 | 2⁴ = 16 |
| 5 | 101 | 5 | 5 | 2⁵ = 32 |
| 6 | 110 | 6 | 6 | 2⁶ = 64 |
| 7 | 111 | 7 | 7 | 2⁷ = 128 |
| 8 | 1000 | 10 | 8 | 2⁸ = 256 |
| 9 | 1001 | 11 | 9 | 2⁹ = 512 |
| 10 | 1010 | 12 | A | 2¹⁰ = 1024 (1K) |
| 11 | 1011 | 13 | B | 2¹¹ = 2048 |
| 12 | 1100 | 14 | C | 2¹² = 4096 (4K) |
| 13 | 1101 | 15 | D | 2¹³ = 8192 |
| 14 | 1110 | 16 | E | 2¹⁴ = 16384 |
| 15 | 1111 | 17 | F | 2¹⁵ = 32768 |
| 16 | 10000 | 20 | 10 | 2¹⁶ = 65536 |
| 20 | 10100 | 24 | 14 | 2²⁰ = 1,048,576 (1M) |
| 24 | 11000 | 30 | 18 | 2²⁴ = 16,777,216 (16M) |
| 30 | 11110 | 36 | 1E | 2³⁰ = 1,073,741,824 (1G) |
| 31 | 11111 | 37 | 1F | 2³² = 4,294,967,296 (4G) |
| Hex | Dec | Bin | Hex | Dec | Bin | Hex | Dec | Bin | Hex | Dec | Bin |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0000 | 4 | 4 | 0100 | 8 | 8 | 1000 | C | 12 | 1100 |
| 1 | 1 | 0001 | 5 | 5 | 0101 | 9 | 9 | 1001 | D | 13 | 1101 |
| 2 | 2 | 0010 | 6 | 6 | 0110 | A | 10 | 1010 | E | 14 | 1110 |
| 3 | 3 | 0011 | 7 | 7 | 0111 | B | 11 | 1011 | F | 15 | 1111 |
| Width | Unsigned Max (dec) | Unsigned Max (hex) | Signed Range (dec) | Typical use |
|---|---|---|---|---|
| 8-bit byte | 255 | 0xFF | -128 to +127 | char, pixel RGB |
| 16-bit word | 65,535 | 0xFFFF | -32,768 to +32,767 | short, UTF-16, short int |
| 32-bit dword | 4,294,967,295 | 0xFFFFFFFF | -2,147,483,648 to +2,147,483,647 | int, IPv4, Unix timestamp |
| 64-bit qword | 18,446,744,073,709,551,615 | 0xFFFFFFFFFFFFFFFF | -9.22e18 to +9.22e18 | long long, file size, pointer |
| 128-bit | 3.40e38 | 0xFFFF...FFFF | -1.70e38 to +1.70e38 | UUID, IPv6, GUID |
| Value | Symbol | Value | Symbol | Value | Symbol | Value | Symbol | Value | Symbol | Value | Symbol |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0-9 | 0 1 2 3 4 5 6 7 8 9 | 10-15 | A B C D E F | 16-21 | G H I J K L | 22-27 | M N O P Q R | 28-33 | S T U V W X | 34-35 | Y Z |
Debug memory dumps, parse hex color codes (#FF5733), analyze bitflags, and understand pointer addresses. All languages use the same bases.
Convert IPv4 dotted decimal (192.168.1.1) to binary for subnet masks. CIDR /24 = 255.255.255.0 = 0xFFFFFF00.
Hex dumps from TLS certificates, X.509 keys, hash digests (MD5/SHA-256). Base-64 is not numeric but common; use hex↔bin here.
MCU register settings, GPIO pin states, I2C/SPI bus values. 0x (hex) and 0b (binary) are both C-standard literals.
Convert RGB (255,87,51) = 0xFF5733 hex. Adjust channel brightness using decimal↔hex per-channel conversions.
Verify homework answers for discrete math, digital logic, or assembly language classes. Check two's complement for signed integers.
Repeatedly divide the decimal number by 2, collecting remainders (0 or 1). Read the remainders from last to first. Example: 13 → 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 → 1101. You can verify this converter's "Binary" output matches.
One hex digit maps exactly to 4 bits (a "nibble"), and two hex digits = 1 byte (8 bits). This makes binary blobs human-readable at ¼ the length. 0xFF = 255 = 11111111 — the pattern is memorable and fast to translate mentally.
Two's complement is the standard way computers store signed integers. To negate a number: flip all bits, then add 1. For 8-bit: +3 = 00000011 → -3 = 11111101 (253 unsigned). This converter shows a 32-bit 2's-complement representation automatically.
No — this tool converts integers only. Fractional conversion is possible but much more complex (repeating fractions in different bases). For fractions, multiply by the base (e.g., ×16 for hex) and handle the whole/integer parts separately.
These are standard language prefixes from C/Python/Java/JS:
0b1010 = binary 1010,
0o755 = octal 755,
0xFF = hex FF.
Plain numbers without prefix are treated as decimal (base 10).
This tool uses JavaScript BigInt for conversions, so integers can be arbitrarily large (thousands of digits). Performance may slow for extreme values (hundreds of thousands of digits) but it's unbounded, unlike some calculators capped at 64 bits.