import machine
from machine import Pin
num1 = Pin(12, Pin.OUT);
num2 = Pin(14, Pin.OUT);
num3 = Pin(26, Pin.OUT);
slider1 = Pin(2, Pin.IN, Pin.PULL_UP);
slider2 = Pin(0, Pin.IN, Pin.PULL_UP);
slider3 = Pin(4, Pin.IN, Pin.PULL_UP);
slider4 = Pin(16, Pin.IN, Pin.PULL_UP);
while True:
A1 = slider1.value();
A2 = slider2.value();
B1 = slider3.value();
B2 = slider4.value();
S1 = ((not A1 and B1) or (A1 and not B1));
Cy1 = (A1 and B1);
S2 = ((not A2 and not B2 and Cy1) or (not A2 and B2 and not Cy1) or (A2 and B2 and Cy1) or (A2 and not B2 and not Cy1));
Cy = ((A2 and B2) or (A2 and Cy1) or (B2 and Cy1));
num1.value(S1);
num2.value(S2);
num3.value(Cy);