I'm analysing the signal used by a certain device, and I'm not quite sure what a good way to write it down would be. Here's an example (recorded through the sound card so the zero line is in the wrong place, but you get the idea):
http://img431.imageshack.us/img431/1110/wavestudiosaa1.png
The long (positive) pulses appear to be true / binary 1, and the short pulses false / binary 0. It uses 4-bit words. For numbers, the LSB is transmitted first. In the occasional case where an 8-bit number is needed, the low half is transmitted before the high half.
Time usually goes from left to right, for example in wave editors like that one, or a classic oscilloscope. Text is read from left to right too. So the easiest way to write the above section of signal is like this:
1000 1000 1001 0001
(0x8891)
That works because if I read from left to right, the bits go into my head in the same order they were transmitted. The tricky thing is, the numbers are all backwards. Suppose the first 4 bits mean Number 1. That looks like Number 8. The hex version is worse. (It would be unfortunate if "8" meant Number 1.)
If this was just a series of 4-bit numbers, I could reverse them.
0001 0001 1001 1000
(0x1198)
So now the first "1" really means Number 1. But this arrangement is a lot harder to write down when looking at an oscilloscope display. And suppose the second word represents an ordered sequence of "yes, no, no, no" - now that's backwards. (The bits really can represent yes/no events happening over a period of time, where the one occurring first is transmitted first.)
When two words are needed, it gets worse again. What if the middle two (19) meant "yes, no, no, no, yes, no, no, yes"?
(8-bit numbers are a little awkward too, though perhaps still better than they were the other way.)
Any suggestions? Is there some recognised way to solve this?
http://img431.imageshack.us/img431/1110/wavestudiosaa1.png
The long (positive) pulses appear to be true / binary 1, and the short pulses false / binary 0. It uses 4-bit words. For numbers, the LSB is transmitted first. In the occasional case where an 8-bit number is needed, the low half is transmitted before the high half.
Time usually goes from left to right, for example in wave editors like that one, or a classic oscilloscope. Text is read from left to right too. So the easiest way to write the above section of signal is like this:
1000 1000 1001 0001
(0x8891)
That works because if I read from left to right, the bits go into my head in the same order they were transmitted. The tricky thing is, the numbers are all backwards. Suppose the first 4 bits mean Number 1. That looks like Number 8. The hex version is worse. (It would be unfortunate if "8" meant Number 1.)
If this was just a series of 4-bit numbers, I could reverse them.
0001 0001 1001 1000
(0x1198)
So now the first "1" really means Number 1. But this arrangement is a lot harder to write down when looking at an oscilloscope display. And suppose the second word represents an ordered sequence of "yes, no, no, no" - now that's backwards. (The bits really can represent yes/no events happening over a period of time, where the one occurring first is transmitted first.)
When two words are needed, it gets worse again. What if the middle two (19) meant "yes, no, no, no, yes, no, no, yes"?
(8-bit numbers are a little awkward too, though perhaps still better than they were the other way.)
Any suggestions? Is there some recognised way to solve this?