int LED4a = 13;
int LED3a = 12;
int LED2a = 11;
int LED1a = 10;
int LED4b = 9;
int LED3b = 8;
int LED2b = 7;
int LED1b = 6;
int LEDout1 = 1;
int LEDout2 = 2;
int LEDout3 = 3;
int LEDout4 = 4;
int LEDoutCarry = 5;
byte Aval[] = {13,12,11,10};
byte Bval[] = {9,8,7,6};
byte result[] = {5,4,3,2,1};
bool CarryIN;
void setup() {
// put your setup code here, to run once:
pinMode(LED1a, INPUT_PULLUP);
pinMode(LED2a, INPUT_PULLUP);
pinMode(LED3a, INPUT_PULLUP);
pinMode(LED4a, INPUT_PULLUP);
pinMode(LED1b, INPUT_PULLUP);
pinMode(LED2b, INPUT_PULLUP);
pinMode(LED3b, INPUT_PULLUP);
pinMode(LED4b, INPUT_PULLUP);
pinMode(LEDout1, OUTPUT);
pinMode(LEDout2, OUTPUT);
pinMode(LEDout3, OUTPUT);
pinMode(LEDout4, OUTPUT);
pinMode(LEDoutCarry, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
// CarryIN = false;
// for (int i = 0; i < 4; i++) {
// bool a = digitalRead(binaryPins[i]) == LOW;
// bool b = digitalRead(addPins[i]) == LOW;
// bool c = a != b;
// bool s = c != carry;
// carry = a && b || c && carry;
// digitalWrite(resultPins[i], s ? HIGH : LOW);
// }
// digitalWrite(resultPins[4], carry ? HIGH : LOW);
}