Re: Bit twiddling



*** T. Winter wrote:

In article <ln1x7jb47t.fsf@xxxxxxxxxxxxxxx> Keith Thompson <kst-u@xxxxxxx> writes:

 > Whether bit 0 is the least or most significant bit is probably
 > system-specific; the bits in a 32-bit word might be numbered 0..31 or
 > 31..0.  Which way they're numbered is probably more a matter of
 > terminology than actual semantics, unless the CPU provides
 > instructions that take bit numbers as arguments.

And if the instructions are consistent.  That is not the case with all
processors...

IBM machines derived from S/360 consistently number them with the MSB as zero. The terminology gets a little confusing now that the architecture has been extended to 64 bits. The old instructions now operate on bits 32-63 of the general registers.

-- glen

.