What are XAND and XOR

后端 未结 17 1409
旧巷少年郎
旧巷少年郎 2020-12-06 04:51

What are XAND and XOR? Also is there an XNot

相关标签:
17条回答
  • 2020-12-06 05:41

    There's a simple argument to see where the binary logic gates come from, using truth tables, which have come up already.

    There are six that represent commutative operations, in which a op b == b op a. Each binary operator has an associated three column truth table that defines it. The first two columns can be fixed for the defining tables for all the operators.

    Consider the third column. It's a sequence of four binary digits. There are sixteen combinations, but the constraint of commutativity effectively removes one row from the truth tables, so it's only eight. Two more get knocked off because all truths or all falses isn't a useful gate. These are the familiar or, and, and xor, plus their negations.

    0 讨论(0)
  • 2020-12-06 05:41

    The truth tables on Wiki clarify http://en.wikipedia.org/wiki/Logic_gate There is no XAND, and that is the end of part 1 of the questions legitimacy. [The point is you can always make do without it.]

    I personally have mistaken XNOT (which also doesn't exist) for NAND and NOR which are theoretically the only thing you need to make all the other gates link

    I believe the confusion stems from the fact that you can use either NAND or NOR (to create everything else [but they are not needed together]), so it's thought of as one thing that's both NAND and NOR together, which basically leaves the mind to supplant the remaining name XNOT which isn't used so it's what I wrongly call XNOT meaning it's either NAND or NOR.

    I suppose one could also wrongly in quick discussion try to use the XAND like I do XNOT, to refer to the "a single gate (copied in various arrangements) makes all other gates" logical reality.

    0 讨论(0)
  • 2020-12-06 05:42

    XOR is Exclusive Or. It means "One of the two items being XOR'd is true, but not both of them."

    TRUE XOR TRUE : FALSE
    TRUE XOR FALSE : TRUE
    FALSE XOR TRUE : TRUE
    FALSE XOR FALSE: FALSE
    

    Wikipedia's XOR Article

    XAND I have not heard of.

    0 讨论(0)
  • 2020-12-06 05:42

    In the book written by Charles Petzold titled "Code" he says there are 6 gates. There is the AND logical gate, the OR gate, the NOR gate, the NAND gate, and the XOR gate. He also mentions the 6th gate briefly calling it the "coincidence gate" and implies it's not used very often. He says it has the opposite output of a XOR gate because a XOR gate has the output of "false" when it has two true or two false sides of the equation and the only way for a XOR gate to have its output be true is for one of the sides of the equation to be true and the other to be false, it doesn't matter which. The coincidence is the exact opposite of this because with the coincidence gate if one is true and the other is false (doesn't matter which is which) then it will have its output be "false" in both those cases. And the way for a coincidence gate to have its output be "true" is for both sides to be either false or true. If both are false the coincidence gate will evaluate as true. If both are true then the coincidence gate will also output "true" in that case as well.

    So in the cases where the XOR gate outputs "false", the coincidence gate will output "true". And in the cases where the XOR gate will output "true", the coincidence gate will output "false".

    0 讨论(0)
  • 2020-12-06 05:45

    To add to this, since I was just dealing with it, if you are looking for an "equivalence gate" or a "coincedence gate" as your XAND, what you really have is just "equals".

    If you think about it, given XOR from above:

    F XOR F = F
    F XOR T = T
    T XOR F = T
    T XOR T = F
    

    And we expect XAND should be:

    F XAND F = T
    F XAND T = F
    T XAND F = F
    T XAND T = T
    

    And isn't this exactly the same?

    F == F = T
    F == T = F
    T == F = F
    T == T = T
    
    0 讨论(0)
  • 2020-12-06 05:45

    XOR (not neither and not both) B'0110' is the inverse (dual) of IFF (if and only if) B'1001'.

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