Binary Calculator

Perform binary arithmetic and convert between binary, decimal, and hexadecimal. Perfect for computer science, programming, and digital electronics.

Result
-

Step-by-Step Solution

Enter values and click "Calculate" to see the step-by-step solution.

Binary Reference Table

Decimal Binary Hexadecimal Octal
0000
1111
21022
31133
410044
510155
611066
711177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17

What is Binary?

Binary is a base-2 number system that uses only two digits: 0 and 1. It's the fundamental language of computers, where each digit represents a bit (binary digit).

Binary Arithmetic Rules

  • Addition: 0+0=0, 0+1=1, 1+0=1, 1+1=0 carry 1
  • Subtraction: 0-0=0, 1-0=1, 1-1=0, 0-1=1 borrow 1
  • Multiplication: Same as decimal, but simpler (0 or 1)
  • Division: Similar to long division

Bitwise Operations

  • AND (&): 1 if both bits are 1
  • OR (|): 1 if at least one bit is 1
  • XOR (^): 1 if bits are different
  • NOT (~): Flips all bits
  • Left Shift (<<): Moves bits left (multiplies by 2)
  • Right Shift (>>): Moves bits right (divides by 2)

Binary Calculator: Master Binary Arithmetic & Conversions

What is Binary? Binary is a base-2 number system that uses only two digits: 0 and 1. Each binary digit is called a "bit" (binary digit). Computers use binary because transistors have two states: on (1) and off (0). Understanding binary is essential for computer science, programming, and digital electronics.

Binary to Decimal Conversion

To convert binary to decimal, multiply each bit by 2 raised to its position (starting from 0 on the right) and sum the results. For example: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 8 + 0 + 2 + 1 = 11₁₀

Decimal to Binary Conversion

Divide the decimal number by 2 repeatedly, recording remainders from bottom to top. For example: 13₁₀ = 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 → 1101₂

Binary Addition Rules

Binary Subtraction Rules

Computer Science Tip: Understanding binary is the foundation of computer science. All data in computers—numbers, text, images, sound—is stored as binary. Mastering binary arithmetic and conversions is essential for programming, networking, and digital logic design.