Java Applet: MorseCodeTranslator.class by Robert T. Kelley

Java 1.3 plugin required

Morse code was developed by Samuel Morse in 1832 for use with the telegraph system. Morse assigned a series of dots and dashes to each letter of the alphabet, each digit, and some punctuation characters. In sound-oriented systems, the dot represents a short sound and the dash represents a long sound (usually three times as long). Other representations of dots and dashes are used with light-oriented systems. Separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. In a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted.

This applet will read an English language phrase and translate the phrase into Morse code. It also converts a phrase in Morse code into the English language equivalent. In the Morse-code strings, one blank space must appear between each Morse-coded letter and two or (preferably) three spaces must be placed between each Morse-coded word. The characters that can be used and their Morse-code equivalents are listed in the chart below the applet.

Use: The button is a toggle button, so that any string entered in the text field will be in the format indicated by the text on the button. The applet begins in the "Letter" position, meaning English text must be entered. If Morse code is to be translated into English, you must first click the button once to get it into "Code" position, and then enter the string into the text field. The translation appears in the text field itself.

For more information about Morse Code, see this comprehensive Morse Code site.

CHARACTER: CONTINENTAL CODE
" .-..-.
$ ...-..-
' .----.
( -.--.
) -.--.-
+ .-.-.
, --..--
. .-.-.-
/ -..-.
0 -----
1 .----
2 ..---
3 ...--
4 ....-
5 .....
6 -....
7 --...
8 ---..
9 ----.
: ---...
; -.-.-.
= -...-
? ..--..
A .-
B -...
C -.-.
D -..
E .
F ..-.
G --.
H ....
I ..
J .---
K -.-
L .-..
M --
N -.
O ---
P .--.
Q --.-
R .-.
S ...
T -
U ..-
V ...-
W .--
X -..-
Y -.--
Z --..
Codes not used in the Applet:
- -....
_ ..--.-
Warning .-..-
Error (in code) ........
Repetition(ii ii).. ..

Return to Java
Return to Math Links
Return to The Robert Kelley Composition Page

© 2001 Robert Kelley