Convert numbers between different numeral systems.
Computers operate in binary (base 2), but programmers regularly work with four number systems: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Understanding how values translate between these bases is essential for low-level programming, bitwise operations, memory addressing, and working with hardware specifications. Our Number Base Converter instantly converts any number between all four systems simultaneously — type in any field and see the equivalent values in all others appear in real time. Perfect for programmers, computer science students, and electronics engineers.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 0001 0000 | 20 | 10 |
| 255 | 1111 1111 | 377 | FF |
| 256 | 0001 0000 0000 | 400 | 100 |
Bitwise Operations in Programming
Low-level programming with bitwise operators (&, |, ^, ~, <<, >>) requires thinking in binary. When computing bitmasks, flag fields, or hardware register values, seeing the binary representation directly shows which bits are affected. For example, to check if bit 3 is set in register value 0x4C (76 decimal), convert to binary: 0100 1100 — bit 3 (counting from 0) is 1, so yes it's set. This tool makes such conversions instant during development and debugging.
Understanding Color Values in Web Design and Graphics
Web colors are specified in hexadecimal: #FF5733 represents Red=255 (FF), Green=87 (57), Blue=51 (33). Converting these hex values to decimal helps when working with CSS, Canvas, or image processing APIs that accept decimal RGB values. Converting to binary shows the bit structure, which matters when dealing with color quantization, palettes, or image compression algorithms that operate on individual color bits.
Unix File Permissions
Unix/Linux file permissions are displayed in octal. The permission 755 means: owner can read/write/execute (7=111 in binary), group can read/execute (5=101), others can read/execute (5=101). The permission 644 means: owner can read/write (6=110), group and others can read (4=100). Use this converter to understand what any permission octal value means in binary, and therefore which read/write/execute bits are set for each user class.
010 is 8, not 10. Python 3 uses 0o10 for octal. Be careful to not confuse octal notation with decimal when reviewing codeQ: Why do computers use binary instead of decimal?
A: Electronic circuits naturally represent two states: on and off, corresponding to high and low voltages. Binary maps perfectly to this physical reality — 1 for high voltage, 0 for low. Building reliable electronic circuits for 10 distinct states (decimal 0–9) would be far more complex and error-prone than circuits for just 2 states. Binary's simplicity makes modern processors fast, reliable, and energy-efficient.
Q: Why is hexadecimal used in programming if computers use binary?
A: Hexadecimal is a convenient shorthand for binary. Each hex digit represents exactly 4 binary bits (a nibble), so an 8-bit byte is always 2 hex digits, a 32-bit integer is 8 hex digits, etc. This makes hex much more compact than binary while still mapping directly to bit patterns — much more useful than decimal for low-level work where you care about individual bits. A memory address like 0x7FFF800 is far more readable than its 28-digit binary equivalent.
Q: Which number bases does this tool support?
A: The tool converts between Binary (base 2, digits: 0 and 1), Octal (base 8, digits: 0–7), Decimal (base 10, digits: 0–9), and Hexadecimal (base 16, digits: 0–9 and A–F). These are the four bases most commonly used in computing, electronics, and programming.
Q: Can I convert floating-point numbers or fractions?
A: This tool handles non-negative integers only. Floating-point binary representation (IEEE 754 format) is a separate, more complex topic involving sign bit, exponent, and mantissa fields. For floating-point binary analysis, you'd need a dedicated IEEE 754 converter.
Q: Is my data private when using this tool?
A: Yes. All conversions happen entirely in your browser using JavaScript. No numbers are sent to any server. The tool works offline after the initial page load.