【问题标题】:Convert the following expression to use only NAND gates将以下表达式转换为仅使用 NAND 门
【发布时间】:2018-03-08 05:48:55
【问题描述】:

我有以下表达式('表示NOT)...

e'(a+b)

首先我展开...

e'a + e'b

德摩根定律...

(e'a +e'b)'
((e'a)'(e'b)')'

现在我被困住了。我使用的每个 NAND 门最多只能接受 2 个输入。我可以使用任意数量的 NAND 门,但我应该尝试提出使用最少门的表达式。

我在正确的轨道上吗?我该如何继续?

【问题讨论】:

    标签: math boolean boolean-logic boolean-expression


    【解决方案1】:

    首先,我建议服用:

    e'(a+b)
    

    并使用更详细的符号来编写它,以使转换更容易识别为已正确完成:

    (not e) and (a or b)
    

    正如 Rory Daulton 所建议的,第一步是了解如何使用 nand 呈现基本逻辑操作。

    1. 正如 Rory 所指出的,不能证明 e 等同于 e nand e。
    2. 您可以通过 nand 的定义证明 a 和 b 等价于 not (a nand b)。使用上述结果,我们仅使用与非门恢复等效表达式 (a nand b) nand (a nand b)。
    3. 您可以证明 a 或 b 等价于 De Morgan 的 not((not a) 和 (not b)),因此根据 nand 的定义 (not a) nand (not b)。我们可以使用上述结果仅使用 nand 门推导出等价的表达式 (a nand a) nand (b nand b)。

    回到我们的表达方式:

    (not e) and (a or b)
    

    我有点喜欢由外而内的工作,所以我们从最外面的操作开始,并且,使用上面 2 的规则得到:

    (not e) and (a or b)
    2=> ((not e) nand (a or b)) nand ((not e) nand (a or b))
    

    现在我们在同一级别有四个子表达式,我们可以从左边开始,然后向右工作:

    (not e) and (a or b)
    2=> ((not e) nand (a or b)) nand ((not e) nand (a or b))
    1=> ((e nand e) nand (a or b)) nand ((not e) nand (a or b))
    3=> ((e nand e) nand ((a nand a) nand (b nand b))) nand ((not e) nand (a or b))
    1=> ((e nand e) nand ((a nand a) nand (b nand b))) nand ((e nand e) nand (a or b))
    3=> ((e nand e) nand ((a nand a) nand (b nand b))) nand ((e nand e) nand ((a nand a) nand (b nand b)))
    

    这样的电路可能如下所示:

    e--+---|\   e'
       |   > >o----------------------|\  (e'(a+b))'
       +---|/                        > >o--------+---|\
                                 +---|/          |   > >o--e'(a+b)
    a--+---|\   a'               |               +---|/
       |   > >o--------|\        |
       +---|/          > >o------+
                   +---|/   a+b
    b--+---|\      |
       |   > >o----+
       +---|/   b'
    

    【讨论】:

      【解决方案2】:

      这看起来不像是正确的轨道。

      您的原始表达式只有三个操作:NOT (e')、OR (a+b) 和 AND(在我给出的最后两个表达式之间)。您应该弄清楚如何执行这三个操作中的每一个,然后将它们组合成一个整体结构。在这类问题中,了解如何执行这些操作至关重要。

      这里是第一个方法:NOT x 等价于x NAND x,因此e' 等价于e NAND e。从这里继续。

      【讨论】:

      • 好的,我明白了。我想出了(((ee)'a)'((ee)'b)')'。这个答案在你看来如何。从外观上看,我想我可以只使用 NAND gates 来创建它。
      猜你喜欢
      • 1970-01-01
      • 2012-04-08
      • 2020-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多