Back to Converters

Number Base Converter

Convert between binary, hexadecimal, decimal, and octal number systems.

Enter a valid number in the selected base

Common Values Reference

DecimalHexBinaryOctal
80x080000 100010
160x100001 000020
320x200010 000040
640x400100 0000100
1280x801000 0000200
2550xFF1111 1111377
2560x1001 0000 0000400
655350xFFFF1111 1111 1111 1111177777

Understanding Number Bases

Binary (Base 2)

Uses digits 0-1. The native language of digital circuits and computers. Each digit represents a power of 2.

Octal (Base 8)

Uses digits 0-7. Less common today but still used in some Unix/Linux file permissions.

Decimal (Base 10)

Uses digits 0-9. The standard human-readable number system we use daily.

Hexadecimal (Base 16)

Uses 0-9 and A-F. Compact representation of binary data. 1 hex digit = 4 binary bits.

Common Uses in Electronics

Memory Addresses
Typically represented in hexadecimal (e.g., 0x1000, 0xFFFF)
Register Values
MCU registers often shown as binary or hex for bit manipulation
Color Codes
RGB colors use hex (e.g., #FF5733 = R:255, G:87, B:51)
I2C/SPI
Device addresses and data commonly expressed in hex

Frequently Asked Questions

How do I convert binary to decimal?

Multiply each binary digit by its position value (powers of 2) and sum them. For example: 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11

Why is hexadecimal commonly used?

Hex is compact (1 hex digit = 4 bits) and easy to convert to/from binary. It's widely used in programming, memory addressing, and color codes.

What do prefixes like 0x and 0b mean?

0x indicates hexadecimal, 0b indicates binary, and 0o indicates octal. These prefixes help distinguish the number base in code.