The Morse code was invented during the 1830s by Samuel Morse and Alfred Vail. The code associated every letter in the English alphabet with a series of dashes and dots. This allowed for complex messages to be sent through telegraph lines.
The Morse code associated letters that were used often, such as "A," with a simple code. Letters that were less common, such as "Q," were designated a more complex code. The first telegraph message was sent by Samuel Morse in 1844 from Washington D.C. to Baltimore. The first trans-Atlantic telegraph line between the United States and Europe was laid by 1866.