Code to convert decimal to binary and back