this post was submitted on 24 Jul 2023
572 points (96.9% liked)
Programmer Humor
32549 readers
498 users here now
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.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not really, Morse code is not binary, but tertiary.
I'd say it's quinary but can easily be represented binarily
short mark, dot or dit ( ▄ ): 1
longer mark, dash or dah ( ▄▄▄ ): 111
intra-character gap (between the dits and dahs within a character): 0
short gap (between letters): 000
medium gap (between words): 0000000
You can do it with three symbols:
The long gap between words is just three short gaps.
There's a Vsauce video about this: https://youtu.be/HY_OIwideLg
Looks right, but would that not already be optimized?
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.
Yeah, that extra 0 also irks me, it's the typical issue when concatenating words, that requires a trim() at the end.
But it's not an issue in terms of showing that you need three symbols to represent Morse code.