Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 802 Bytes

integral.md

File metadata and controls

28 lines (16 loc) · 802 Bytes

Integral

SICP Figure 3.32 introduces the integral procedure viewed as a signal processing system:

integral-sicp

This diagram cannot be directly written in Qi-circuit, but it can be translated to an equivalent circuit.

step-1

integral-step-1

step-2

integral-step-2

step-3

integral-step-3

step-4

integral-step-4

(define (integral init dt)
  (☯ (~>> (mul dt) (c-loop (~>> (== _ (reg init)) (add +) (-< _ _))) (reg init))))