If there is a remainder write down 1 by the side.
If not write a 1.
Continue until zero.
Read off the binary number starting with the last remainder.
Copyright Graham Knott 2004