Math Fundamentals18 sections · 814 units
Open in Course

Decimal to Binary Conversion

Writing binary numbers

To convert decimal to binary, repeatedly divide by 2 and track the remainders. The remainders, read in reverse, give you the binary representation.

Example: Convert 131013_{10} to binary. 13÷2=613 \div 2 = 6 remainder 11. 6÷2=36 \div 2 = 3 remainder 00. 3÷2=13 \div 2 = 1 remainder 11. 1÷2=01 \div 2 = 0 remainder 11. Reading remainders bottom-up: 110121101_2.

Why does this work? Each division by 2 extracts the least significant bit (rightmost digit). Dividing again extracts the next bit. You are peeling off bits from right to left, which is why you reverse the remainders.