Advertisement
Ad 728×90

Number System Converter

Binary, hexadecimal, octal, decimal and file size conversions

Base conversions
Binary
0b11111111
Octal
0o377
Decimal
255
Hexadecimal
0xFF
File size
Bytes (B)
255
Kilobytes (KB)
0.249023
Megabytes (MB)
2.432e-4
Gigabytes (GB)
2.375e-7
Advertisement
Ad 336×280

Understanding number systems

Computers use binary (base 2) internally, but developers often work with hexadecimal (base 16) because it is more compact. Decimal (base 10) is our everyday system, and octal (base 8) is used in some Unix contexts.

Why hexadecimal in computing?

One byte (8 bits) can be represented by exactly 2 hexadecimal digits (00 to FF). That is why web colors (#FF5733), MAC addresses and error codes are in hex. FF hex = 255 decimal = 11111111 binary.

File size conversions

1 KB = 1,024 bytes | 1 MB = 1,048,576 bytes | 1 GB = 1,073,741,824 bytes. Note: hard drive manufacturers use 1 GB = 1,000,000,000 bytes, which explains the difference between advertised and actual capacity.