Recognized by Council Add XOR gates

    Joined
    Jun 29, 2013
    Messages
    72
    Reaction score
    23
    We have OR, AND, and NOT gates, but a XOR gate is sadly missing, leading us to have to construct one out of other gates which is somewhat annoying and consumes a lot of space.

    For anyone who doesn't know what a XOR gate does, it sends a signal when one and ONLY one signal to it is active. All signals off, all on, or more than one on -> no signal.

    My probably unclear to someone not already familiar with logic truth table:
    Code:
     01
    001
    110
    Also, some suggestions on how to implement this:
    XORs will change state whenever an input changes state. Implementation should be to take the inputs and add them, and if it is odd, output true
    The true on one-only is not the important bit. The important bit is that any input may toggle the output. When one input changes in your example, the output would change to false. This extended definition of XOR is more useful than your limited definition.
     
    Last edited:

    kiddan

    Cobalt-Blooded Bullet Mirror
    Joined
    May 12, 2014
    Messages
    1,131
    Reaction score
    358
    • Top Forum Contributor
    • Legacy Citizen 4
    • Purchased!
    Yes this would be very helpful to create vaults where the door is locked by logic blocks. With an XOR gate people won't be able to open it with just turning them all on. :P
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    ...and memory cells (they are somewhat tricky to make out of other blocks since it works different than in Minecraft).
     
    Joined
    Aug 30, 2013
    Messages
    1,744
    Reaction score
    323
    So...XOR gates are used to make a signal ONLY if the 3 activators to it are turned on, and only 3?

    I have no idea, but if it helps make people make more Logic stuff then go for it.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    XORs will change state whenever an input changes state. Implementation should be to take the inputs and add them, and if it is odd, output true
     
    Joined
    Jun 29, 2013
    Messages
    72
    Reaction score
    23
    So...XOR gates are used to make a signal ONLY if the 3 activators to it are turned on, and only 3?
    XOR gates send a signal when there is only one signal to them. So one off and one on -> on, no matter which one is on and which is off. Both off or both on -> off. My example has only two inputs, but if you had a XOR with more than two, it would only activate with ONE on.

    Edit:

    XORs will change state whenever an input changes state. Implementation should be to take the inputs and add them, and if it is odd, output true
    What if someone hooks up more than two inputs to a XOR? This will break. A XOR returns true if only one input is true. If I hooked up three inputs, all true, your implementation would return true instead of false.
     
    Last edited:
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    What if someone hooks up more than two inputs to a XOR? This will break. A XOR returns true if only one input is true. If I hooked up three inputs, all true, your implementation would return true instead of false.
    In real life/Minecraft this is solved by cascading several XOR gates, but since the intention behind XOR blocks is simplification and saving space it should simply be implemented like ltmauve suggested it.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    What if someone hooks up more than two inputs to a XOR? This will break. A XOR returns true if only one input is true. If I hooked up three inputs, all true, your implementation would return true instead of false.
    The true on one-only is not the important bit. The important bit is that any input may toggle the output. When one input changes in your example, the output would change to false. This extended definition of XOR is more useful than your limited definition.
     
    Joined
    Jun 29, 2013
    Messages
    72
    Reaction score
    23
    I don't understand how that would be better (maybe you could explain some examples please?), but since I've got two of you saying that, I'll go with your judgement over mine. (Edited first post quoting you on that.)
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    The extended version is better because say you have a hanger with a logic block next to each pad, and then you can wire all of them into one XOR gate, and each button can open or close the hanger door.
     
    • Like
    Reactions: Guard13007

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Even currently you just need to output the signals of 2 activation to 2 not-blocks and these to the neighbour activation modules.
     
    Joined
    Jun 30, 2013
    Messages
    351
    Reaction score
    347
    • Community Content - Silver 1
    • Purchased!
    • Legacy Citizen 4
    XORs are incredibly useful. YES we CAN build them, out of four other blocks... but really... must we?
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    We should also have flip-flops (for these we need 8 blocks) :)

    If we can't have 2 different inputs for them (like slave + effect), they should require:
    1. input from and 1
    2. optional: input from and 2
    3. input from anything but and
    4. output to anything but and
    If both connected input ANDs are true, they should read the anything-but-and and set their internal state to the value.
    If one connected AND is true, they should output a signal to the anything-but-and.
     
    Joined
    Feb 3, 2014
    Messages
    41
    Reaction score
    3
    i dont know how logic works (probely pretty simple) but full support because of all the cool things you guys can build with it
     

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,107
    Reaction score
    1,228
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    Agreed. It's an essential logic tool, and it's obnoxious to have to make them out of numerous blocks, especially when space is limited for whatever reason.

    That's the same reason I supported the creation of the redstone repeater block way back in the old days of Minecraft. Sure, you could make them out of multiple blocks, but it would be simpler to have a commonly used object as one block.
     
    Joined
    Mar 28, 2014
    Messages
    76
    Reaction score
    9
    What if someone hooks up more than two inputs to a XOR? This will break. A XOR returns true if only one input is true. If I hooked up three inputs, all true, your implementation would return true instead of false.
    In real life/Minecraft this is solved by cascading several XOR gates, but since the intention behind XOR blocks is simplification and saving space it should simply be implemented like ltmauve suggested it.
    It could be simplified by adding them up and only returning true if the result equaled 1.

    The true on one-only is not the important bit. The important bit is that any input may toggle the output. When one input changes in your example, the output would change to false. This extended definition of XOR is more useful than your limited definition.
    "His limited definition" is the correct definition of XOR. To change the definition of it wouldn't make sense.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    It could be simplified by adding them up and only returning true if the result equaled 1.


    "His limited definition" is the correct definition of XOR. To change the definition of it wouldn't make sense.
    The extended version is better because say you have a hanger with a logic block next to each pad, and then you can wire all of them into one XOR gate, and each button can open or close the hanger door.
    "The extended definition of XOR" of yours actually is the definition of an odd-parity gate.
    And there also is the following definition of XOR:
    returns false if all or no inputs are true; returns true in any other case​

    I suggest adding both odd-parity and XOR(both definitions) as gates.
    Otherwise, we'll end up in definition wars :confused: