An automatic door at a store has a sensor in front (A0) and behind (A1). The
 door opens (B0=1) when a person approaches from the front, and stays open as
 long as a person is detected in front or behind. If the door is closed and a person
 approaches from the behind, the door does not open. If the door is closed and a
 person approaches from the front but a person is also detected behind, the door
 does not open, to prevent hitting the person that is behind.