convert between binary and ASCII