How to convert an integer that was the end result of a bitwise OR to a table of the individual integers that the bitwise OR was applied against?
1
vote
2
answers
395
views
How can I convert the final integer of a bitwise OR back to it's original set of integers that the bitwise OR operation was applied to?
For example if I have the following set of bit values: {0, 1, 2, 4, 8, 16} and if I have the bitwise OR generated value of 11 then I would like to convert that value of 11 back to 1, 2, and 8 (the only possible combinations of values).
Asked by J.D.
(40903 rep)
Nov 26, 2019, 07:51 PM
Last activity: Nov 27, 2019, 06:39 AM
Last activity: Nov 27, 2019, 06:39 AM