3 ms·
It depends on whether your bit numbering is like x86 (your description), or PowerPC (left most bit is 0).
by fl7305 2y ago
It depends on whether your bit numbering is like x86 (your description), or PowerPC (left most bit is 0).
- duskwuff 2y agoBasically everyone uses x86 bit numbering. It has the pleasant property that the place value of every bit is always 2^n (or -2^n for a sign bit), and zero-extending a value doesn't change the numbering of its bits.
- bandyaboot 2y agoThe more I thought it through, even assuming x86, I guess there’s just no “correct” way to casually reference bit positions when we read them in the opposite order from the machine. Are they being referenced from the perspective of a human consumer of text, or the machine’s perspective as a consumer of bits? If I were writing that content, I’d have a difficult time deciding on which to use. If I were writing for a lay person, referencing left-to-right seems obvious, but in this case where the audience is primarily developers, it becomes much less obvious.
- mark-r 2y agoThanks for giving me an example of an architecture where the bits are labelled backwards, I'd never encountered that before. I've always appreciated that the bit number represents 2 to the power of that number.