Talk:Bitwise IO: Difference between revisions
Content added Content deleted
(Still encoding /= encoded thing) |
|||
Line 201: | Line 201: | ||
: This is an example of a serial bit-oriented protocol [http://en.wikipedia.org/wiki/Controller_Area_Network CAN], note how transmission conflicts are resolved in CAN using the identifier's bits put on the wire. Also note that a CAN controller is responsible to deliver CAN messages to the CPU in the endianness of the later. I.e. it must recode sequences of bits on the wire into 8-bytes data frames + identifiers. |
: This is an example of a serial bit-oriented protocol [http://en.wikipedia.org/wiki/Controller_Area_Network CAN], note how transmission conflicts are resolved in CAN using the identifier's bits put on the wire. Also note that a CAN controller is responsible to deliver CAN messages to the CPU in the endianness of the later. I.e. it must recode sequences of bits on the wire into 8-bytes data frames + identifiers. |
||
: More about [http://www.linuxjournal.com/article/6788 endianness] --[[User:Dmitry-kazakov|Dmitry-kazakov]] 10:08, 6 January 2009 (UTC) |
: More about [http://www.linuxjournal.com/article/6788 endianness] --[[User:Dmitry-kazakov|Dmitry-kazakov]] 10:08, 6 January 2009 (UTC) |
||
:: Sorry at this point I think we can understand each others. I believe I've explained in a rather straightforward (even though too long) way the point, and can't do better myself. In my computer experience, the "problem" and the task is understandable, clear and not ambiguous. In a implementation-driven way I can say that you've got it as I intended iff the output of the program feeded with the bytes sequence (bytes written in hex) |
|||
<pre> |
|||
41 42 41 43 55 53 |
|||
</pre> |
|||
:: (which in ASCII can be read as "ABACUS") is |
|||
<pre> |
|||
83 0a 0c 3a b4 c0 |
|||
</pre> |
|||
:: i.e. if you save the output in a file and see it with a hexdumper, you see it; e.g. |
|||
<pre> |
|||
[mauro@beowulf-1w bitio]$ echo -n "ABACUS" |./asciicompress |hexdump -C |
|||
00000000 83 0a 0c 3a b4 c0 |...:..| |
|||
00000006 |
|||
[mauro@beowulf-1w bitio]$ echo -n "ABACUS" |./asciicompress |./asciidecompress |
|||
ABACUS[mauro@beowulf-1w bitio]$ |
|||
</pre> |
|||
::--[[User:ShinTakezou|ShinTakezou]] 18:10, 13 January 2009 (UTC) |