int buttonpin1 = 8;
int buttonpin2 = 9;
int led = 7;
int A;
int B;
void setup() {
pinMode(led, OUTPUT);
pinMode(buttonpin1, INPUT);
pinMode(buttonpin2, INPUT);
}
void loop() {
boolean A = digitalRead(buttonpin1);
boolean B = digitalRead(buttonpin2);
// boolean pinOutState = (A & B); //AND
//boolean pinOutState = !(A | B); //NOR
//boolean pinOutState = (A & B) | (!A & !B); //XNOR
// boolean pinOutState = !(A & B); //NAND
digitalWrite(led,pinOutState);
}