added binary number printing

Added format option for printing binary numbers to an output.