Computer Science

Decimal to Binary Conversion

Convert a non-negative decimal integer to binary.

Repeatedly divide by 2 and read remainders in reverse order.

Formula Explanation

Repeated division by two generates binary digits from least significant to most significant.

Variables Explained

Remainder = Binary digit; Quotient = Result of integer division.

Solved Example

Convert decimal 13 to binary.
13 → remainders 1, 0, 1, 1 when read upward; answer = 1101₂.

Exam Tip

Read the remainders from bottom to top.