Ad
  • Custom User Avatar

    The rules, as stated in the kata:

    • "Dot" – is 1 time unit long.
    • "Dash" – is 3 time units long.
    • Pause between dots and dashes in a character – is 1 time unit long.
    • Pause between characters inside a word – is 3 time units long.
    • Pause between words – is 7 time units long.

    How many '1' and '0's are added per dot or dash is dependent on the sampling rate. In the example, the line is sampled exactly twice per dot.
    Hence, a dot leads to 11 instead of just 1. With a pause between characters of a word (00), we get 1100110011001100 for .... (letter H).

    Then, there is a pause for the characters inside a word which is three time units long: 000000 (6 zeros because our sampling rate is 2).
    A . (11) and another pause between characters of the same word (000000): 11000000.

    11111100110011111100111111 can be split into 111111 (), 00 (pause), 11 (.), 00 (pause), 111111 (), 00 (pause), 111111 ().
    (and so forth)