So, when Right isn't pressed, B AND #RIGHT equals 0, because #RIGHT isn't set in B, but is set in #RIGHT. When Right is pressed, B AND #RIGHT equals #RIGHT, because #RIGHT is set on both sides. In other words, it'll be either 0 or #RIGHT. Any number that isn't 0 is considered true, so these come out as false or true.