This page has not been looked at yet My apologies for any issues this may cause.
3.1 : ASCII
While there are many different character sets, the one we're gonna focus on is ASCII. ASCII stands for the American Standard Code for Information Interchange. It's a character set which means it was created for computers to display information. As we know, computers can only store 0s and 1s. However, what if we want to display the text "Hello"? We cannot store the letters themselves in the computers code. ASCII is a 7 bit binary code for each letter. Typically the 7 bits are separated into a set of 3 and 4 with a space. This is only for readability purposes. These 7 bits allows strings of text to be stored within the computer to be displayed later. ASCII has 128 characters in the table. I have been very generous and listed them all below.
Binary | Decimal | Character | Binary | Decimal | Character | Binary | Decimal | Character | Binary | Decimal | Character | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
000 0000 | 0 | NUL (null) | 010 0000 | 32 | Space | 100 0000 | 64 | @ | 110 0000 | 96 | ` | |
000 0001 | 1 | SOH (start of heading) | 010 0001 | 33 | ! | 100 0001 | 65 | A | 110 0001 | 97 | a | |
000 0010 | 2 | STX (start of text) | 010 0010 | 34 | " | 100 0010 | 66 | B | 110 0010 | 98 | b | |
000 0011 | 3 | ETX (end of text) | 010 0011 | 35 | # | 100 0011 | 67 | C | 1100001 | 99 | c | |
000 0100 | 4 | EOT (end of transmission) | 010 0100 | 36 | $ | 100 0100 | 68 | D | 110 0100 | 100 | d | |
000 0101 | 5 | ENQ (enquiry) | 010 0101 | 37 | % | 100 0101 | 69 | E | 110 0101 | 101 | e | |
000 0110 | 6 | ACK (acknowledge) | 010 0110 | 38 | & | 100 0110 | 70 | F | 110 0110 | 102 | f | |
000 0111 | 7 | BEL (bell) | 010 0111 | 39 | ' | 100 0111 | 71 | G | 110 0111 | 103 | g | |
000 1000 | 8 | BS (backspace) | 010 1000 | 40 | ( | 100 1000 | 72 | H | 110 1000 | 104 | h | |
000 1001 | 9 | TAB (horizontal tab) | 010 1001 | 41 | ) | 100 1001 | 73 | I | 110 1001 | 105 | i | |
000 1010 | 10 | LF (new line) | 010 1010 | 42 | * | 100 1010 | 74 | J | 110 1010 | 106 | j | |
000 1011 | 11 | VT (vertical tab) | 010 1011 | 43 | + | 100 1011 | 75 | K | 110 1011 | 107 | k | |
000 1100 | 12 | FF (new page) | 010 1100 | 44 | , | 100 1100 | 76 | L | 110 1100 | 108 | l | |
000 1101 | 13 | CR (carriage return) | 010 1101 | 45 | - | 100 1101 | 77 | M | 110 1101 | 109 | m | |
000 1110 | 14 | SO (shift out) | 010 1110 | 46 | . | 100 1110 | 78 | N | 110 1110 | 110 | n | |
000 1111 | 15 | SI (shift in) | 010 1111 | 47 | / | 100 1111 | 79 | O | 110 1111 | 111 | 0 | |
001 0000 | 16 | DLE (data link escape) | 011 0000 | 48 | 0 | 101 0000 | 80 | P | 111 0000 | 112 | p | |
001 0001 | 17 | DC1 (device control 1) | 011 0001 | 49 | 1 | 101 0001 | 81 | Q | 111 0001 | 113 | q | |
001 0010 | 18 | DC2 (device control 2) | 011 0010 | 50 | 2 | 101 0010 | 82 | R | 111 0010 | 114 | r | |
001 0011 | 19 | DC3 (device control 3) | 011 0011 | 51 | 3 | 101 0011 | 83 | S | 111 0011 | 115 | s | |
001 0100 | 20 | DC4 (device control 4) | 011 0100 | 52 | 4 | 101 0100 | 84 | T | 111 0100 | 116 | t | |
001 0101 | 21 | NAK (negative acknowledge) | 011 0101 | 53 | 5 | 101 0101 | 85 | U | 111 0101 | 117 | u | |
001 0110 | 22 | SYN (synchronous idle) | 011 0110 | 54 | 6 | 101 0110 | 86 | V | 111 0110 | 118 | v | |
001 0111 | 23 | ETB (end of trans. block) | 011 0111 | 55 | 7 | 101 0111 | 87 | W | 111 0111 | 119 | w | |
001 1000 | 24 | CAN (cancel) | 011 1000 | 56 | 8 | 101 1000 | 88 | X | 111 1000 | 120 | x | |
001 1001 | 25 | EM (end of medium) | 011 1001 | 57 | 9 | 101 1001 | 89 | Y | 111 1001 | 121 | y | |
001 1010 | 26 | SUB (substitute) | 011 1010 | 58 | : | 101 1010 | 90 | Z | 111 1010 | 122 | z | |
001 1011 | 27 | ESC (escape) | 011 1011 | 59 | ; | 101 1011 | 91 | [ | 111 1011 | 123 | { | |
001 1100 | 28 | FS (file separator) | 011 1100 | 60 | < | 101 1100 | 92 | \ | 111 1100 | 124 | | | |
001 1101 | 29 | GS (group separator) | 011 1101 | 61 | = | 101 1101 | 93 | ] | 111 1101 | 125 | } | |
001 1110 | 30 | RS (record separator) | 011 1110 | 62 | > | 101 1110 | 94 | 111 1110 | 126 | |||
001 1111 | 31 | US (unit separator) | 011 1111 | 63 | ? | 101 1111 | 95 | _ | 111 1111 | 127 | DEL |
Displaying Information
So now that we know how to represent each character, let's use this in practice. Let's say we want to display the string, "I'm Charlie". I chose this phrase because it has lowercase letters, capital letters, punctuation, spaces, and I am, in fact, Charlie.
As you can see the process is very simple. Translate the characters into numbers using the chart, then concatenate. While using binary is most common, you can also use the base-10 numbers. I chose binary because that's what computers read. You should try this on your own with your own phrases.