Advertisement

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Shows a step-by-step explanation of the conversion math so you can learn the process.

Input
Number
From Base
2-36
Results
2
Binary
Base 2
0b11111111
8
Octal
Base 8
0o377
10
Decimal
Base 10
255
16
Hexadecimal
Base 16
0xFF
Step-by-Step Conversion
Step 1: Convert Decimal 255 to Binary
255 / 2 = 127 remainder 1
127 / 2 = 63 remainder 1
63 / 2 = 31 remainder 1
31 / 2 = 15 remainder 1
15 / 2 = 7 remainder 1
7 / 2 = 3 remainder 1
3 / 2 = 1 remainder 1
1 / 2 = 0 remainder 1
Result: 11111111

How to Use the Number Base Converter

Enter a number, select its base (binary, octal, decimal, or hexadecimal), and see the equivalent value in all four bases instantly. The step-by-step explanation below shows the positional arithmetic behind the conversion so you can learn the process and verify the math.

What Are Number Bases?

A number base (or radix) determines how many unique digits a number system uses. Decimal (base 10) uses digits 0-9. Binary (base 2) uses only 0 and 1 — it is the foundation of all computer processing. Octal (base 8) uses digits 0-7 and appears in Unix file permissions. Hexadecimal (base 16) uses 0-9 and A-F and is common in memory addresses, color codes, and low-level programming. Converting between these bases is a fundamental skill in computer science.

Common Use Cases

Convert hex memory addresses to decimal for debugging. Translate binary network masks to decimal notation. Understand Unix file permissions in octal with our chmod calculator. Convert hexadecimal color values to their decimal RGB equivalents. Study positional number systems for computer science courses. Verify data integrity with our hash generator. The tool uses JavaScript BigInt, so it handles arbitrarily large numbers without overflow.

Advertisement

Frequently Asked Questions

Related Tools