Skip to main content

Online Calculators and Tools | Calculators Toolbox

Binary Converter

This binary converter changes decimal numbers to binary and binary back to decimal, with every step explained.
Home / Binary Converter
Binary Converter illustration showing a glowing microchip with streams of light pulses flowing out as rows of on and off switches
Binary Converter

Calculation Explanation

Free tool by Binary Converter – CalculatorsToolbox

Binary Converter – Decimal to Binary and Binary to Decimal

Our free binary converter turns decimal numbers into binary and binary back into decimal, with the full division or place-value working shown. Every result also includes the hexadecimal and octal equivalents.

What Is Binary?

Binary is a number system that uses only two digits, 0 and 1. It's also called base 2. Our everyday decimal system is base 10: each place is worth ten times the one to its right (ones, tens, hundreds). In binary, each place is worth twice the one to its right: ones, twos, fours, eights, sixteens and so on.

Computers use binary because their circuits have two stable states, on and off, which map perfectly onto 1 and 0. With a binary converter you can see how every number, letter, photo and video on your device is ultimately stored: as long strings of binary digits, or bits. Eight bits make a byte, which can represent any value from 0 to 255.

How to Convert Decimal to Binary

Divide the number by 2 repeatedly and record the remainders. Reading the remainders from the last one to the first gives the binary number.

Decimal → Binary: divide by 2, keep remainders, read bottom to top  |  Binary → Decimal: Σ (digit × 2position)

For 156: 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, 39 ÷ 2 = 19 r 1, 19 ÷ 2 = 9 r 1, 9 ÷ 2 = 4 r 1, 4 ÷ 2 = 2 r 0, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading upward gives 10011100. To go back, add the place values where there's a 1: 128 + 16 + 8 + 4 = 156.

Example Calculations:

156 to binary1001 1100₂
255 to binary1111 1111₂ (one full byte)
101101₂ to decimal32 + 8 + 4 + 1 = 45
1000000000₂ to decimal2⁹ = 512

How to Use the Binary Converter

  1. To convert a regular number, stay on Decimal → Binary and type it in. Large numbers up to 30 digits are supported.
  2. The binary result appears instantly, grouped in blocks of four bits for easy reading, along with the hex and octal values.
  3. To decode binary, switch to Binary → Decimal and enter a string of 0s and 1s. Spaces and a 0b prefix are ignored.
  4. The explanation box shows the repeated division or the place-value sum used.

Where Binary Is Used

Computer Processors

Every instruction a CPU runs and every number it adds is handled in binary at the transistor level.

IP Addresses and Subnets

Network engineers convert IP addresses like 192.168.1.1 to binary (11000000.10101000.00000001.00000001) to work out subnet masks.

Colors

Each red, green and blue channel of a screen pixel is stored as one byte, a value from 00000000 to 11111111.

Text Encoding

The letter A is 65 in ASCII, which is 01000001 in binary.

Permissions and Flags

Software stores yes/no settings as individual bits, packing eight options into a single byte.

Computer Science Classes

Binary conversion is a core skill in intro programming, digital logic and IT certification courses.

Binary Concepts Explained

Bits and Bytes

A bit is one binary digit. A byte is 8 bits and can hold 2⁸ = 256 values (0–255). A kilobyte is 1,024 bytes in binary terms, because 2¹⁰ = 1,024.

Place Values

From right to left, binary places are worth 1, 2, 4, 8, 16, 32, 64, 128, and so on, each double the last.

Example: 1101₂ = 8 + 4 + 0 + 1 = 13.

Negative Numbers

Computers usually store negative numbers using two's complement: invert all the bits and add 1. In 8 bits, −5 is 11111011. This converter shows negatives with a simple minus sign, the mathematical form.

Binary and Hexadecimal

Each group of four bits matches exactly one hex digit, which is why programmers use hex as shorthand for binary. 1001 1100 = 9C. Convert directly with our hex converter.

Tips for Working With Binary

  • Memorize the powers of 2 up to 2¹⁰ = 1,024; they make mental conversion quick.
  • Group bits in fours from the right to read long binary numbers easily.
  • A binary number ending in 0 is even; ending in 1 is odd.
  • Adding a 0 to the right of a binary number doubles it, just as adding a 0 in decimal multiplies by 10.
  • n bits can represent 2ⁿ different values, from 0 to 2ⁿ − 1.
  • Leading zeros don't change the value: 00101 is the same as 101.

Decimal to Binary Table

DecimalBinaryDecimalBinary
0091001
11101010
210151111
311161 0000
41003210 0000
510164100 0000
6110100110 0100
71111281000 0000
810002551111 1111

Step-by-Step Worked Example

Convert 1100 1010₂ to decimal.

  1. Write the place values above each bit, from right to left: 128, 64, 32, 16, 8, 4, 2, 1.
  2. Line them up with the bits 1, 1, 0, 0, 1, 0, 1, 0.
  3. Keep the place values under a 1: 128, 64, 8 and 2.
  4. Add them: 128 + 64 + 8 + 2 = 202.

Check it in reverse with the Decimal → Binary tab of the binary converter: 202 converts back to 1100 1010, and its hex value is CA.

A Short History of Binary

The German mathematician Gottfried Wilhelm Leibniz described the modern binary system in 1703, fascinated by how every number could be written with just 0 and 1. More than two centuries later, Claude Shannon showed in 1937 that electrical switching circuits could carry out binary logic, laying the foundation for digital computers. Today, billions of transistors switching between two states every second make binary the language behind all modern technology.

Binary Arithmetic Basics

Adding in binary follows the same carrying idea as decimal, just with smaller numbers: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1), and 1 + 1 + 1 = 11 (write 1, carry 1). For example, 0110 (6) + 0111 (7) = 1101 (13). Multiplying by 2 is even easier: shift every bit one place to the left and add a 0 at the end, so 1101 becomes 11010 (26). Computers use these simple rules billions of times a second.

Common Binary Mistakes

The most frequent error when converting by hand is reading the remainders in the wrong order. They must be read from the last division back to the first, so the final remainder becomes the leftmost bit. Another slip is skipping a place value when converting back to decimal, especially in long numbers with several zeros in a row. Grouping bits in fours and writing the place values above them, as shown in the worked example, prevents both problems.

Why Use Our Binary Converter?

Our binary converter works in both directions, handles very large numbers exactly, groups bits for readability, and shows hex and octal equivalents with every result. The step-by-step explanation makes it ideal for computer science students, network engineers, programmers and anyone curious about how computers count.

Frequently Asked Questions

Quick answers to common questions related to Binary Converter are as under:-

How do you convert decimal to binary?

Divide the number by 2 repeatedly, writing down the remainder each time. When you reach 0, read the remainders from the last to the first. For example, 13 becomes 1101.

How do you convert binary to decimal?

Multiply each binary digit by 2 raised to its position, starting from 0 on the right, and add the results. 1011 = 8 + 0 + 2 + 1 = 11.

What is 255 in binary?

255 in binary is 11111111, eight ones. It is the largest value that fits in one byte.

Why do computers use binary?

Computer circuits have two reliable states, on and off, which map naturally onto the digits 1 and 0. This makes binary simple and dependable to build into hardware.

How many values can 8 bits represent?

Eight bits can represent 2⁸ = 256 different values, from 0 to 255.

What is the binary number system called?

It is called base 2, because it uses only two digits, 0 and 1.

Latest from Our Blog

Explore helpful tips, updates, and guides on calculators, AI tools, and conversions.