jungle
link
fedilink
31Y

Not really, Morse code is not binary, but tertiary.

I’d say it’s quinary but can easily be represented binarily

  1. short mark, dot or dit ( ▄ ): 1

  2. longer mark, dash or dah ( ▄▄▄ ): 111

  3. intra-character gap (between the dits and dahs within a character): 0

  4. short gap (between letters): 000

  5. medium gap (between words): 0000000

jungle
link
fedilink
11Y

You can do it with three symbols:

  1. Dot: 10
  2. Dash: 1110
  3. Gap: 00

The long gap between words is just three short gaps.

There’s a Vsauce video about this: https://youtu.be/HY_OIwideLg

@BlackRose@slrpnk.net
link
fedilink
1
edit-2
1Y

Looks right, but would that not already be optimized?

jungle
link
fedilink
01Y

Not sure what you mean by optimized.

Optimized to use less symbols by combining them (long gap between words is just three short gaps). I also think if a sentence ends, there would be the unnessecary 0 from the dots and Dashes at the end.

I’m guessing you’re saying that because of the pauses? Otherwise I don’t get it.

jungle
link
fedilink
11Y

Yes, the space is a necessary symbol in Morse code, otherwise it’s impossible to decode.

Makes sense. I remember asking myself whether Morse was a form of Huffman encoding back when I was learning that stuff. And it kinda is going for that, but without actually doing it properly since it wasn’t a binary code per se and so could use the pauses. “Ternary” makes sense.

jungle
link
fedilink
21Y

Right, Morse was actually mentioned as an example when I was learning Huffman encoding. :)

@BlackRose@slrpnk.net
link
fedilink
1
edit-2
1Y
Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.6K Comments
  • Modlog