Space and the printable range — binary and text

corewhere the control characters end

Answer

00100000 01111110

Why this example is worth doing

Space is 32, the first printable character, and everything below it is a control code — newline at 10, carriage return at 13, tab at 9. The page tabulates the ones that matter and makes the point that a binary string decoding to invisible output is usually control characters rather than a failed conversion. It also flags the line-ending difference between platforms, which is where pasted data most often goes wrong.

Try your own input in the Binary ⇄ text / ASCII. Convert text to binary and back, byte by byte, with the full UTF-8 breakdown.

How the answer is reached

ASCII encoding of 2 characters

ASCII: one byte per character, the high bit always zero.

ASCII encoding of 2 characters — columns character, code point, decimal, hex, binary, template
charactercode pointdecimalhexbinarytemplate
U+00203220001000000xxxxxxx
~U+007E1267E011111100xxxxxxx
Three different numbers; the UI must show all three — ASCII encoding of 2 characters
countvalue
bytes2
code points2
UTF-16 code units2

Compare with

Open this example in the Binary ⇄ text / ASCII

The field arrives filled in with this example’s input.

Note:

Notation this page assumes

  • Bit strings are written most significant bit first, and bit 0 is the least significant bit.
  • A width is stated explicitly wherever it changes the answer; nothing is silently sign-extended or truncated.
  • ASCII is the 7-bit set padded to one byte; UTF-8 is shown byte by byte, so a non-ASCII character is more than eight bits.

Sources

  • ANSI X3.4 / ISO-IEC 646, the ASCII character set
  • The Unicode Standard, Annex on the UTF-8 encoding form