From aa4eb5b17a5d4da25259a4163eb86400c4c4b52f Mon Sep 17 00:00:00 2001 From: henz Date: Mon, 1 Jul 2024 11:48:34 +0800 Subject: [PATCH] fixes #836 --- xml/chapter3/section3/subsection4.xml | 53 +++++++++++++++------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/xml/chapter3/section3/subsection4.xml b/xml/chapter3/section3/subsection4.xml index 9d5ca6f62..311d55674 100755 --- a/xml/chapter3/section3/subsection4.xml +++ b/xml/chapter3/section3/subsection4.xml @@ -570,21 +570,6 @@ function logical_and(s1, s2) { } - - logical_or - -function logical_or(s1, s2) { - return s1 === 0 && s2 === 0 - ? 0 - : s1 === 0 || s1 === 1 - ? s2 === 0 || s2 === 1 - ? 1 - : error(s2, "invalid signal") - : error(s1, "invalid signal"); -} - - - @@ -673,12 +658,32 @@ function and_gate(a1, a2, output) { and_gate. - - or_gate - get_signal - after_delay - logical_or - + + +