Computer Science / CS 0245 · Procedure · 60–90 seconds
One String, Four Readings
to the StudyWalks catalog
A single bit string decodes to different values under different declared types — and running one string through four readings proves the type, not the bits, carries the meaning.
Take the three bits 101. Reading one, unsigned: positions score 1 times four, 0 times two, 1 times one — the value 5. Reading two, sign-magnitude: the leading 1 means negative, the remaining 01 means one — the value negative 1. Reading three, one's complement: the leading 1 says negative and flip to decode; flipping 101 gives 010, which is 2 — the value negative 2. Reading four, two's complement: negative again, and decoding takes the one's complement plus one; 010 plus 1 is 011, which is 3 — the value negative 3. Four declared types, four honest answers from the same three bits: 5, negative 1, negative 2, negative 3. Nothing about the string changed. The reading rules did all the deciding, which is exactly what video 0238 claimed.
A decoded value with no stated type attached is an answer to an unasked question.
Unlocks
- Nothing yet depends on this.