Binary Code Examples
A bit string does not label its own encoding. These examples keep the assumptions visible: unsigned numbers, a five-bit teaching alphabet, and ASCII or UTF-8 text can give different answers to the same digits.
What do these short sequences mean?
00101 is decimal five and E in this site's A1Z26 scheme, but not a complete eight-bit byte. ITA2 assigns another meaning, so five-bit does not identify a unique alphabet.
| Bits | Unsigned decimal | 5-bit A1Z26 | Text context |
|---|---|---|---|
| 00101 | 5 | E | Incomplete 8-bit byte |
| 01101 | 13 | M | Incomplete 8-bit byte |
| 01001 | 9 | I | Incomplete 8-bit byte |
| 10101 | 21 | U | Incomplete 8-bit byte |
| 01010 | 10 | J | Incomplete 8-bit byte |
| 101 | 5 | E only after padding to 00101 | Incomplete 8-bit byte |
| 0010110 | 22 | Incomplete 5-bit groups | 7-bit ASCII SYN control, not a letter |
Explain any added zeroes
Padding 101 to 00101 preserves the unsigned value five but assumes it is one A1Z26 group. Padding it to 00000101 gives ASCII ENQ, a control value, not E.
Adding a bit can shift every subsequent byte boundary. Keep the original stream and document padding or correction before sharing an interpretation.
Complete bytes are not always printable text
Start with a known short message to check your grouping. Hi needs two bytes. A single byte can be valid but non-printing, or invalid under the selected encoding.
| Bits | Chosen interpretation | Result |
|---|---|---|
| 01001000 01101001 | UTF-8 / ASCII | Hi |
| 01000001 | UTF-8 / ASCII | A |
| 00001010 | UTF-8 / ASCII | Line feed |
| 11111111 | Unsigned integer | 255 |
| 11111111 | Strict UTF-8 | Error; no replacement output |
Read UTF-8 as a sequence
11000011 10101001 is é in UTF-8. Reading 195 and 169 as unrelated characters loses that interpretation. Compare code points and byte counts rather than assuming one byte per visible symbol.
These worked values are checked by local tests. They demonstrate the stated formats, not a way to detect the intent of an arbitrary unknown message.
Frequently asked questions
Can the same binary sequence have more than one correct meaning?
Yes, when different formats are specified. 00101 is unsigned decimal 5, A1Z26 E, or international ITA2 S in Letters state using numeric display. It is not a complete eight-bit text byte. These are conditional interpretations, not competing universal answers; the source's format determines which one applies.
PermalinkDoes 101 mean a letter, or just the number 5?
As an unsigned integer, 101 means 5 without further assumptions. Calling it a letter requires an encoding and possibly padding. In this site's A1Z26 scheme, padding to 00101 gives E; padding to eight-bit 00000101 gives ASCII ENQ, a non-printing control. Neither letter decoding is justified by the original three bits alone.
PermalinkWhen is it reasonable to add leading zeroes?
Add zeroes only when the source format justifies a known field width. Leading zeroes preserve an unsigned number's value, but text streams depend on exact character boundaries. Keep the original sequence and document any padding. Do not insert bits until a desired word appears; recover missing data or confirm the convention with the source.
PermalinkWhat is a simple complete message I can use to check a decoder?
Use 01001000 01101001 for Hi with UTF-8 or eight-bit ASCII selected. The byte values are decimal 72 and 105, representing H and i. This checks a known ASCII-range message, not every UTF-8 case. Try the separate multi-byte examples as well if you need to verify accented letters or other scripts.
PermalinkWhy do 00001010 and 11111111 not give ordinary letters?
00001010 is line feed in ASCII and UTF-8, so it creates a line break instead of a printed letter. 11111111 is unsigned decimal 255 but is invalid UTF-8 by itself and outside strict ASCII. Having eight bits is not enough to guarantee a printable character, or even a valid text encoding.
PermalinkHow can 11000011 10101001 be one character instead of two?
UTF-8 reads those two bytes together as é, Unicode U+00E9. The byte values 195 and 169 are parts of one encoded code point, not two ASCII letters. Always decode the sequence using the stated encoding. Other Unicode characters can need three or four bytes, and a visible symbol can contain several code points.
PermalinkHow can I verify these examples or report a mismatch?
Copy an example into the tool matching its stated interpretation, then use the same encoding, group width, and ITA2 state or bit order. For text examples, encoding the expected text is another check. If a result differs, report the exact example, settings, expected output, and reference source. Do not include private messages in a correction report.
PermalinkSources & verification
Reference material used for this explanation. The examples are reproducible with the tools on this site; see how they are checked.
- RFC 20: ASCII format for network interchange
- Unicode Consortium: UTF-8, UTF-16, UTF-32 and BOM FAQ
- ITU-T S.1 (03/93), Table 1: International Telegraph Alphabet No. 2
Found a mismatch? Send a correction with a source.