Enter a number and click Convert to see results

Usage Examples

Common

Maximum 8-bit unsigned value

255 = 11111111₂ = FF₁₆

Common

1 Kilobyte in bytes — a power of 2

1024 = 10000000000₂ = 400₁₆

Fun

The answer to life, the universe, and everything

42 = 101010₂ = 2A₁₆

Binary

Simple binary pattern — alternating bits

1010 = 10₁₀ = A₁₆

Hex

Common bitmask value in programming

FF00 = 65280₁₀ = 177400₈

Signed

Negative one — two's complement representation

-1 = 11111111 (8-bit) = FF₁₆

How to Use Number Base Converter

1

Select Input Base

Choose the base of your input number: Decimal, Binary, Octal, or Hex.

2

Enter Your Number

Type the number in the input field. Negative numbers are supported.

3

View All Bases

See the number converted to all bases simultaneously, including signed integer representations.

Frequently Asked Questions

Basics

What are number bases?

Number bases are different ways of representing numbers. Decimal (base-10) uses digits 0-9, Binary (base-2) uses 0 and 1, Octal (base-8) uses 0-7, and Hexadecimal (base-16) uses 0-9 and A-F.

Why do developers need base conversion?

Developers work with binary for low-level programming, hex for colors and memory addresses, and decimal for user-facing values. Converting between them is a daily task.

When should I use binary vs hexadecimal?

Binary is useful for understanding individual bits and boolean operations. Hexadecimal is more compact and is commonly used for memory addresses, color codes (#RRGGBB), and bitmasks.

Conversions

How do I convert decimal to binary?

Divide the number by 2 repeatedly and record the remainders. Read the remainders in reverse order. For example, 255 ÷ 2 = 127 r1, 127 ÷ 2 = 63 r1, ... giving 11111111₂.

How do I convert binary to hex?

Group binary digits into sets of 4 (from right to left), then convert each group to its hex equivalent. For example, 10101111 = 1010 1111 = AF₁₆.

Does this tool support negative numbers?

Yes, negative numbers are supported. The tool shows both the signed representation and the unsigned interpretation for 8-bit, 16-bit, and 32-bit integers.

What is two's complement?

Two's complement is the standard way computers represent signed integers. To negate a number: invert all bits and add 1. For example, -1 in 8-bit is 11111111 (all bits set).

Applications

Where is binary used in programming?

Binary is fundamental in programming: bit flags, network protocols, file formats, cryptographic operations, and hardware interfaces all work at the bit level.

Why is 255 a special number?

255 (or FF in hex) is the maximum value that fits in a single byte (8 bits). It appears in IP subnet masks (255.255.255.0), RGB color channels, and many other contexts.