Skip to content

ElectricityMessages over Wires

Samuel Morse: The Telegraph and Its Code

A painter turned inventor (1791–1872) who, with Alfred Vail and Joseph Henry's science, sent messages along a wire in dots and dashes.

Not started Jump to practice

Samuel F. B. Morse (1791–1872) was a painter before he was an inventor. Born in Charlestown, Massachusetts, he studied art in London and painted portraits. In 1825, while he was in Washington painting a portrait, his wife died at home in New Haven; the letter bringing the news took days to reach him. Some writers link his later interest in fast messages to that loss.

Key idea

Morse's telegraph used a battery, a switch (the key) and an electromagnet far away that clicked when the current flowed. Short and long clicks, dots and dashes, spelled out letters. A message could cross a country in moments.

How the idea came

In 1832, sailing home from Europe on the ship Sully, Morse talked with a passenger, Charles Jackson, about electromagnets. Morse reasoned that if current could be sensed at any distance along a wire, signals could be sent. He sketched ideas in a notebook on the voyage.

What he tried, and who helped

Morse knew little science, and his first instrument worked only over short distances. Two people made the difference. Leonard Gale, a chemistry professor, showed him the work of the American scientist Joseph Henry, who had found how to wind electromagnets with many turns and use batteries of many cells so current could push through long wires. And Alfred Vail, a skilled mechanic, joined in 1837, built much better instruments, and helped shape the code. Historians still discuss how much of the dot-and-dash alphabet was Vail's.

The first code used numbers that stood for words in a code book. It was replaced by a code for letters. Common letters got short codes: E is a single dot, T a single dash. That makes messages faster, an idea used in data compression today.

Type a word to hear and see it in Morse code, or tap the key yourself and watch it decode. A dash is three dot-lengths; letters are separated by three, words by seven.
A few letters of International Morse Code, the version used today (it differs a little from Morse and Vail's original American code).
LetterCodeLetterCode
E·T−
A· −N− ·
S· · ·O− − −
H· · · ·R· − ·

Worked example: Counting dot-lengths

In Morse timing a dot is 1 unit, a dash 3, the gap inside a letter 1. How many units long is the letter S (· · ·)?
  1. Three dots: $3 \times 1 = 3$ units.
  2. Two gaps between them: $2 \times 1 = 2$ units.
  3. $3 + 2 = 5$.

Answer: 5 units.

What hath God wrought

In 1843 Congress paid 30,000 dollars to build a test line from Washington to Baltimore, about 40 miles. On May 24, 1844, Morse sent the first official message from the Supreme Court chamber in the Capitol to Vail in Baltimore: "What hath God wrought." The words, from the Bible (Numbers 23:23), were chosen by Annie Ellsworth, the young daughter of a friend who had helped him.

Story or history?

Morse is often called the inventor of the telegraph. In Britain, William Cooke and Charles Wheatstone patented a needle telegraph in 1837 and had one working on a railway by 1839. Others built electric telegraphs too. Morse's system won in America and much of the world because it was simple, needed only one wire, and its code could be sent by ear and by hand.

Timeline
WhenWhat happened
1791Morse born in Charlestown, Massachusetts
1831Joseph Henry demonstrates an electromagnet ringing a bell over a long wire
1832Morse's idea aboard the Sully
1837Alfred Vail joins; Cooke and Wheatstone patent their telegraph in Britain
1840Morse receives a U.S. patent
1843Congress funds the Washington–Baltimore line
1844"What hath God wrought"
1861Telegraph lines cross the United States
1866A lasting telegraph cable crosses the Atlantic
1872Morse dies in New York

Worked example: Across the country

The Washington–Baltimore line opened in 1844, and lines crossed the continent in 1861. How many years later was that?
  1. $1861 - 1844 = 17$.

Answer: 17 years.

What it led to

The telegraph changed news, business and railways: trains could be scheduled safely, and news arrived the same day. Morse code was used by ships and radio operators for over a century. The telegraph's electromagnet relay, which lets a weak current switch a stronger one, is an ancestor of the switches inside computers.

Common mistake

Thinking the telegraph sent sound along the wire. It sent pulses of current; an electromagnet at the far end turned them into clicks or marks on paper.

Read more: Samuel Morse and Electrical telegraph.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading