乐正

Actions speak louder than words.

Sicp-ex3-29

问题

构造或门的另一方式是将它作为一种符合的数字逻辑设备,用与门和反门构造出或门。请采用这种方式定义出or-gate。如何用and-gate-delayinverter-delay表示这样定义的或门的延迟?

解答

练习3.29 (ex3-29.scm) download
1
2
3
4
5
6
7
8
9
(define (or-gate input-1 input-2 output)
  (let ((o1 (make-wire))
        (o2 (make-wire))
        (o3 (make-wire)))
    (inverter input-1 o1)
    (inverter input-2 o2)
    (and-gate o1 o2 o3)
    (inverter o3 output)
    'ok))

在这里,或门的延迟为:

$$ \text {or_gate_delay} = 2 \times \text {inverter_delay} + \text {and_gate_delay} $$

draft

« sicp-ex3-28 sicp-ex3-30 »

Comments