Boolean Logic equations explanation

Hello, Could someone explain how could we derive the following boolean logic equations for the LEDs in ControlLED_DigitalIO function out of the given table using 4 switches b1,b2,b3,b4:

rled = (!b4&&(!b3||b2)) || (b4&&b3&&b2&&b1);

yled = (b4^b3) || (b4&&b3&&b2&&b1);

bled = b4;

arm_3sv2_01