Skip to content

Instantly share code, notes, and snippets.

@Idorobots
Created August 14, 2012 21:18
Show Gist options
  • Save Idorobots/3353115 to your computer and use it in GitHub Desktop.
Save Idorobots/3353115 to your computer and use it in GitHub Desktop.
Having fun with SICP
(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