last day (14 days later) » 

08:16
25
A: Is Morse Code binary, ternary or quinary?

Jason CThis answer isn't as long as it looks; this site just puts a lot of spacing between list items! Update: Actually it's getting pretty long... Morse Code isn't "officially" binary, ternary, quaternary, quinary, or even 57-ary (if I count correctly). Arguing about which one it is without context is...

Voo
Voo
To be fair one can always convert from one base to another - no surprise there, in the end we are doing nothing but encoding numbers and we can do that independent of whether you pick base -2, -1+i (that one's interesting because it allows us to encode all complex numbers) or base 57. How to map morse code to numbers is a separate topic and I think the mixing of the two concepts leads to confusion.
On a related note: You can prove that for a general encoding the most efficient base is base e (Warren has a chapter on this in Hacker's delight), with base 3 being (2*ln 3)/(3 ln 2) more efficient than base 2.
@Voo: Based on the arbitrary assumption that "the cost of a b-state circuit is proportional to b" ;)
Voo
Voo
@Oliver I thought about including that (and in retrospective I definitely should've done!), but it seems to me a reasonable assumption for the given problem (more so than in hardware actually). Clearly if we change that relationship we get different results, if say we assumed a quadratic relationship, the optimal base would be sqrt(e) if my mathematica skills are not completely rusty.
@Voo Ternary CMOS circuits certainly don't seem 1.5 times more expensive (in terms of number of transistors) than binary CMOS circuits. "3 times more expensive" seems somewhat more appropriate. Neglecting that mixing CMOS transistors with different base voltages takes up chip space and binary CMOS logic is pretty good at separating those into two separate regions. Also neglecting that humans are not used to ternary logic operators as well as they are to binary logic operators - for which there is a standardised set easy to reason about and the set simplest CMOS gates is pretty similar to that.
@Voo Re: Mixing two concepts: This is a good point. What you see above is the limit of my answer, though, and hopefully at least provokes thought in that direction (I don't want to write a book, but other answers can be added here to complete the topic :) ). I added a note about "signal separators are implicit" that, while not directly addressing your comment, at least (hopefully) moves more into the realm of discussing how many symbols it takes to represent Morse Code accurately, concisely, and unambiguously. I chose numeric notation in the examples above for convenience and readability.
JiK
JiK
08:16
I'd like to take the opportunity to point out that the Morse code distress signal SOS is not a word "sos" (dit-dit-dit dah-dah-dah dit-dit-dit) but a continuous sequence dit-dit-dit-dah-dah-dah-dit-dit-dit with equal pauses, so using the word is probably not the best example.
@JiK I've changed the example to "son" to reduce ambiguity, but it's worth noting that there is no such formal distress symbol defined in the current International Morse Code Standard (M.1667) at least as of 2009 (I did not check prior documents). The Wiki article you cite does not cite references at the points it claims the distress signal is part of International Morse Code, and I cannot find information to corroborate that claim. I do not know if it's true, although I have requested citations in the Wikipedia article.
Yes you can 'represent' Morse Code in any -nery but what IS Morse Code itself? I am not asking how you would represent in Morse Code in 57-ary.
These are a bunch of possible x-ary representations and encodings, but there are completely arbitrary and do not bring any light to the problem. Others n-ary encodings are equally (un)plausible. There is a logic to Morse code, and it is based on prefix codes. BTW, the 57-ary encoding of text into characters has nothing to do with Morse, but is the English writing code (or Latin writing code). See a more formal addendum to my answer. cc @KorayTugay you may get a better explanation of when and why considering the gap is nonsense :)
@Koray The answer is that it is debatable. The pros, cons, and notes above should give enough info to let you do enough critical thinking on your own to determine what you would like to treat it as. If you're looking for some concrete answer you simply won't find anything more than opinion. You will have to accept that this requires decision making on your part. All arguments have been presented in the answers here. If you'd rather have a one word answer like "it's quinary" (or whatever), I can provide that, but it will be a lie and a disservice.
@KorayTugay That said, as mentioned above, quinary is the only choice that represents all primitives in the standard with context-free symbols and separators that are not implicit in the underlying encoding.
@JasonC Can we say that the quotation I make from the book is also a false information?
08:16
@KorayTugay Yes, as I mentioned, the quotation from that author is most certainly incorrect. That much we are sure of. Morse may be said to be binary, but not because it consists of a "dot" and a "dash". That argument cannot be made. The author is unfortunately mistaken there. The argument made for binary on Wikipedia's "list of binary codes" page is an example of a correct binary argument (it is not the same as the author's binary argument).
@JasonC Ok thank you for your answer.
@babou writes (moving here from question comments): "My question has nothing to do with the 57 characters. When you state you have, say, a quaternary system. You go on using the symbols 0 1 2 and 3 in the rest of the section. But you do not say how these 4 symbols are encoded in binary. Did you read my answer?"
@babou I don't need to state how they are encoded in "binary". That is another matter. You can encode them any way you want. You can write symbols on paper, you can use voltage levels on a line, it's off-topic. I chose a literal 0,1,2,3 because they are easy to type. It is as arbitrary a choice as w,x,y,z or letter-rest, word-rest, dot, dash. They're symbols, not numeric values. If representing them in some other form (e.g. I could italicize them in MathJax or something if it is more familiar) would reduce unintentional confusion, I will certainly choose a different notation.
You need to consider the binary encoding because that is a key point of the standard, and the only one that justifies giving any consideration to the inter-element gap for carrying information at some point. The standard specifies a unit, and the fact that everything in the code is composed of a sequence of units, during which something can be on or of. So the basic medium is clearly a binary stream (an information I did not know at first, which led my first version of answer to a slightly different path). You must decode that stream into a stream of symbols.
@babou I understand what you are saying. However, in my view, that standard M.1667) actually defines two things. They are blended together but I think they must be looked at separately. The first thing it defines are Morse's semantic symbols (dots, dashes, rests). The second thing it defines is how to encode those semantic symbols to a discrete timed binary transmission line. For the purposes of analysis, we only care about the former - the semantics and symbols. For actually transmitting this information, we can use whatever method we want, although the binary form is standardized. ...
@babou ... But it is not necessary (and may be a mistake) to mix semantics and encoding together if the goal is only semantic analysis. We don't care how it's encoded, we only care that it can be encoded. That said, that's not to discount the importance of encoding, hence my related notes in the answer - obviously encoding would be a common part of an actual concrete communications application. But the semantics and encoding are not inextricably linked from an informational viewpoint.
@JasonC There is no semantics. Only syntax: sets of symbols encoded in other sets of symbols. You only care about one level, and that gives you the freedom of arbitrary answers. I care about both level, get it done cleanly so as to have stateless decoding in both cases, and that leads me to an unescapable conclusion, in agreement with the standard and with intuitive perception of the code. At each level I have exactly the right symbols for the concepts of that level. At first level only dash, dot, and interletter space, at the next all chracters and inter-word space. Clean, simple, stateless.
You say the standard defines two things blended. You think they should be looked at separately. My whole point is that I take both into account, but manage to keep them logically separated (not inextricably linked) with a good choice of encoding for both (prefix implies stateless). I fail to see what you can call semantics here, short of doing that arbitrarily for any mapping. Encoding 57 characters into strings of 3 symbols is pretty similar to encoding 3 symbols into binary strings. cc@KorayTugay
08:16
Please move any further conversation to chat.stackexchange.com/rooms/21638/…

last day (14 days later) »