Convert between binary, decimal, hexadecimal, and octal number systems with real-time conversion, step-by-step explanations, and bit manipulation tools.

Example: Enter 255 in decimal to see it as FF in hexadecimal, 11111111 in binary, and 377 in octal.

๐Ÿ”ข Number System Converter

๐Ÿ“ Conversion Steps

โš™๏ธ Bit Manipulation Tools

A AND B: -
A OR B: -
A XOR B: -
NOT A: -
A << 1: -
A >> 1: -

๐Ÿ’ก Quick Examples

โ“ Frequently Asked Questions

What are number systems?

Number systems are ways to represent numbers using different bases. The most common are:

  • Decimal (Base 10): Uses digits 0-9. This is what we use in everyday life.
  • Binary (Base 2): Uses only 0 and 1. This is how computers store data.
  • Hexadecimal (Base 16): Uses 0-9 and A-F. Often used in programming for memory addresses and colors.
  • Octal (Base 8): Uses digits 0-7. Less common but still used in some systems.
How do I convert between number systems?

Conversion methods vary by system:

  • Decimal to Binary: Repeatedly divide by 2 and collect remainders.
  • Binary to Decimal: Multiply each bit by its power of 2 and sum.
  • Decimal to Hex: Divide by 16 and map remainders (10=A, 11=B, etc.).
  • Binary to Hex: Group bits in sets of 4 and convert each group.
What are bit manipulation operations?

Bit manipulation operates on individual bits:

  • AND (&): Returns 1 only if both bits are 1.
  • OR (|): Returns 1 if at least one bit is 1.
  • XOR (^): Returns 1 if bits are different.
  • NOT (~): Flips all bits (0โ†’1, 1โ†’0).
  • Left Shift (<<): Moves bits left, multiplying by 2.
  • Right Shift (>>): Moves bits right, dividing by 2.
What is two's complement?

Two's complement is how computers represent negative numbers in binary. To get the two's complement:

  1. Invert all bits (NOT operation)
  2. Add 1 to the result

For example, -5 in 8-bit two's complement: 5 = 00000101 โ†’ NOT = 11111010 โ†’ +1 = 11111011

Where are these conversions used?

Number system conversions have many practical applications:

  • Programming: Memory addresses, bitwise operations, color codes (#FF0000)
  • Networking: IP addresses, subnet masks, MAC addresses
  • Electronics: Digital circuit design, microcontroller programming
  • Cryptography: Encryption algorithms, hash functions
  • File Systems: File permissions (octal), data storage