Circuits & Digital Logic

Req 4b — Binary & Decimal Conversion

4b.
Show how to change three decimal numbers into binary numbers and three binary numbers into decimal numbers.

In Req 4a, you learned that digital electronics speak in binary — a number system with only two digits: 0 and 1. Now you need to become fluent in translating between the decimal system (the base-10 system you use every day) and binary (the base-2 system that every computer uses internally).

Why Binary Matters

Computers use binary because transistors — the tiny switches inside every chip — have two states: on (1) and off (0). A single binary digit is called a bit. Eight bits grouped together form a byte, which can represent any number from 0 to 255. Every number, letter, color, and sound in a computer is ultimately stored as a pattern of bits.

Understanding Place Values

The key to conversion is understanding place values. In the decimal system, each position is worth 10 times more than the one to its right:

PositionThousandsHundredsTensOnes
Place value1000100101
Power of 1010^310^210^110^0

Binary works the same way, but each position is worth 2 times more than the one to its right:

Position128s64s32s16s8s4s2s1s
Place value1286432168421
Power of 22^72^62^52^42^32^22^12^0

Decimal to Binary — The Division Method

To convert a decimal number to binary, repeatedly divide by 2 and record the remainders. Read the remainders from bottom to top.

Example: Convert 42 to binary

StepDivisionQuotientRemainder
142 / 2210
221 / 2101
310 / 250
45 / 221
52 / 210
61 / 201

Reading the remainders from bottom to top: 42 in decimal = 101010 in binary.

Example: Convert 13 to binary

StepDivisionQuotientRemainder
113 / 261
26 / 230
33 / 211
41 / 201

Reading bottom to top: 13 = 1101

Example: Convert 200 to binary

StepDivisionQuotientRemainder
1200 / 21000
2100 / 2500
350 / 2250
425 / 2121
512 / 260
66 / 230
73 / 211
81 / 201

Reading bottom to top: 200 = 11001000

Binary to Decimal — The Addition Method

To convert binary to decimal, write out the place values above each bit, then add up the place values wherever you see a 1.

Example: Convert 110101 to decimal

Place value32168421
Binary digit110101

Add the place values where the digit is 1: 32 + 16 + 4 + 1 = 53

Example: Convert 10010 to decimal

Place value168421
Binary digit10010

Add: 16 + 2 = 18

Example: Convert 11111111 to decimal

Place value1286432168421
Binary digit11111111

Add: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

Quick Check — Place Value Method for Decimal to Binary

There is a faster method that some people prefer. Start with the largest power of 2 that fits into your number, subtract it, and continue:

Convert 45 to binary:

Result: 45 = 101101

A visual reference card showing the powers of 2 from 1 to 128 with worked examples of decimal-to-binary and binary-to-decimal conversions
RapidTables Binary-Decimal Converter Online converter to check your work. Convert back and forth between binary and decimal to verify your manual calculations.