Code Systems
Last updated
Was this helpful?
Last updated
Was this helpful?
Bytes are dumb. They just contain patterns of ons and offs. If a byte contains 0100 0101, and you send it to the printer, it will print the letter ‘E.’ If you send it to the Instruction Register, the computer will execute a Jump instruction. If you send it to the Memory Address Register, it will select byte number 69 of the RAM. If you send it to one side of the Adder, it will add 69 to whatever is on the other side of the Adder. If you send it to the display screen, it will set three pixels on and five pixels off.
(Scott, J Clark. But How Do It Know? - The Basic Principles of Computers for Everyone)
Computers internally only work with zeroes and ones. This appears to pose a problem to anyone who, for example, wants to use a computer to process text with letters and other symbols. How can a computer represent letters, when all it can store and process are 0 and 1?
The answer lies in the permutations we can obtain with a given sequence of zeroes and ones. Say we have 8 bits (that is, 8 switches that can either be on = 1 or off = 0). With those 8 bits, we can create different permutations of zeroes and ones. We can assign a symbol to each of those permutations, and we arrive at what we call a code system. A symbol can be anything we like. When we look at text processing, a symbol might be A, B, C, 1, 2, 3 and so forth. But it can also be a color or a sound, or a command that we send to the printer.
We can calculate the number of permutations we need for our code system if we know the structure of a message we want to transmit or store.
Title
Link
Slides "Codes"
Video "Measuring Information" from Khan Academy
-
Text "Codes and Combinations" [1]
-
-
Text "Bit by Bit by Bit" [1]
-
-
Exercise "Information & Codes"
-
[1] Petzold, Charles. Code: The Hidden Language of Computer Hardware and Software. Paperback ed, Microsoft Press, 2000.
[2] Scott, J. Clark. But How Do It Know?: The Basic Principles of Computers for Everyone. John C. Scott, 2009.