Number Base Converter
Computers count in binary; programmers use hexadecimal; we use decimal. Convert a number between binary, octal, decimal and hexadecimal by entering its base.
Your numbers
Result
- Decimal
- 255
- Octal
- 377
| Base | Representation |
|---|---|
| Binary (base 2) | 11111111 |
| Octal (base 8) | 377 |
| Decimal (base 10) | 255 |
| Hexadecimal (base 16) | FF |
What number bases are
The base sets how many digits a system uses. Decimal (base 10) uses 0-9; binary (base 2) only 0 and 1; octal (base 8), 0-7; hexadecimal (base 16) runs 0-9 then A-F (A=10 ... F=15). The number 255 in decimal is 11111111 in binary and FF in hex.
Why binary and hex matter
Electronic circuits store information as two states (on/off), which is binary. Because bit strings get long, programmers use hexadecimal, where each digit maps to 4 bits — shorter and easier to read. Web colors (#FF0000) and memory addresses are written in hex.
Frequently asked questions
Sources
- Positional numeral systems (math / computing)
Embed this calculator
Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.
<iframe src="https://contania.app/embed/conversions/number-base-converter" title="Number Base Converter (Binary, Decimal, Hex)" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/conversions/number-base-converter"]');if(f){f.style.height=e.data.height+"px"}}});</script>Related calculators
Data Storage
Convert digital storage between bits, bytes, KB, MB, GB and TB using binary units (1 KB = 1024 bytes), the way an operating system counts.
CalculateConversionsUnit Converter
Convert length between mm, cm, m, km, inches, feet, yards and miles — all at once. A complete metric-to-imperial length converter.
CalculateConversionsRoman Numerals
Convert Roman numerals to numbers and back. Type 2024 to get MMXXIV, or enter a Roman numeral to read its value. Works from 1 to 3999.
CalculateConversionsPressure
Convert pressure between psi, bar, pascals (Pa), kilopascals (kPa), atmospheres (atm) and mmHg. Handy for tires, weather and engineering.
CalculateConversionsShoe Size
Convert shoe sizes between US, EU and UK standards, with the foot length in cm and inches. Great for buying shoes from other countries.
CalculateConversionsSpeed
Convert speed between mph, km/h, m/s, knots and ft/s. Enter a value and pick the units to convert from and to.
Calculate