Number System Converter
Convert between binary, decimal, hexadecimal, and octal number systems. Essential tool for programming, computer science, mathematics, and digital electronics.
Enter Number to Convert
All Number System Conversions
Decimal
Base-10Binary
Base-2Hexadecimal
Base-16Octal
Base-8Binary Bit Representation (32-bit)
Number Properties
ASCII Character
Common Computer Science Values
| Decimal | Binary | Hex | Octal | Description |
|---|
About Number System Converter
The Number System Converter helps you convert between different numeral systems used in computing and mathematics. Convert between decimal (base-10), binary (base-2), hexadecimal (base-16), and octal (base-8) number systems.
How Number System Conversion Works
Decimal to Binary
Repeatedly divide by 2, record remainders in reverse order
255 ÷ 2 = 127 R1, 127 ÷ 2 = 63 R1, ... = 11111111
Binary to Hexadecimal
Group binary digits into sets of 4, convert each to hex
1111 1111 = F F = 0xFF
Binary to Octal
Group binary digits into sets of 3, convert each to octal
011 111 111 = 3 7 7 = 0377
Hex to Decimal
Multiply each digit by 16^position, sum results
0xFF = 15×16¹ + 15×16⁰ = 240 + 15 = 255
Number System Basics
| System | Base | Digits | Prefix/Suffix | Common Uses |
|---|---|---|---|---|
| Decimal | 10 | 0-9 | None or d | Everyday counting, mathematics |
| Binary | 2 | 0-1 | 0b or b | Computers, digital electronics |
| Hexadecimal | 16 | 0-9, A-F | 0x or h | Programming, memory addresses |
| Octal | 8 | 0-7 | 0 or o | Unix permissions, older systems |
Common Computer Science Values
Memory Sizes
- 1 Byte: 8 bits = 0-255
- 1 Kilobyte: 1024 bytes
- 1 Megabyte: 1,048,576 bytes
- 1 Gigabyte: 1,073,741,824 bytes
Bit Representations
- 4 bits: 0-15 (1 hex digit)
- 8 bits: 0-255 (1 byte)
- 16 bits: 0-65535 (2 bytes)
- 32 bits: 0-4,294,967,295
Programming Constants
- NULL pointer: 0x00000000
- MAX_INT: 0x7FFFFFFF
- MIN_INT: 0x80000000
- -1: 0xFFFFFFFF
Network Values
- Subnet Mask: 255.255.255.0
- Localhost: 127.0.0.1
- Broadcast: 255.255.255.255
- Private IP: 192.168.x.x
Two's Complement System
- Purpose: Represent signed integers in binary
- Range: For n bits: -2^(n-1) to 2^(n-1)-1
- MSB: Most Significant Bit is sign bit (0=positive, 1=negative)
- Positive Numbers: Same as unsigned binary
- Negative Numbers: Invert all bits, then add 1
- Zero: All bits are 0
- Advantage: Single representation of zero, simple arithmetic
ASCII Character Codes
ASCII (American Standard Code for Information Interchange) uses 7 bits (0-127) to represent characters:
- 0-31: Control characters (non-printable)
- 32-126: Printable characters (letters, numbers, symbols)
- 48-57: Digits 0-9
- 65-90: Uppercase letters A-Z
- 97-122: Lowercase letters a-z
- 127: Delete character
- 128-255: Extended ASCII (varies by system)