Title: What
1Whats 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
2Who are these people?
3Sending messages using Clicks and Clacks
Western Electric Morse Code Telegraph Sounder
Telegraph Key
4How 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
5- 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).
6Famous Morse Codes
- SOS An easy to remember distress call, similar
to 911 today. - SOS . . . _ _ _ . . .
- V for Victory Beethovens 5th Symphony
- Dah Dah Dah Daaahhhmmmm . . . _
7Samuel Morse Artist/Inventor 1830s
Note not all letters have the same length code
8Not all codes are the same length
Number of Dots and/or Dashes (length of code) Number of Possible Codes
1 21 2
2 22 4
3 23 8
4 24 16
9Reasons for using codes of varying lengths
- Most commonly occurring characters are given
short codes - This is a form of file compression
10Spies can break simple codes that replace each
letter with another symbol just by counting the
frequency of the symbols.
Frequency Table for the English Language
11Zip File Compression
- Eliminate Redundancy
- Replace common words with short codes.
- A table is created indicating short codes for
common words.
12More Binary Coding Schemes
- Braille uses raised or flat dots with six dot
locations. - 26 or 64 unique codes are possible.
Braille
13Translating Braille
14What about the humans?
15We have ten fingers
- Therefore we tend to use ten symbols for
constructing numbers -
- 0 1 2 3 4 5 6 7 8 9
16Our numbering System is Arabic
- Indo-Arabic of Indian Origin, introduced into
the west around 1000 A.D.
- Positional - number depends on digits position.
- No Special symbol for the number ten.
- Need for ZERO
Hindu Numerals from 100 A. D.
17How 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
18How 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
- 3216 X 536 12 4 5/6
- 648 180 12 4 5/6 844.83
19The Mayans used a base-20 numbering system
20Computers 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 0
111 7 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 11
10 E 1111 F
- 28 256
- 216 65,536
- 232 4,294,967,296
A 32-bit microprocessor can access 4 billion
memory addresses or 4GBytes
21Be 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?
22Competition
- 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!
23How to construct numbers
- 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.