I’m thinking about using binaries as a sort of multiple flag but I can’t quite get my head around it and haven’t so far managed to google anything useful.
What I’m talking about is something like this:
Say you want to track the on/off state of four switches, each state would be represented by a binary like this:
Then all combinations of these states is represented by another binary, eg:
I guess what I’m a bit puzzled about is how to check the results. I can think of ways to get there but I’d like to know common methods, or simply the best way to do it.
Any tip is appreciated.