代码之家  ›  专栏  ›  技术社区  ›  Mattia Righetti rmooney

如何有效地减少这个逻辑句子?

  •  -2
  • Mattia Righetti rmooney  · 技术社区  · 7 年前

    我有一个描述电路的句子,如下所示:

    I x (Q1 x Q0 + not Q1 x not Q0) + not I x (not Q1 x Q0 + Q1 x not Q0)
    

    我把它翻译成这样:

    I and ((Q1 and Q0) or (!Q1 and !Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0)) ->
    I and ((Q1 and Q0) or !(Q1 or Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0)) ->
    I and (!(Q1 xor Q0)) or !I and (Q1 xor Q0)
    

    1 回复  |  直到 7 年前
        1
  •  1
  •   Leandro Caniglia Charlie    7 年前

    减少

    1. I and ((Q1 and Q0) or (!Q1 and !Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0))
       ≡
    2. I and ((Q1 and Q0) or !(Q1 or Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0))
       ≡
    3. I and !(!(Q1 and Q1) and (Q1 or Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0))
       ≡
    4. I and !(Q0 xor Q1) or !I and (Q0 xor Q1)
       ≡
    5. I xor (Q0 xor Q1)
       ≡
    6. I xor Q0 xor Q1
    

    原因

    3.4:定义 xor

    4.5:定义

    异或