Created
August 14, 2012 21:18
-
-
Save Idorobots/3353115 to your computer and use it in GitHub Desktop.
Having fun with SICP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(var (a b s c) (times 4 make-wire)) | |
(probe 'sum s) | |
(probe 'carry c) | |
(half-adder a b s c) | |
(set-signal! a 1) | |
(set-signal! b 1) | |
(propagate) | |
;; 0ns - sum: new value = 0 | |
;; 0ns - carry: new value = 0 | |
;; Simulation started! | |
;; 3ns - carry: new value = 1 | |
;; 6ns - sum: new value = 1 | |
;; 8ns - sum: new value = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment