Morse Code ⇄ Binary
Dot and dash is already a binary decision — short or long, on or off — so the conversion is beautifully short. Below, a tool for both directions plus the timing-table representation, which is how engineers actually drive hardware with morse: one bit per time unit.
Two ways to binary-ize morse
Symbol mapping is the compact form: dot→0, dash→1, letter boundaries kept as spaces (A = 01, B = 1000). It's what you'd write on paper and read by eye.
Timing table is the machine form: one bit per time unit, 1 = tone on, 0 = silence. The letter A lasts 5 units (1 on, 1 off, 3 on) = 10111. Between letters live three 0s; between words, seven. A microcontroller looping over this string with one bit per fixed millisecond is a morse transmitter — no further logic needed. That's also why the standard durations are worth internalizing: they're the difference between code that reads and code that wobbles.
Where the "morse is binary" analogy bends
Morse anticipates computer science by a century — shortest codes for commonest symbols is exactly the idea later formalized as Huffman coding (see the chart's history section). But two wrinkles keep morse from being pure binary: the two "symbols" have unequal physical length (1 vs 3 units — binary digits are all one slot), and the gaps carry meaning (a dash's internal silence differs from a letter gap). Morse is binary in spirit, ternary in timing — one of the reasons copying it by ear is a musical skill rather than a counting one, as the learn page keeps insisting.
Related conversions
Going the other direction — sound to text — is the audio decoder's job; pictures to text, the image decoder. For tapping numbers instead of dots and dashes, there's the tap code — the 5×5 grid cousin that trades rhythm for counting.
Frequently asked questions
How do you write morse code in binary?
The symbol mapping is direct: dot = 0, dash = 1. The letter A (· −) becomes 01. For multi-letter messages you must also encode the gaps, or the boundaries vanish — the timing-table convention uses 1 for each on-unit, 0 for each off-unit, with letters separated by 000 and words by 0000000.
Is morse code basically binary?
Structurally, yes — it's a variable-length binary code over two signal states, invented decades before Boolean logic met telegraphy. But it encodes symbols with different physical lengths (dot 1 unit, dash 3 units) and puts information in the silence too, which pure binary doesn't. The comparison page section below shows exactly where the analogy holds and where it bends.
Why would I convert morse to binary?
Mostly for teaching and for building: students meet the idea of encoding in a code they can hear, and makers driving LEDs, buzzers, or radio transmitters from microcontrollers need exactly this on/off unit stream — one bit per time-slot.