I'm trying to find the most efficicent method for evaluating a given number and determining which binary place values it is made up of. For example:
168 = 1010 1000 (is made up of the '128', '32' and '8' bits)
My goal is to be able to return a boolean value for each place value, indicating whether it is contained within the given number. I'm hoping there may be a "built-in" method for doing this simpler than coding the math manually! Does anyone have any ideas? Thanks!