5 ms·
The bits in a byte do not have a defined endianness!
by TazeTSchnitzel 4y ago
The bits in a byte do not have a defined endianness!
- guidoism 4y agoI seem to recall discussion of this in the RFC. They do ultimately have an order if transmitted over a network! But most of us are used to getting them a byte at a time through the memory interface so we are ignorant of this.
- wtallis 4y ago> They do ultimately have an order if transmitted over a network! They do if transmitted over a serial port. But today's networks encode whole bytes or more into the symbols actually sent over the wire/air, so there's not really any way to point out on an oscilloscope trace where particular bits out of a byte are sent in a specific order.
- guidoism 4y agoWow! I didn’t know that
- AnimalMuppet 4y agoMost CPUs have assembly instructions called something like "shift left/right" or "rotate left/right". That implies an endianness, and it is (to my knowledge) always the endianness of normal written numbers - most significant is "left". That is, big endian.
- kevin_thibedeau 4y agoBit-endianness is only relevant for serial transmission. You only have to worry about it in circumstances where you have hardware that assumes a different bit order than what you're communicating with. Otherwise, the internal layout of words is abstracted and you can ignore it.
- AnimalMuppet 4y agoIt's relevant when dealing with the control registers of peripherals, even if that's over a parallel bus. It's at least important that you have the same bit order as the peripheral.