Let start by converting each statement to a boolean expression.
1. Write a single rung which causes cylinder one to extend while the red button is pressed
Cylinder#1_Extend = Red_button.
We can easily convert that to ladder
Red_Button Cylinder#1_Extend
-----] [---------------( )-----
and retract as soon as it is released.
Cylinder#1_Retract = NOT Red_Button
Red_Button Cylinder#1_Retract
-----]\[---------------( )-----
2. Extend the above program so that, in addition to the above, cylinder two extends while
and only while both the red and black buttons are pressed.
Cylinder#2_Extend = Red_Button AND Black_Button
Red_Button Black_Button Cylinder#2_Extend
-----] [-----------] [-------------( )-----
3. Extend the above program that, in addition to the above, cylinder three extends while
and only while, either one or both, of the red and black buttons are pressed.
Cylinder#3 = Red_Button OR Black_Button
See if you can sketch a ladder for that.
4. Extend the above program so that, in addition to the above, the suction cup turns on while and only while, the red button is pressed and the green button is pressed, but the
black is not pressed.
See if you can write a boolean equation for that and draw a ladder.
5. Extend the above program so that, in addition to the above, cylinder four extends while
and only while, either one but not both , of the red and black buttons is pressed.
This one gets a little trickier but not much if you think it through as a compound statement. Cylinder four extend while the Black Button is pressed and the red button is not pressed, or while the Red button is pressed and the black button is not pressed. I'll help you with the boolean expression.
Cylinder#4_Extend = (Black_Button AND NOT Red_Button) OR (Red_Button AND NOT Black_Button)
See if you can sketch that ladder.