Number Base Converter

Convert numbers between different bases including binary (2), octal (8), decimal (10), hexadecimal (16), and any custom base from 2 to 36. Perfect for computer science, programming, and mathematics.

Universal Number Converter

Convert between any number bases from 2 to 36.

Result will appear here

Common Uses for Number Base Conversion

๐Ÿ’ป

Computer Programming

Convert between binary, hexadecimal, and decimal for memory addresses, bit operations, and data representation.

๐Ÿ”Œ

Digital Electronics

Binary and hexadecimal conversions are essential for understanding digital circuits and logic gates.

๐ŸŒ

Web Development

Hexadecimal is used for color codes, while binary helps understand data encoding and file formats.

๐Ÿ”—

Network Administration

IP addresses, subnet masks, and MAC addresses often require hexadecimal and binary conversions.

๐Ÿ“š

Mathematics Education

Learn about different number systems and positional notation in computer science courses.

๐Ÿ”

Cryptography

Various number bases are used in encryption algorithms and hash functions.

๐Ÿ“š Learn More

Understanding Number Systems

A number system (or numeral system) is a mathematical notation for representing numbers using a consistent set of digits or symbols. Each number system has a base (or radix) that determines how many unique digits are used and the place value of each position.

General Conversion Formula

Where di represents the digit at position i, and the rightmost position is 0.

Popular Number Systems

Binary (Base-2)

Digits: 0, 1

Used in: Computer systems, digital electronics

Example: 1011โ‚‚ = 1ร—2ยณ + 0ร—2ยฒ + 1ร—2ยน + 1ร—2โฐ = 11โ‚โ‚€

Octal (Base-8)

Digits: 0-7

Used in: Unix file permissions, some programming

Example: 157โ‚ˆ = 1ร—8ยฒ + 5ร—8ยน + 7ร—8โฐ = 111โ‚โ‚€

Decimal (Base-10)

Digits: 0-9

Used in: Everyday mathematics, human counting

Example: 342โ‚โ‚€ = 3ร—10ยฒ + 4ร—10ยน + 2ร—10โฐ = 342โ‚โ‚€

Hexadecimal (Base-16)

Digits: 0-9, A-F (A=10, B=11, C=12, D=13, E=14, F=15)

Used in: Programming, color codes, memory addresses

Example: 2AFโ‚โ‚† = 2ร—16ยฒ + 10ร—16ยน + 15ร—16โฐ = 687โ‚โ‚€

Conversion Methods

Method 1: Direct Conversion (Any Base โ†’ Decimal)

Use positional notation to convert any base to decimal:

Example: Convert 1A3โ‚โ‚† to decimal

Method 2: Division Method (Decimal โ†’ Any Base)

Repeatedly divide by target base and collect remainders:

Example: Convert 157โ‚โ‚€ to binary

157 รท 2 = 78 remainder 1
78 รท 2 = 39 remainder 0
39 รท 2 = 19 remainder 1
19 รท 2 = 9 remainder 1
9 รท 2 = 4 remainder 1
4 รท 2 = 2 remainder 0
2 รท 2 = 1 remainder 0
1 รท 2 = 0 remainder 1

Read remainders upward:

10011101โ‚‚

Method 3: Two-Step Conversion (Base A โ†’ Base B)

For conversions between non-decimal bases:

Step 1: Convert Base A โ†’ Decimal

Step 2: Convert Decimal โ†’ Base B

This universal method works for any base conversion, though direct methods exist for specific pairs (like binary โ†” octal, binary โ†” hexadecimal).

Quick Reference

Common Powers

2ยนโฐ =1024
2ยนโถ =65,536
8ยณ =512
16ยฒ =256
16ยณ =4,096

Hex Digits

A =10
B =11
C =12
D =13
E =14
F =15