100% Free No Sign-Up Unlimited Use No Limits Secure & Private
PDF Tools Calculators Categories Guides Contact No Sign-Up Needed to Use This Site
Result
Binary
Octal
Decimal
Hexadecimal
8-bit
16-bit

Convert instantly between binary, octal, decimal, and hexadecimal, or perform bitwise (AND, OR, XOR, NOT, shifts) and arithmetic operations directly on binary numbers.

How It Works

How Binary Calculator Works

The converter reads your input in whichever base you select (binary, octal, decimal, or hex) and parses it into a plain decimal integer, then re-expresses that same decimal value in the other three bases by repeatedly dividing by the target base and reading off the remainders.

The arithmetic mode treats your entered binary strings as base-2 integers, performs the chosen operation — bitwise AND/OR/XOR compare the numbers bit by bit, while ADD/SUB/MUL/DIV work like ordinary arithmetic and left/right shift move every bit one or more positions — then converts the result back into binary, octal, and hex for display.

The 8-bit and 16-bit fields pad the binary result with leading zeros to a fixed width, which is useful for visualizing exactly how a value would be stored in a single byte or a 16-bit word in computer memory.

Worked Example

See It In Action

Converting decimal 255 gives binary 11111111, octal 377, and hexadecimal FF — the classic "all bits on" value, since 255 = 2⁸ − 1 is the largest number that fits in a single 8-bit byte.
Real-World Use Cases

Who Uses Binary Calculator and Why

  • Converting a number between binary, octal, decimal, and hex for a computer science homework problem.
  • Checking the result of a bitwise AND, OR, or XOR operation while debugging low-level code.
  • Visualizing exactly how a value would be stored in a single byte or 16-bit word using the padded output fields.
  • Confirming that a left or right shift produces the expected multiply-or-divide-by-two-power result.
Common Mistakes

Mistakes to Avoid

  • Treating bitwise AND like regular addition — it compares each bit position independently and never carries, producing a very different result from arithmetic addition.
  • Forgetting that the 8-bit and 16-bit padded views only reflect the display width you selected, not an inherent property of the number itself.
  • Misreading an octal number as decimal (or the reverse) since both use only digit characters and look similar at a glance.
Pro Tips

Tips for Best Results

  • Remember that shifting left by n positions is the same as multiplying by 2^n, and shifting right is the same as dividing by 2^n (rounding down).
  • Use the 8-bit or 16-bit padded fields when you specifically need to see how a value is stored in a fixed-width binary format.
Troubleshooting

Fixing Common Problems

My XOR result doesn't match what I expected from adding the numbers. — XOR is a bitwise operation, not arithmetic — it compares each bit position independently rather than carrying like addition does, so don't expect it to behave like a sum.

Glossary

Terms Explained

Bitwise operation: A calculation performed independently on each corresponding bit of two numbers, such as AND, OR, or XOR, rather than treating them as whole numbers.

One's complement: The result of a NOT operation, where every bit in a binary number is flipped (0 becomes 1, and 1 becomes 0).

FAQ

Frequently Asked Questions

Why does 255 need exactly 8 bits to represent?
A single byte has 8 binary digits, each either 0 or 1, giving 2⁸ = 256 possible combinations (0 through 255). So 255 — all eight bits set to 1 — is the maximum value a byte can hold.
How does bitwise AND differ from regular addition?
Bitwise AND compares each corresponding bit position independently and keeps a 1 only where both numbers have a 1 in that position — it doesn't "carry" like addition does, and produces a completely different result from adding the same two numbers.
What does the NOT operation do to a binary number?
NOT flips every single bit — every 0 becomes a 1 and every 1 becomes a 0 — producing what's called the one's complement of the original number.
Can I use left shift to multiply by powers of two?
Yes — shifting a binary number left by n positions is mathematically equivalent to multiplying it by 2^n, since each shift moves every bit one place value higher.