Question: my AND, OR, NOT gate code: (define OR-GATE (lambda (a b) (if (= a 1) 1 b))) (define AND-GATE (lambda (a b) (if (= a

my AND, OR, NOT gate code:
(define OR-GATE (lambda (a b) (if (= a 1)
1
b))) (define AND-GATE (lambda (a b) (if (= a b 1)
1
0))) (define NOT-GATE (lambda (a) (if (= a 0) 1 0)))
2 Write a Scheme procedure to simulate the XOR gate, shown in the diagram in Figure 2. You must use AND, OR, and NOT gates that you defined in question 1 to implement XOR. In (2 points) infix notation, c (NOT a) AND b) OR (a AND (Not b)) XOR Figure 2. Logic gate XOR, where c (NOT a) AND b) OR (a AND (Not b)))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
