MarkMLl,
Now I get it. Thank you for your explanation for something that, I believe, is quite obvious for both of us.
I don't think the Muso's question goes so abstract and deep, and I would recommend him to find some good book for computer data representation, binary systems, processor architectures, etc.
Regarding your remarks, please see my notes below.
What is a byte? The industry has eventually agreed that's it's an eight-bit "octet", and that a word is sixteen bits, but those aren't necessarily numbers.
Actually, they are whole numbers in a specific range. At a certain level of abstraction, you can consider them as a domain of bijection to another (finite) set, e.g. characters, enums, floats, etc.
If you want to concatenate two bytes into a word, with absolutely no interpretation, then you use a variant record and are careful about endianness.
Concatenation means there
is interpretation. That is why the endianness is important.
If you want to assemble 16 bits in memory from two 8-bit quantities then you use a shift and an "or" operation.
You are utmost correct. But since we know well that the addition (the adder) is an "or" combined with a "xor" for the carry-bit to the next cell, and also, the SHL operation (same instruction) fills with zeroes on the right, we're quite sure that "+" works the same way as the "or" and there will be no carry-bit from the low byte.
If you want to merge two numbers of a certain "bitedness" into one with a larger "bitedness", then you use multiplication and addition. But you'd better be damned sure of the representation convention, and be prepared to take sign into consideration.
Quite correct again. But we also know that SHL/SHR are ignoring the signednness of the item, which is not relevant in the case when we're working with unsigned variables, and then they behaves just like multiplication/division by the power of two. This is our particular case (variables of type 'byte').
Now, if we go back to @Muso's OP. "Two bytes"... but are those signed or unsigned? A byte isn't (necesarliy) a number. "Into a signed word"... but that's unambiguously a number.
So it really boils down to what one knows about the source values, and what one requires from the result.
IMO, The Muso wants to transfer some signed words through a communication link, but I can't be absolutely sure from his writings.
And yes, the one must knows what heis doing, especially when trying to combine some low level artifacts, plays with shifts, bytes and so.
Regards,