Bit TEST, SET, etc operators.

jpl jpl.algol68@gmail.com
Mon Feb 2 20:20:20 GMT 2026


Greetings All,

It is exciting to be able to use the new bit operators, am already
using them to implement a "bit reversed counter" to allow efficient
bit reversed addressing for various FFT implementations.

Question:  is the decision to use "NUMBIT is ONE based" a firm decision?

In doing so, we are loser the nice mathematical property wherein a
bit's position (NUMBIT) is associated with its power of 2.

With one based we have:
  b_3*2^2   +   b_2*2^1 +   b_1*2^0    in general b_i*2^(i-1)
instead of:
  b_2*2^2   +   b_1*2^1 +   b_0*2^0     in general  b_i*2^i

It's not the end of the world, but can be a bit awkward and might be
more error prone (for math-related).

Cheers,
James


More information about the Algol68 mailing list