230 likes | 382 Views
What’s a Code?. A system of signals used to represent letters and numbers in transmitting messages. A system of symbols, letters, or words given certain arbitrary meanings, used for transmitting messages requiring secrecy and brevity. -- American Heritage Dictionary. Who are these people?.
E N D
What’s a Code? A system of signals used to represent letters and numbers in transmitting messages. A system of symbols, letters, or words given certain arbitrary meanings, used for transmitting messages requiring secrecy and brevity. -- American Heritage Dictionary
Sending messages using Clicks and Clacks: Western Electric Morse Code Telegraph Sounder Telegraph Key
How does this work? When a current flows through the induction coil, the resulting magnetic field attracts an armature that is held up against a metal arm. When the current is switched off, the armature is drops to its resting position, resulting in a "click". When the current returns, the armature is raised back to the upper arm resulting in a "clack." http://www.answers.com
What can you do with “Clicks” and “Clacks”? Morse Code: A fast click-clack is a dot. A slow click-clack is a dash. Morse code is comprised on only two symbols. Morse code is a binary code (two symbols).
Famous Morse Codes SOS – An easy to remember distress call, similar to 911 today. SOS = . . . _ _ _ . . . ‘V’ for Victory – Beethoven’s 5th Symphony Dah Dah Dah Daaahhhmmmm = . . . _
Samuel Morse Artist/Inventor 1830’s Note not all letters have the same length code
Reasons for using codes of varying lengths • Most commonly occurring characters are given short codes • This is a form of file compression
Frequency Table for the English Language Spies can break simple codes that replace each letter with another symbol – just by counting the frequency of the symbols.
Zip File Compression • Eliminate Redundancy • Replace common words with short codes. • A table is created indicating short codes for common words.
More Binary Coding Schemes: • Braille uses raised or flat dots with six dot locations. • 26 or 64 unique codes are possible. Braille
We have ten fingers… Therefore we tend to use ten symbols for constructing numbers: 0 1 2 3 4 5 6 7 8 9
Indo-Arabic – of Indian Origin, introduced into the west around 1000 A.D. Positional - number depends on digit’s position. No Special symbol for the number ten. Need for ZERO Our numbering System is Arabic Hindu Numerals from 100 A. D.
How many apples are: 3,674.5 (in base-10) This is: 3 X 103 + 6 X 102 + 7 X 101 + 4 X 100 + 5 X 10-1 3000 X 600 + 70 + 4 + 5/10
How many apples are: 3,524.5 if you happen to be a bird with six digits? (base-6) This is: 3 X 63 + 5 X 62 + 2 X 61 + 4 X 60 + 5 X 6-1 = 3*216 X 5*36 + 12 + 4 + 5/6 = 648 + 180 + 12 + 4 + 5/6 = 844.83
28 = 256 216 = 65,536 232 = 4,294,967,296 Computers have tiny electrical switches (transistors) that are controlled by two voltages 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F A 32-bit microprocessor can access 4 billion memory addresses – or 4GBytes
Be a secret agent! • Using tic-tacs of multiple colors, devise a coding scheme for coding a sentence of about 15-20 characters. • A sentence may have numbers and letters. • Determine how you will transport this code. • Keep codes as small as possible. • Can you memorize your codes?
Competition • Half of your team will code the message. • One person will transport the code to another room. • The other half of the team will decode the first message and code a response. • The first team to decode the 2nd message has to eat all the tic-tacs!
The Roman Way I - one V - five X – ten L - fifty C - 100 (cento in Italian) D – 500 (diecicento) M – 1000 (mille) 1945 = MCMXLV or MCMXXXXV ? or MCMVL ? 1907 = MCMVII 1909 = MCMIX Cumbersome to add, confusing to subtract. Very hard to multiply and divide. How to construct numbers: