Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Support for signed/unsigned numbers and multiple bit sizes.

0 characters

0 characters

0 characters

0 characters

Quick Load Examples:

How to Use the Number Base Converter

Single Mode

  1. Enter a number in any of the four base fields (binary, octal, decimal, or hexadecimal)
  2. The tool automatically converts your number to all other bases in real-time
  3. Adjust the bit size (8, 16, 32, or 64-bit) to match your use case
  4. Toggle "Signed numbers" to work with negative numbers using two's complement
  5. Use "Uppercase hex" for uppercase hexadecimal output (A-F instead of a-f)
  6. Click the "Copy" button on any field to copy the result to your clipboard

Batch Mode (New!)

  1. Switch to "Batch" mode using the mode toggle
  2. Select the bit size, signed/unsigned, and hex case options
  3. Upload a TXT or CSV file, or enter multiple numbers (one per line)
  4. Click "Process Batch" to convert all items at once to all bases
  5. View results in a detailed table with binary, octal, decimal, and hex columns
  6. Download results as TXT (plain output) or CSV (with input/output columns)

Batch mode is perfect for converting large datasets of numbers between different bases. Each number is automatically converted to all four bases at once.

Common Use Cases

  • Memory addresses: Convert hex addresses (0x00FF) to decimal or binary for debugging
  • Color codes: Convert hex color values (FF5733) to decimal RGB components
  • File permissions: Convert Unix octal permissions (755) to binary to understand permission bits
  • Network protocols: Decode binary flags and hexadecimal packet data
  • Assembly programming: Work with different number representations in low-level code
  • Learning: Understand how different number systems represent the same value

Understanding Number Bases

Different number bases are fundamental to computing. Binary (base 2) uses only 0 and 1, representing the on/off states of electronic circuits. Octal (base 8) uses digits 0-7 and is commonly used for Unix file permissions. Decimal (base 10) is our everyday number system. Hexadecimal (base 16) uses 0-9 and A-F, providing a compact way to represent binary data—each hex digit represents exactly 4 bits.

Base Conversion Examples

Here are some common conversions to illustrate how the same number appears in different bases:

  • Decimal 255: Binary 1111 1111, Octal 377, Hex FF (maximum 8-bit value)
  • Decimal 256: Binary 1 0000 0000, Octal 400, Hex 100 (minimum 9-bit value)
  • Decimal 1024: Binary 0100 0000 0000, Octal 2000, Hex 400 (1 KB in computing)
  • Decimal 65535: Binary 1111 1111 1111 1111, Octal 177777, Hex FFFF (maximum 16-bit value)
  • Decimal 16777215: Hex FFFFFF (maximum RGB color value, white #FFFFFF)
  • RGB Color #FF5733: Red=255 (FF), Green=87 (57), Blue=51 (33)
  • Unix Permission 755: Binary 111 101 101 (rwxr-xr-x)
  • IPv4 Octet 192: Binary 1100 0000, Hex C0

Signed vs Unsigned Numbers

Unsigned numbers represent only positive values (0 and above). For example, an 8-bit unsigned number can represent 0 to 255. Signed numbers use two's complement to represent both positive and negative values. An 8-bit signed number ranges from -128 to 127. The most significant bit indicates the sign (0 for positive, 1 for negative).

Frequently Asked Questions

What is hexadecimal used for?

Hexadecimal is widely used in computing because it's a compact way to represent binary data. Each hex digit represents exactly 4 bits (half a byte), making it easier to read and write than long binary strings. It's commonly used for memory addresses, color codes, MAC addresses, and debugging.

Why use octal in modern computing?

While less common than hexadecimal, octal is still used for Unix/Linux file permissions (like chmod 755) and in some networking contexts. Each octal digit represents exactly 3 bits, making it useful for certain bit-grouping scenarios.

What does the bit size option do?

The bit size (8, 16, 32, or 64-bit) determines the range of numbers you can represent. Larger bit sizes allow larger numbers but use more memory. For example, 8-bit unsigned can store 0-255, while 32-bit unsigned can store 0 to over 4 billion.

How do I enter a negative number?

Enable the "Signed numbers" option, then enter a negative decimal number (like -10). The converter will show the two's complement representation in binary, octal, and hexadecimal.