Do you know?
[AE] Codes, adders, MUX and DEMUX - part 1
- Fact 1 of 12๐ค
ASCII has 128 characters
7-bit ASCII gives 2^7 = 128 characters. Why: 7 bits cover English letters, digits and symbols. Your phone's SMS text uses this set. Recall: How many characters does 7-bit ASCII hold? Answer: 128.
- Fact 2 of 12๐
Capital A is 65 in ASCII
Capital 'A' is 65 and small 'a' is 97. Why: small letters are capital plus 32, so one bit flips the case. Like typing caps on a phone keypad. Recall: ASCII value of 'a'? Answer: 97.
- Fact 3 of 12๐ข
Digit 0 is 48 in ASCII
The character '0' has ASCII code 48, so digit value = code minus 48. Why: exam questions often convert codes to digits. Example: a printed bill stores each digit as its own code. Recall: ASCII code of '7'? Answer: 55.
- Fact 4 of 12๐งพ
ASCII: 33 control, 95 printable
Standard ASCII has 128 codes: 33 control codes and 95 printable characters (32 to 126). Why: control codes like tab and newline guide printers and screens. Recall: How many printable ASCII characters? Answer: 95.
- Fact 5 of 12๐
Gray code changes one bit at a time
In Gray code, each number differs from the next by exactly one bit. Why: fewer bit changes mean fewer reading errors. Used in rotary position sensors, like a motor shaft encoder. Recall: How many bits change per Gray step? Answer: one.
- Fact 6 of 12๐
Gray code named after Frank Gray
Frank Gray of Bell Labs patented this code in 1953. Why: it is also called reflected binary code, from its mirror pattern. Recall: Who patented Gray code? Answer: Frank Gray.
- Fact 7 of 12๐งฎ
Binary to Gray: G = B XOR (B >> 1)
Formula: G = B XOR (B >> 1), where >> means shift right by one bit. Example: binary 011 gives Gray 010. Why: this one-line rule converts any binary number to Gray. Recall: Gray code of binary 011? Answer: 010.
- Fact 8 of 12๐
Gray code wraps around
The 3-bit Gray sequence is 000, 001, 011, 010, 110, 111, 101, 100. Why: the last code 100 differs from the first, 000, by one bit, so it is cyclic and counters loop smoothly. Recall: Gray code that comes after 100? Answer: 000.
- Fact 9 of 12โ
Excess-3 is BCD plus 3
Excess-3 code equals BCD plus 3. Example: decimal 5 is 0101 in BCD, so its excess-3 code is 1000. Why: this code is used for decimal arithmetic in some early machines. Recall: Excess-3 code of 2? Answer: 0101.
- Fact 10 of 12๐
Excess-3 inversion gives 9's complement
Inverting all bits of an excess-3 code gives the 9's complement. Example: 4 is 0111, inverted gives 1000, which is 5. Why: this makes decimal subtraction circuits simpler. Recall: Inverted excess-3 of 4 gives which digit? Answer: 5.
- Fact 11 of 120๏ธโฃ
Excess-3 zero is 0011
Decimal 0 is 0011 in excess-3, not 0000 as in BCD. Why: 0000 is an invalid excess-3 code, which helps catch errors. Example: a zero shown on a digital display uses 0011. Recall: Excess-3 code of zero? Answer: 0011.
- Fact 12 of 12๐
ASCII first published in 1963
ASCII was first published in 1963 by the American Standards Association. Why: it let different machines and keyboards exchange text. Your phone and computer still use its first 128 codes. Recall: Year ASCII was first published? Answer: 1963.
