I dunno if you like arithmetic, but if so here's a way to view Boolean logic (like control bit evaluation strings) as math:
Let X and Y be control bits (like b666 and b123, for instance). Let x and y be the truth values of those control bits. Let 1 mean TRUE and 0 mean FALSE. So if b666 is on, x = 1, and if b123 is off, y = 0.
Now let the operators, &, |, !, and parentheses, () have the following definitions:
AND means Multiply: X & Y = x * y
OR means Add: X | Y = x + y
NOT means take the absolute value of one less than the number: !X = |x-1|
PARENTHESES mean divide what's inside by itself unless it's zero, in which case leave it alone. That is, round down to one or zero.
So, as an example, let's say b1 is true, b2 is false and b3 is false. The string ((b1 & b2) | b3) is to be evaluated. What is the result?
((b1 & b2) | b3)
= ((1 * 0) + 0)
= ((0) + 0)
= (0 + 0)
= (0)
= 0, and 0 means FALSE.
Now let's try ((b1 | b2) | (!b3 & !(b1 & b2))) with the same bit values.
((1 + 0) + (1 * |(1 * 0) - 1|))
= ((1) + (1 * |(0) - 1|))
= (1/1 + (1 * |-1|))
= (1 + (1 * 1))
= (1 + (1))
= (1 + 1/1)
= (1 + 1)
= (2)
= 2/2
= 1, and 1 means TRUE
Obviously there are some shortcuts, such as "If everything is 0 at some point in the arithmetic then the answer is FALSE" and, "If everything's a 1 and there's no subtraction then the answer's TRUE."
Hope this helps.