Number System Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly with grouped display.
Number System Converter
Quick values (decimal):
How to Use
Enter a number in any base
Type in Binary, Octal, Decimal, or Hexadecimal — all other fields update instantly.
View all four representations
See the number expressed in all four bases simultaneously with grouped formatting for readability.
Check bit grouping for binary values
Read binary output in nibble (4-bit) groups and hex in byte-aligned pairs.
Apply results to programming tasks
Use hex for memory addresses, binary for bit manipulation, and octal for Unix permissions.
Number Systems Explained
Computers process data in binary (base 2). Octal (base 8) and hexadecimal (base 16) are shorthand notations for binary. Hexadecimal is widely used in programming, HTML colors, memory addresses, and network protocols.
Real-World Examples & Use Cases
Bitwise Operations and Flags in Programming
Developers writing low-level code, embedded systems, and network protocols work with bitmasks and bit flags. Checking whether a permission flag is set: if (permissions & 0b00000100) uses binary literals. Setting a flag: config |= 0x08 uses hex. A number system converter helps developers move between the decimal value in business logic and the binary/hex representations in code, verifying that a decimal permission number like 52 corresponds to the intended bit pattern 00110100 with the right flags set.
Unix File Permissions (chmod)
Unix file permissions are commonly specified in octal notation. chmod 755 sets owner=read/write/execute (7=111), group=read/execute (5=101), other=read/execute (5=101). Understanding that octal 7 = binary 111 (all three permission bits set) and octal 0 = binary 000 (no permissions) requires number base conversion. A converter showing that decimal 493 = octal 755 = binary 111 101 101 makes the three-permission-group structure of Unix permissions visually clear.
Memory Addresses and Debugging
Debuggers, disassemblers, and memory inspection tools express addresses in hexadecimal (0x7FFF5FBE0000). Assembly language references registers and offsets in hex. When examining a memory dump or stack trace with addresses like 0x1A3F, a number system converter shows the decimal (6719) and binary (0001 1010 0011 1111) equivalents. For alignment calculations (is this address 16-byte aligned?), checking that the last 4 binary bits are all 0 is easier than checking divisibility by 16 in decimal.
Computer Science Education and Coursework
Computer science courses on digital logic, computer architecture, and assembly language require fluency in number base conversion. Students converting binary to hex for machine code representation, or decimal to binary for two's complement practice, use a converter to check homework answers. Teachers demonstrating base conversions — showing that 0xFF = 255 = 11111111 and that 0x100 = 256 = 1 0000 0000 — use live converters during lectures to make the relationships immediate and interactive.
How It Works
Number Base Conversion Algorithms: Decimal to Binary: Repeatedly divide by 2, collect remainders (right to left): 13 ÷ 2 = 6 R1 → bit 0 = 1 6 ÷ 2 = 3 R0 → bit 1 = 0 3 ÷ 2 = 1 R1 → bit 2 = 1 1 ÷ 2 = 0 R1 → bit 3 = 1 Result: 1101 (read remainders bottom to top) JavaScript: (13).toString(2) = "1101" Decimal to Hex: Same algorithm but divide by 16: 255 ÷ 16 = 15 R15 (F) → digit 0 = F 15 ÷ 16 = 0 R15 (F) → digit 1 = F Result: FF (= 255) JavaScript: (255).toString(16).toUpperCase() = "FF" Decimal to Octal: Divide by 8: 255 ÷ 8 = 31 R7 → digit 0 = 7 31 ÷ 8 = 3 R7 → digit 1 = 7 3 ÷ 8 = 0 R3 → digit 2 = 3 Result: 377 (octal) = 255 (decimal) JavaScript: (255).toString(8) = "377" Binary to Hex (shortcut): Group binary into nibbles (4 bits), convert each to hex digit: 1111 0000 → F0 1010 0011 → A3 (4 binary digits always = 1 hex digit) Any base to decimal: sum(digit[i] × base^position) from right Binary 1101: 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8+4+0+1 = 13 Hex 1A: 1×16¹ + 10×16⁰ = 16+10 = 26
Frequently Asked Questions
Why do computers use binary and not decimal?▼
What is the relationship between binary and hexadecimal?▼
What are octal numbers used for today?▼
How do I convert a hex color code to RGB?▼
What is two's complement and how does binary represent negative numbers?▼
Related Tools
Explore other tools in this category.
JSON Formatter
Format, validate, prettify, and minify your JSON data quickly.
Password Strength Checker
Analyze how secure your password is and generate a strong one instantly.
CSS Unit Converter
Convert between CSS units: px, rem, em, pt, vw, vh, cm, mm, and inches.
Binary ? Text Converter
Convert plain text to binary code and decode binary back to readable text.
Text to Binary Converter
Convert letters and strings into computer binary format.
QR Code Generator
Create and download customized QR codes for URLs, text, and contacts.