Loading...
Loading...
Cookie choices
WoHoTech uses essential cookies for login and site features. Non-essential analytics and advertising scripts load only after you accept them.
Read privacy policyBinary, Decimal, Octal, Hexadecimal conversions
Number systems form the mathematical backbone of computing and digital electronics. While humans naturally think in decimal (base-10), computers operate in binary (base-2), and programmers frequently work with hexadecimal (base-16) and octal (base-8) for convenience. Our free Number System Converter lets you instantly translate values between all four major bases, making it an indispensable tool for students, developers, and engineers.
A number base (or radix) defines how many unique digits are used to represent numbers. In base-10 (decimal), we use digits 0 through 9. In base-2 (binary), only 0 and 1 are used. In base-8 (octal), digits 0 through 7 are available. In base-16 (hexadecimal), digits 0-9 plus letters A-F (representing 10-15) are used. The positional value of each digit is determined by the base raised to the power of its position.
For example, the decimal number 245 means 2×10² + 4×10¹ + 5×10⁰ = 200 + 40 + 5. Similarly, binary 1101 means 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13 in decimal. This positional notation principle applies universally across all bases.
Binary is the fundamental language of all digital systems. Every piece of data in a computer — from simple numbers to complex videos — is ultimately represented as sequences of 0s and 1s. This two-state system maps directly to the electrical states of transistors: high voltage (1) and low voltage (0). A single binary digit is called a "bit," eight bits form a "byte," and modern computers process 64 bits simultaneously.
Binary arithmetic follows the same principles as decimal but with only two digits. Addition: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (carry 1). Understanding binary is essential for low-level programming, network engineering, cryptography, and computer architecture.
Hexadecimal is beloved by programmers because it provides a compact way to represent binary data. Since 16 = 2⁴, each hexadecimal digit corresponds exactly to four binary digits (one nibble). This means a byte (8 bits) can be represented by exactly two hex digits. Memory addresses, color codes (like #FF5733), MAC addresses (AA:BB:CC:DD:EE:FF), and error codes are typically displayed in hexadecimal.
In most programming languages, hexadecimal numbers are prefixed with "0x" (e.g., 0xFF = 255 decimal). CSS color codes use hex extensively: #000000 is black, #FFFFFF is white, and #FF0000 is pure red. Assembly language programmers work with hex addresses daily.
Octal was historically important because early computers used 12-bit, 24-bit, or 36-bit word lengths that divide evenly by 3. Today, its most common application is Unix/Linux file permissions. The command "chmod 755" sets permissions using octal: 7 (rwx for owner), 5 (r-x for group), 5 (r-x for others). Each octal digit represents exactly 3 binary bits, corresponding to read (4), write (2), and execute (1) permissions.
Decimal to Binary: Repeatedly divide by 2, recording remainders. Read remainders bottom-to-top. Example: 25 → 25÷2=12r1, 12÷2=6r0, 6÷2=3r0, 3÷2=1r1, 1÷2=0r1. Binary: 11001.
Binary to Hex: Group binary digits into sets of 4 from the right, then convert each group. Example: 11010110 → 1101 0110 → D6.
Hex to Decimal: Multiply each digit by 16 raised to its position. Example: 2F → 2×16¹ + 15×16⁰ = 32 + 15 = 47.
Binary to Octal: Group binary digits into sets of 3 from the right. Example: 110101 → 110 101 → 65 octal.
Truth tables enumerate all possible input/output combinations for logic operations. For two binary inputs A and B: AND gives 1 only when both are 1; OR gives 1 when either is 1; XOR gives 1 when inputs differ; NOT inverts a single input. These operations form the basis of all digital circuits, from simple adders to complex processors.
| A | B | AND | OR | XOR |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
In software development, number system conversions appear everywhere. Bitwise operations (&, |, ^, ~, <<, >>) manipulate individual bits for performance optimization, flag management, and cryptographic operations. Network engineers use binary to understand subnet masks (255.255.255.0 = 11111111.11111111.11111111.00000000). Graphics programmers work with hex color values, and embedded systems developers read register values in hexadecimal format from datasheets.
Understanding number systems is also critical for debugging. Memory dumps display data in hexadecimal, stack traces show hex addresses, and protocol analyzers present packet data in hex bytes. Without fluency in base conversion, interpreting these debugging tools becomes impossible.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
Binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16). Binary is what hardware uses, decimal is for human readability, and hex/octal are compact representations of binary.
Assign powers of 2 from right to left starting at 2⁰. Multiply each bit by its power and sum. Example: 10110 = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 22.
Hex is much more compact — one hex digit replaces four binary digits. The byte value 11111111 becomes simply FF in hex. This makes memory dumps, color codes, and addresses far more readable.
Octal is primarily used for Unix/Linux file permissions (chmod 755, 644, etc.). Each octal digit represents 3 bits corresponding to read (4), write (2), and execute (1) permissions.
Divide by 16 repeatedly, noting remainders. Remainders 10-15 become A-F. Read remainders bottom-to-top for the hex number. Example: 200 ÷ 16 = 12r8, 12÷16 = 0r12(C). Result: C8.
This converter handles integer values across all four bases. Fractional conversions (like 0.625 decimal = 0.101 binary) require different methods — multiply by the target base repeatedly for the fractional part.
Two's complement represents negative numbers in binary: invert all bits and add 1. For 8-bit: -5 = invert(00000101) + 1 = 11111010 + 1 = 11111011. The MSB indicates sign (1 = negative).
Hex colors use format #RRGGBB where each pair is a hex value 00-FF (0-255 decimal) for red, green, and blue channels. #FF0000 = pure red, #00FF00 = pure green, #0000FF = pure blue.
Guide
Number System Converter helps you convert one value, unit, format, or representation into another without installing extra software. It is designed for students, creators, developers, and everyday users who need a quick, browser-based result with clear input and output.
Number System Converter helps you convert one value, unit, format, or representation into another without installing extra software. It is designed for students, creators, developers, and everyday users who need a quick, browser-based result with clear input and output.
Using Number System Converter is simple: (1) Open the tool page, (2) Enter your values, text, or upload your file as prompted, (3) Click the action button or see instant results, (4) Copy, download, or use the output. No technical knowledge required.
Yes — 100% free with no hidden charges. Number System Converter is part of WoHoTech's free tools suite. Use it unlimited times without creating an account or providing payment information.
Number System Converter uses internationally recognized conversion factors and standards. Results are precise to multiple decimal places, making it reliable for academic work, engineering, and everyday conversions.
Absolutely. Number System Converter is optimized for all screen sizes. Whether you're on an iPhone, Android, tablet, or desktop computer, you get instant conversions without downloading any app.
Number System Converter runs entirely in your browser using client-side JavaScript. Once the page loads, conversions happen instantly without requiring an internet connection for the actual calculations.