add binToHex(), printBin() and padBin()

methods for handling binary strings and converting binary strings to
hexadecimal strings.