Education

Binary to Decimal Conversion: Step-by-Step Guide

By The hakaru Team·Last updated March 2026

Binary to decimal conversion is the process of translating a base-2 number (using only digits 0 and 1) into its base-10 equivalent. Every digital device, from smartphones to supercomputers, processes data in binary. Understanding this conversion is fundamental to computer science, networking, and digital electronics.

Quick Answer

  • 1. Method: Multiply each binary digit by 2 raised to its position (right to left, starting at 0), then sum all values.
  • 2. Example: binary 1101 = 1x8 + 1x4 + 0x2 + 1x1 = 13 in decimal.
  • 3. Modern CPUs contain billions of transistors, each operating as a binary switch (Apple M4: 28 billion, AMD Ryzen 9: 13 billion).
  • 4. Over 25% of new cars sold globally in 2025 were EVs, each relying on binary-controlled computer systems (IEA Global EV Outlook).

Convert between binary, decimal, octal, and hex instantly

Enter a number in any base to see its conversion to all other bases, plus step-by-step work.

Binary Calculator - Free

How Binary Numbers Work

The decimal system you use daily is base-10: each position represents a power of 10 (ones, tens, hundreds, thousands). Binary works identically but with base-2: each position represents a power of 2.

Position (right to left)Power of 2Decimal Value
0 (rightmost)201
1212
2224
3238
42416
52532
62664
727128

A binary digit (called a "bit") can only be 0 or 1. Eight bits make a byte, which can represent values from 0 (00000000) to 255 (11111111). This is the fundamental unit of data in computing.

How to Convert Binary to Decimal

The Positional Notation Method

This is the standard method taught in computer science courses. For each binary digit, multiply it by 2 raised to its position power, then add all the products together.

Example: Convert 11010110 to decimal

Bit11010110
Power2726252423222120
Value128640160420

Sum: 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214

The Doubling Method (Faster for Mental Math)

Start from the leftmost bit. For each subsequent bit: double your running total and add the current bit.

Example: Convert 1101 to decimal

  • Start with the leftmost bit: 1
  • Double and add next bit: 1 x 2 + 1 = 3
  • Double and add next bit: 3 x 2 + 0 = 6
  • Double and add next bit: 6 x 2 + 1 = 13

Result: binary 1101 = decimal 13. This method is faster because you process bits left to right without memorizing powers of 2.

How to Convert Decimal to Binary

Repeated Division by 2

Divide the decimal number by 2 repeatedly, recording the remainder at each step. Read the remainders from bottom to top.

Example: Convert 45 to binary

DivisionQuotientRemainder
45 / 2221
22 / 2110
11 / 251
5 / 221
2 / 210
1 / 201

Reading remainders bottom to top: 101101. Verify: 32 + 0 + 8 + 4 + 0 + 1 = 45.

Binary to Decimal Reference Table

BinaryDecimalBinaryDecimal
0000010008
0001110019
00102101010
00113101111
01004110012
01015110113
01106111014
01117111115

Binary in the Real World

IP Addresses and Networking

Every IPv4 address is actually a 32-bit binary number. The familiar dotted-decimal format (192.168.1.1) is a human-readable version where each of the four octets represents 8 bits. For example, 192.168.1.1 in binary is 11000000.10101000.00000001.00000001. Network administrators use binary to understand subnet masks, calculate network ranges, and troubleshoot routing issues.

Color Codes

Web colors use hexadecimal notation (#FF5733), which is a compact representation of binary. Each color channel (Red, Green, Blue) uses 8 bits (one byte), allowing 256 levels per channel. #FF5733 breaks down to Red = FF (11111111 = 255), Green = 57 (01010111 = 87), Blue = 33 (00110011 = 51).

File Sizes and Storage

File sizes are measured in binary units: 1 kilobyte = 1,024 bytes (210), 1 megabyte = 1,048,576 bytes (220), 1 gigabyte = 1,073,741,824 bytes (230). This is why a "500 GB" hard drive shows slightly less usable space in your operating system: drive manufacturers use decimal (500 x 109 bytes) while operating systems report in binary gigabytes.

Character Encoding

Every character you type is stored as a binary number. In ASCII encoding, the letter "A" is 01000001 (decimal 65), "B" is 01000010 (decimal 66), and so on. Unicode extends this to represent every writing system on earth, using up to 32 bits per character for over 4 billion possible symbols.

Binary Arithmetic Basics

Binary addition follows the same logic as decimal addition but with only two digits:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (0, carry 1)
  • 1 + 1 + 1 = 11 (1, carry 1)

Example: 1011 + 1101 = 11000 (decimal: 11 + 13 = 24)

The Bottom Line

Binary to decimal conversion is a foundational skill in computer science. The positional method (multiplying each bit by its power of 2 and summing) is the standard approach, while the doubling method works well for mental math. Whether you are studying for an AP Computer Science exam, working with networking addresses, or debugging low-level code, understanding binary is essential.

Convert between binary, decimal, octal, and hexadecimal instantly with our free binary calculator.

Frequently Asked Questions

What is binary and why do computers use it?

Binary is a base-2 number system that uses only two digits: 0 and 1. Computers use binary because their electronic circuits have two natural states: on (voltage present, represented as 1) and off (no voltage, represented as 0). This maps perfectly to transistors, which are the fundamental building blocks of all computer processors. Modern CPUs contain billions of transistors, each acting as a tiny switch. Every piece of data you interact with on a computer (text, images, video, software) is ultimately stored and processed as sequences of 0s and 1s.

How do you convert binary 10110 to decimal?

To convert binary 10110 to decimal, multiply each digit by its positional power of 2 (reading right to left, starting from 2^0): 0 x 2^0 = 0, 1 x 2^1 = 2, 1 x 2^2 = 4, 0 x 2^3 = 0, 1 x 2^4 = 16. Add the results: 0 + 2 + 4 + 0 + 16 = 22. So binary 10110 equals decimal 22.

How do you convert decimal 156 to binary?

Use the repeated division method: divide by 2 and record the remainders. 156 / 2 = 78 remainder 0. 78 / 2 = 39 remainder 0. 39 / 2 = 19 remainder 1. 19 / 2 = 9 remainder 1. 9 / 2 = 4 remainder 1. 4 / 2 = 2 remainder 0. 2 / 2 = 1 remainder 0. 1 / 2 = 0 remainder 1. Reading the remainders from bottom to top gives: 10011100. So decimal 156 equals binary 10011100.

What is the largest decimal number that 8 bits (1 byte) can represent?

With 8 bits, the largest unsigned integer is 11111111 in binary, which equals 255 in decimal (128 + 64 + 32 + 16 + 8 + 4 + 2 + 1). The range of an unsigned 8-bit number is 0 to 255, providing 256 possible values (2^8). If one bit is reserved for the sign (positive/negative), a signed 8-bit integer ranges from -128 to 127. This is why pixel color values in images range from 0 to 255 for each RGB channel, as each channel uses exactly one byte.

What is the difference between binary, octal, and hexadecimal?

These are all positional number systems with different bases. Binary is base-2 (digits 0-1), octal is base-8 (digits 0-7), and hexadecimal is base-16 (digits 0-9 and A-F). They are all used in computing because they convert cleanly to binary: each octal digit represents exactly 3 binary digits, and each hex digit represents exactly 4 binary digits. For example, binary 11111111 = octal 377 = hexadecimal FF = decimal 255. Hexadecimal is especially popular for representing memory addresses, color codes (#FF0000 for red), and MAC addresses because it is more compact than binary while still mapping directly to bits.

Convert binary, decimal, octal, and hex

Enter a number in any base and get instant conversions to all other number systems with step-by-step work.

Binary Calculator - Free