Decimal to Binary
Repeatedly divide by 2, record remainders (read bottom to top)Divide the decimal number by 2 repeatedly. The remainders (0 or 1) read from bottom to top form the binary representation.
Where:
n= The decimal number to convertremainder= n % 2 at each step (0 or 1), forms binary digits