Computers use two states of activity, on and off. Represented arithmetically, they are 1 and 0 respectively. Having only two possible states to exist in, it is termed a binary system.
The state of the computer's activity is the value of a bit of information in a computer. So, a bit can be on (1) or off (0).
When several bits are joined together, it is called a byte. Often the number of bits is added onto the word 'byte' to differentiate it from other bytes of a bigger size. For example, a 4-bit byte can be represented by any of the following:
0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111.
In all, there are sixteen combinations. As with base 10 or decimal numbers, the rightmost digit is the smallest number, the same is true for binary numbers as it is in base 2. Since there are four bits in each of the above numbers, there are a maximum of 24 or 2 x 2 x 2 x 2 combinations, which is of course 16. An 8-bit byte has a maximum of 24 = 256 combinations.
For a four bit byte,
binary 0000 is decimal 0,
binary 0001 is decimal 1,
binary 0010 is decimal 2,
binary 0011 is decimal 3,
binary 0100 is decimal 4,
binary 0101 is decimal 5,
binary 0110 is decimal 6,
binary 0111 is decimal 7,
binary 1000 is decimal 8,
binary 1001 is decimal 9,
binary 1010 is decimal 10,
binary 1011 is decimal 11,
binary 1100 is decimal 12,
binary 1101 is decimal 13,
binary 1110 is decimal 14,
binary 1111 is decimal 15
That is,
binary [23][22][21][20] is decimal [8][4][2][1]
For binary 1111 we would have decimal 8 + 4 + 2 + 1 = 15. So if we converted these 4-bit binary numbers they would have a decimal equivalent, ranging from 0 to 15 inclusively, that is, sixteen numbers in all.
This can be extended for any number of bits as following binary arithmetic.
binary [27][26][25][24][23][22][21][20] is decimal [128][64][32][16][8][4][2][1]
Notice that from the right, the first bit is the lowest bit, whilst the highest bit of the eighth bit of the eight bit byte.
Another popular number base when talking about computers is a base 8 or Octal number system. The digits this time can exist in eight states, 0, 1, 2, 3, 4, 5, 6, and 7.
Octal [83][82][81][80] is decimal [512][64][8][1]
So, Octal 7124 = decimal (7 x 512) + (1 x 64) + (2 x 8) + (4 x 1) = decimal 3668
On a similar bent, each digit of base 16 or Hexadecimal can exist in one of sixteen states, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The letters are used because in our written orthography, there just aren't enough digits to cover the sixteen numbers as a single digit. Therefore, A=10, B=11, C=12, D=13, E=14, F=15, together with the ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, there are sixteen individual numbers.
hexadeciaml [163][162][161][160] is decimal [65536][256][16][1]
A two digit Hexadecimal number 9F = decimal (9 x 16) + (F x 1) = (9 x 16) + (15 x 1) = decimal 159.
These are represented by the first 128 alloted characters in the ASCII set.
ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ||||||||
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||||||||
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ||||||||
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ||||||||
32 | ! | 33 | " | 34 | # | 35 | $ | 36 | % | 37 | & | 38 | ' | 39 | |
( | 40 | ) | 41 | * | 42 | + | 43 | , | 44 | - | 45 | . | 46 | / | 47 |
0 | 48 | 1 | 49 | 2 | 50 | 3 | 51 | 4 | 52 | 5 | 53 | 6 | 54 | 7 | 55 |
8 | 56 | 9 | 57 | : | 58 | ; | 59 | < | 60 | = | 61 | > | 62 | ? | 63 |
@ | 64 | A | 65 | B | 66 | C | 67 | D | 68 | E | 69 | F | 70 | G | 71 |
H | 72 | I | 73 | J | 74 | K | 75 | L | 76 | M | 77 | N | 78 | O | 79 |
P | 80 | Q | 81 | R | 82 | S | 83 | T | 84 | U | 85 | V | 86 | W | 87 |
X | 88 | Y | 89 | Z | 90 | [ | 91 | \ | 92 | ] | 93 | ^ | 94 | _ | 95 |
` | 96 | a | 97 | b | 98 | c | 99 | d | 100 | e | 101 | f | 102 | g | 103 |
h | 104 | i | 105 | j | 106 | k | 107 | l | 108 | m | 109 | n | 110 | o | 111 |
p | 112 | q | 113 | r | 114 | s | 115 | t | 116 | u | 117 | v | 118 | w | 119 |
x | 120 | y | 121 | z | 122 | { | 123 | | | 124 | } | 125 | ~ | 126 | | 127 |
These are the remaining 128 characters of the ASCII set.
ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec | ASCII | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 128 | | 129 | | 130 | | 131 | | 132 | 133 | | 134 | | 135 | |
| 136 | | 137 | | 138 | | 139 | | 140 | | 141 | | 142 | | 143 |
| 144 | | 145 | | 146 | | 147 | | 148 | | 149 | | 150 | | 151 |
| 152 | | 153 | | 154 | | 155 | | 156 | | 157 | | 158 | | 159 |
160 | ¡ | 161 | ¢ | 162 | £ | 163 | ¤ | 164 | ¥ | 165 | ¦ | 166 | § | 167 | |
¨ | 168 | © | 169 | ª | 170 | « | 171 | ¬ | 172 | | 173 | ® | 174 | ¯ | 175 |
° | 176 | ± | 177 | ² | 178 | ³ | 179 | ´ | 180 | µ | 181 | ¶ | 182 | · | 183 |
¸ | 184 | ¹ | 185 | º | 186 | » | 187 | ¼ | 188 | ½ | 189 | ¾ | 190 | ¿ | 191 |
À | 192 | Á | 193 | Â | 194 | Ã | 195 | Ä | 196 | Å | 197 | Æ | 198 | Ç | 199 |
È | 200 | É | 201 | Ê | 202 | Ë | 203 | Ì | 204 | Í | 205 | Î | 206 | Ï | 207 |
Ð | 208 | Ñ | 209 | Ò | 210 | Ó | 211 | Ô | 212 | Õ | 213 | Ö | 214 | × | 215 |
Ø | 216 | Ù | 217 | Ú | 218 | Û | 219 | Ü | 220 | Ý | 221 | Þ | 222 | ß | 223 |
à | 224 | á | 225 | â | 226 | ã | 227 | ä | 228 | å | 229 | æ | 230 | ç | 231 |
è | 232 | é | 233 | ê | 234 | ë | 235 | ì | 236 | í | 237 | î | 238 | ï | 239 |
ð | 240 | ñ | 241 | ò | 242 | ó | 243 | ô | 244 | õ | 245 | ö | 246 | ÷ | 247 |
ø | 248 | ù | 249 | ú | 250 | û | 251 | ü | 252 | ý | 253 | þ | 254 | ÿ | 255 |
As can be seen above, 7-bit ascii consists mainly those characters which can be accessed via the keyboard - the alphanumerics and various punctuation and symbolics. In the extended ascii set, we see a lot of characters belonging to accented characters and characters used in other orthographies, such as German, French and Icelandic.
This page was created on Friday 15th October 1999.
It was last updated on Thursday 7th December 2000.