Can this boolean expression be simplified?

﹥>﹥吖頭↗ 提交于 2019-12-04 02:11:33

问题


(A Or B) And Not (A And B)

回答1:


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




回答2:


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.




回答3:


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




回答4:


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




回答5:


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.



来源:https://stackoverflow.com/questions/1723741/can-this-boolean-expression-be-simplified

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!