an algorithm for decimal to binary conversion