Copynix

Number Base Converter — Binary, Octal, Decimal, Hexadecimal Online

Binarybase 2
0-1
0b
Octalbase 8
0-7
0o
Decimalbase 10
0-9
Hexadecimalbase 16
0-9, A-F
0x

Supports non-negative integers. Edit any field to convert all bases.

Frequently Asked Questions

What are number bases?

A number base (or radix) defines how many unique digits are used. Binary uses 2 (0,1), octal uses 8 (0-7), decimal uses 10 (0-9), and hexadecimal uses 16 (0-9, A-F).

Where is hexadecimal used?

Hexadecimal is widely used in computing: memory addresses, color codes (#FF5733), byte values, and debugging output. Each hex digit represents exactly 4 binary bits.

Where is binary used?

Binary is the fundamental language of computers. All data is ultimately stored and processed as 0s and 1s. Understanding binary is essential for bit manipulation and low-level programming.

How do I convert hex to decimal manually?

Multiply each digit by 16 raised to its position power and sum the results. For example, 0xFF = (15×16¹) + (15×16⁰) = 240 + 15 = 255.

How many bits does a single hexadecimal digit represent?

One hexadecimal digit represents exactly 4 bits (a nibble). Two hex digits form one byte (8 bits). This is why hex is so popular for representing binary data — 0xFF is much more readable than 11111111.

Why do programmers use hexadecimal instead of decimal?

Hex maps cleanly to binary: 1 hex digit = 4 bits, 2 hex digits = 1 byte. This makes bit-level operations, memory addresses, and byte values much easier to read and write than their decimal equivalents. For example, color #FF5733 directly shows 3 bytes of RGB values.

What is two's complement and how does it relate to binary?

Two's complement is how computers represent negative integers in binary. To negate a number: flip all bits and add 1. For example, in 8-bit: +5 = 00000101; -5 = 11111010 + 1 = 11111011. This is why signed integers have an asymmetric range (e.g., -128 to +127 for 8-bit).

Number base conversion is a fundamental skill in programming and computer science. Binary, octal, decimal, and hexadecimal are the four most common bases — each serving a different role in code, hardware, and networking.

How to use

  1. 1

    Enter a number in any field

    Type a number in the binary, octal, decimal, or hexadecimal field. All other fields update instantly with the equivalent value in their respective base.

  2. 2

    Use the correct prefix format

    Hexadecimal values can be entered with or without the 0x prefix (both 0xFF and FF are accepted). Binary values are entered as 0s and 1s without the 0b prefix.

  3. 3

    Verify conversions

    The tool shows all four representations simultaneously — use this to double-check manual conversions or understand how a value looks in different contexts.

  4. 4

    Handle large numbers

    The tool handles arbitrarily large integers. Enter memory addresses, color codes, or permission masks without worrying about overflow.

Use cases

  • Decode color values

    CSS color #FF5733 is three hex bytes: FF (255 red), 57 (87 green), 33 (51 blue). Convert each byte to decimal to get the RGB values for use in non-CSS contexts.

  • Read Unix file permissions

    The chmod command uses octal values (e.g. 755). Converting 7 to binary gives 111 — meaning read, write, and execute. This tool makes it visual.

  • Understand memory addresses

    Debuggers and crash reports show memory addresses in hexadecimal. Convert them to decimal or binary to understand their magnitude or to compare with documentation.

Related Tools

SHA Hash

SHA-256, SHA-512 hashing

Chmod

Unix file permissions

Color

HEX, RGB, HSL converter

Regex

Test regex with highlighting

Different number bases are fundamental to low-level programming, networking, and computer science. Decimal (base 10) is what humans use daily; binary (base 2) is what processors actually operate on; octal (base 8) appears in Unix file permissions (chmod 755); hexadecimal (base 16) is used everywhere from memory addresses and color codes to byte-level protocol fields and cryptographic output.

This converter lets you enter a number in any of the four standard bases and instantly see its representation in all others. It is particularly useful when working with bitwise operations (where binary makes the logic visible), reading memory dump output (hex), setting Linux file permissions (octal), or verifying that a hex color code corresponds to the right decimal RGB value.