I want to check (in hardware) whether a bit is on (1) in a 64 bit number - the bit I want to check can be any bit but I'm only interested in checking that one bit.
I get the number -ie offset - of the bit as a 6 bit number eg if that number is 0 I need to check bit 0, if the number is 17 I need to check bit 17 etc.
Is there anything faster (even if more costly in power and area) than this idea:
- Input (bit I want to check) is X - so use a barrel shifter to left shift 1 by X and store result in Y
- Then Z<-(Y AND Bitmap)
- OR together all bits in Z - if output is 1 then bit is on, otherwise bit is off.
I suspect that 1 is the costly operation, so any ideas about a faster way of doing that would be particularly welcome.