Universal Calculator
TAIIR

Binary Calculator

Convert between binary, decimal, hexadecimal, and octal. Perform binary arithmetic and bitwise operations with step‑by‑step solutions.

Binary
--
Decimal
--
Hexadecimal
--
Octal
--

Powers of 2

2⁰ = 1 · 2¹ = 2 · 2² = 4 · 2³ = 8
2⁴ = 16 · 2⁵ = 32 · 2⁶ = 64 · 2⁷ = 128
2⁸ = 256 · 2¹⁰ = 1024 · 2¹⁶ = 65536
2²⁰ = 1,048,576 · 2³² = 4,294,967,296

Binary‑Decimal

DecBinHex
000000
501015
101010A
151111F
25511111111FF

Recent

No calculations yet

Mastering Binary: Complete Guide

Binary is the foundation of all modern computing. Using only two digits—0 and 1—binary represents data and instructions that digital circuits can process. This Professional Binary Calculator provides three essential tools: real‑time conversion between binary, decimal, hexadecimal, and octal; binary arithmetic (addition, subtraction, multiplication, division); and bitwise operations (AND, OR, XOR, NOT, shifts). Each result includes a detailed breakdown, making it ideal for students, programmers, and electronics enthusiasts.

Binary to Decimal Conversion

Each binary digit (bit) represents a power of 2, starting from 2⁰ on the right. To convert binary to decimal, sum the products of each bit and its place value. For example, 1101₂ = 1·8 + 1·4 + 0·2 + 1·1 = 13₁₀. The calculator performs this instantly and displays the bit‑by‑bit breakdown.

💡 Binary Addition Example

1101₂ (13) + 1010₂ (10) = 10111₂ (23). Binary addition follows simple rules: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (carry 1).

Bitwise Operations Explained

Bitwise operators act 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 differ. NOT flips all bits. Shift left (SHL) moves bits leftward, effectively multiplying by 2ⁿ. Shift right (SHR) moves bits rightward, dividing by 2ⁿ. These operations are essential in low‑level programming, cryptography, and hardware design.

Hexadecimal and Octal

Hexadecimal (base‑16) and octal (base‑8) provide compact representations of binary. One hex digit corresponds to 4 bits; one octal digit to 3 bits. This makes them convenient for reading and writing binary values in computing contexts like memory addresses, color codes, and file permissions.

Frequently Asked Questions

What is a byte?

A byte is 8 bits, capable of representing 256 values (0–255). It is the standard unit of digital storage.

How do I convert negative numbers to binary?

Use two's complement: invert all bits and add 1. The calculator handles unsigned integers; for signed operations, consider the bit width.

Why does binary only use 0 and 1?

Digital circuits operate on two voltage levels—high (1) and low (0). Binary aligns perfectly with this on/off behavior.

What is the difference between >> and >>>?

>> preserves the sign bit (arithmetic shift), while >>> fills with zeros (logical shift). This calculator uses unsigned (>>>) shifts.