• jungle
    link
    31 year ago

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

    • @[email protected]
      link
      fedilink
      51 year ago

      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
        21 year ago

        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

          • jungle
            link
            11 year ago

            Not sure what you mean by optimized.

            • @[email protected]
              link
              fedilink
              11 year ago

              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.

              • jungle
                link
                11 year ago

                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.

      • jungle
        link
        11 year ago

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

        • @[email protected]
          link
          fedilink
          11 year ago

          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
            21 year ago

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