How to get XOR gates to hook up with T flip flop

    Joined
    Jul 14, 2013
    Messages
    98
    Reaction score
    27
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen
    I've been trying to hook up an xor gate to a T flip flop to a D flip flop (I can't figure out how to get these things to be of any use otherwise for actual bit storage). The way I've tried to do this is hooking up an XOR block to a button which is then hooked up to a T flip flop which is then hooked up to one of the XOR inputs, the other input is the user input. what should happen is that, assume I originally start out at input a = 0 and input b = 0, where a is the out put from the tflip flop and b is the user input, by switching b = 1, my t flip flop should turn to high, which should turn my a =1 which should turn my output to button to 0, which will not activate the button leaving the tflip flop at low (or 0). This first part of this works, but it does not reset my output to 0, and alters the behavior of the AND output gate to appear at least to be bugged to be an OR gate, as even if one input is low, it will remain at a high state. Additionally hooking up those outputs to a different AND gate, connected the same except with no output results in correct functionality, however if I were to say use both AND gate outputs to another AND gate I get the same error on the final AND gate

    http://www.physics.udel.edu/~watson/scen103/xor.gif

    AND gate out the "C" reference here. This is how I implemented my XOR gate in starmade exactly.

    Here is a link to two gifs that show the situation, in the first it proves the XOR works, in the second it shows the inconsistency of and gates, despite the same connections.

    EDIT don't know why, the forums F'd up and they didn't includ my other link, updated above
     
    Last edited:

    Crashmaster

    I got N64 problems but a bitch ain't one
    Joined
    Oct 18, 2013
    Messages
    452
    Reaction score
    360
    Well based on a quick glance; there is no XOR block in the game. Only OR blocks.
    Also as it seems that you have some previous experience I recommend searching the logic forum here for 'instant pulses' to familierize yourself with some of the peculiarities of StarMade's logic simulator before running into what can only be considered bugs that it causea
     
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    I know there are still some race condition bugs involved with And gates where you can get false readings. Beyond that I have no idea what you are attempting to build so I can't offer any advice. I can build a mean circuit but can't picture them based on text explanations.
     
    Joined
    Jul 14, 2013
    Messages
    98
    Reaction score
    27
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen
    I know there are still some race condition bugs involved with And gates where you can get false readings. Beyond that I have no idea what you are attempting to build so I can't offer any advice. I can build a mean circuit but can't picture them based on text explanations.
    updated the post, forums messed up and the link wasn't added where it should have been.
     
    Joined
    Jul 14, 2013
    Messages
    98
    Reaction score
    27
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen
    Looks like it might be a position based bug. If you move the entire circuit elsewhere does the behavior change?
    moving the circuit, even rebuilding it from scratch with out copying, results in the same effect when moved elsewhere on the same surface
     

    Crashmaster

    I got N64 problems but a bitch ain't one
    Joined
    Oct 18, 2013
    Messages
    452
    Reaction score
    360
    ...which should turn my a =1...
    StarMade logic stops evaluating here to prevent any recursion.

    ...which should turn my output to button to 0, which will not activate the button leaving the tflip flop at low (or 0)...
    The AND block is working as intended by StarMade, the instances of it being on with only one of it's inputs = 1 is because it already met the conditions for being on three logic steps after the user button is pressed. StarMade logic is step-by-step through each block without displaying incremental changes and will not loop back to the start.

    I built the thing not knowing it's purpose really. Would swapping the left side activation block for a button block give you the functionality you need?
     
    Joined
    Jul 14, 2013
    Messages
    98
    Reaction score
    27
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen
    [
    StarMade logic stops evaluating here to prevent any recursion.



    The AND block is working as intended by StarMade, the instances of it being on with only one of it's inputs = 1 is because it already met the conditions for being on three logic steps after the user button is pressed. StarMade logic is step-by-step through each block without displaying incremental changes and will not loop back to the start.

    I built the thing not knowing it's purpose really. Would swapping the left side activation block for a button block give you the functionality you need?

    The functionality is clear, conversion from T flip flop to D flip flop (or JK or SR, those would work as well), since the implementation of T flip flops is useless in many computational scenarios, such as having the ability to set and reset values as bits given real memory buses, but is valuable in terms of the small amount of space it takes up, where a typical D flip flop would take up much more space in starmade if implemented, and cause more lag.

    For example if I want to store a bit in a T flip flop, and copy it over, I have to first send an activation signal, then, for each single bit I have to use, I need to send the bit through XOR between the two states, to see if they are different, so that I know to actually send another activation signal on the otherside, but this doesn't work in practice inside starmade.

    There are numerous weird workarounds needed for working in a tflipflop system that end up either not working under starmades logic system or being too costly interms of the number of logic units used.

    Swapping the left activation for a button would not help, the idea is that I am sending a constant signal 'D' to be set in a location.

    Ultimately I want to be able to, given a choose enable signal, set a bit at location X, from location Y, and when choose is off, X still retains the value. with T flip flops I can set T = 1 if T = 0 initially and Y = 1 and enable = 1, but if enable is toggled, T will be toggled, and if i set Y = 0, T will stay 1.