Binary to Decimal Calculator
Binary (base 2) is the fundamental number system of computing, using only 0s and 1s. Every number, character, and instruction in a computer is ultimately represented in binary. Converting between binary and decimal is a core skill for computer science students, network engineers, and programmers working at the bit level. This calculator converts binary strings to decimal, hexadecimal, and octal in both directions. For binary inputs, it also shows the 8-bit unsigned range (0-255) note and the two's complement signed interpretation for 8-bit values. Enter a binary string (like 1010 or 11111111) or a decimal integer and click Convert.
Binary to decimal reference
| Binary | Decimal | Hex | Note |
|---|---|---|---|
| 0000 0000 | 0 | 0x00 | Minimum 8-bit unsigned |
| 0000 0001 | 1 | 0x01 | |
| 0111 1111 | 127 | 0x7F | Max positive 8-bit signed |
| 1000 0000 | 128 | 0x80 | Min negative 8-bit signed (-128) |
| 1111 1110 | 254 | 0xFE | 2's complement = -2 |
| 1111 1111 | 255 | 0xFF | Max 8-bit unsigned; 2's complement = -1 |
Formula
Decimal = sum of (each bit x 2 to the power of its position, from right starting at 0)
8-bit 2's complement: if leading bit is 1, result = value - 256
Binary to decimal: frequently asked questions
How do you convert binary to decimal?
Each binary digit (bit) represents a power of 2, starting from 2^0 (= 1) on the right. Multiply each bit by its corresponding power of 2 and sum the results. For example, 1010 in binary: 0 x 2^0 = 0, 1 x 2^1 = 2, 0 x 2^2 = 0, 1 x 2^3 = 8. Total = 0 + 2 + 0 + 8 = 10 in decimal.
What is 2's complement?
Two's complement is the most common way to represent negative integers in binary. In an 8-bit signed integer, the leftmost bit is the sign bit: 0 means positive, 1 means negative. The range of an 8-bit signed integer is -128 to +127. To find the 2's complement of a binary number: invert all bits (flip 0s and 1s), then add 1. For example, 11111111 in 8-bit 2's complement = -(00000001) = -1.
What is the range of an 8-bit unsigned integer?
An 8-bit unsigned integer can hold values from 0 (00000000) to 255 (11111111). There are 2^8 = 256 possible values. An 8-bit signed integer (using 2's complement) ranges from -128 (10000000) to +127 (01111111), also 256 values. Unsigned integers are used when negative values are not needed; signed integers are used when both positive and negative values are required.
What is the relationship between binary, octal, and hexadecimal?
Binary, octal, and hex are all related to powers of 2. One octal digit represents exactly 3 binary bits (2^3 = 8). One hex digit represents exactly 4 binary bits (2^4 = 16). This makes conversion between binary and these bases very easy without going through decimal: group binary digits in threes for octal, or fours for hex, and convert each group independently.
How is binary used in computing?
All digital computers operate on binary at the hardware level. Every instruction, number, character, image, and video is ultimately stored as sequences of 0s and 1s. Modern CPUs process 64 bits at once (64-bit architecture). Binary arithmetic is the foundation of all computer arithmetic, logic gates, memory addressing, and networking protocols. Programming languages abstract this away, but understanding binary helps with low-level programming, debugging, and networking.
Official sources
- IEEE 754: IEEE Standard for Floating-Point Arithmetic.
- NIST: NIST definition of binary.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.