• BlackRose
        link
        fedilink
        arrow-up
        5
        ·
        11 months 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

          • BlackRose
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            11 months ago

            Looks right, but would that not already be optimized?

              • BlackRose
                link
                fedilink
                arrow-up
                1
                ·
                11 months 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@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  11 months 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@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

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

          • fibojoly@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            11 months 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@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              11 months ago

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

    • Lifted_lowered@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      11 months ago

      Unless I’m mistaken I would say that it’s the other way around, Morse code is more like a human readable machine language expressed in binary because the 26 character alphabet is expressed in different binary values, much like ASCII.

  • nothacking@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    11 months ago

    What’s “space!” and “enter”?

    For those that need help in deciphering the title text, there is a super easy trick: Take the last 5 bits of each byte, convert them from binary to decimal, and that letter of the alphabet (starting from one) is the letter represented by the ASCII code.

    To convert binary numbers to decimal, just add the place values of a the 1s together. For 5 bits, the place values are 16, 8, 4, 2, 1. So 10110 becomes 16+4+2 which is equal to 22.

    01001101: last 5 bits are 01101, in decimal, that is 8+4+1=13, and the 13th letter of the alphabet is “m”

    01100101, becomes 00101, then 4+1=5, and the 5th letter of the alphabet is ‘e’

    The last 2 are just repeats of those, so the post body reads “meme” (if the third bit is zero, the letter is capital, so it should really be “Meme”)

  • aidan@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    Having a space character makes it ternary. If enter is a character than quaternary

  • Lifted_lowered@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    11 months ago

    This is a weird meme to me. Have you ever made something like a simple accumulator machine out of logic gates, OP? You literally just program them in binary, although usually the instructions are expressed in hexadecimal. You make your own instruction set. When we did ours in Compsci foundations I just decided that 0x06 was going to be my jump at negative instruction. I could have wired the logic so that instruction was at a different value, it’s literally possible to make your own instruction set, then your own assembly language, and then your own compiler, and your own programming language. People, mostly women at first, did this for every new computer their institution built at first.