-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadder.ss
More file actions
32 lines (32 loc) · 774 Bytes
/
Copy pathadder.ss
File metadata and controls
32 lines (32 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(load "logictest.ss")
(load "reduce.ss")
(define A (reduce AND))
(define O (reduce OR))
(define (adder a b ci)
(list
(O
(list
(A
(list
(NOT a) (NOT b) ci))
(A
(list
(NOT a) b (NOT ci)))
(A (list
a (NOT b) (NOT ci)))
(A (list
a b ci)))
)
(O
(list
(A
(list
(NOT a) b ci))
(A
(list
a (NOT b) ci))
(A (list
a b (NOT ci)))
(A (list
a b ci)))
)))