Can this boolean expression be simplified?

后端 未结 5 1295
天涯浪人
天涯浪人 2021-01-15 22:16
(A Or B) And Not (A And B)
相关标签:
5条回答
  • 2021-01-15 22:38

    As others have said, this is an XOR. Note that the best ways to solve this are either a logic table as NawaMan used, or with a Karnaugh map. In EE, Karnaugh maps are more common since they lend themselves more readily to complex expressions with multiple inputs.

    If you're implementing this in hardware, Karnaugh maps are nearly always the best way to go as they give you the minimum number of gates required to implement the required outputs. Also, unlike in software, you may not have an xor gate available in hardware, but each gate can be expressed as a combination of other gates. AND can be made from NAND, etc, which will increase the number of gates required but can reduce the cost of your device.

    0 讨论(0)
  • 2021-01-15 22:48

    If you have Xor or equality in your atomic operations, yes, it is exactly the former or the negation of the latter.

    0 讨论(0)
  • 2021-01-15 22:50

    isn't this just an exclusive or? sometimes indicated by this syntax: A ^ B

    0 讨论(0)
  • 2021-01-15 22:56

    It is XOR (See table below).

    A B (A|B) (A&B) !(A&B) (A|B)&(!(A&B))
    T T   T     T      F        F
    T F   T     F      T        T
    F T   T     F      T        T
    F F   F     F      T        F

    You can also use not equal operation like (A != B).

    Hope this helps.

    0 讨论(0)
  • 2021-01-15 22:59

    You're looking for a XOR, depending on the language it may be a single operation.

    0 讨论(0)
提交回复
热议问题