Logic systems feature requests

    Joined
    Dec 13, 2014
    Messages
    77
    Reaction score
    16
    I have some requests and some justifications for them.

    In the following I mean :

    XOR input : more than one signal, at least one true and one false.
    OR input : any true signal
    AND input : all input signals are true
    NOT : all input signals are false

    1) Lock 'secondary cockpits' to the assigned weapon.
    This way a useable interior of the ship could permit crew access to fixed weapons without the inevitable "I hit up arrow and turned off turret AI"

    2) Permit activation of some (all) weapons via logic gates.
    My use case is a trigger that turns on an astro beam when the gun ports are open, but there are plenty of others.

    3) Accept 'state' output from activated items.
    Items which can be on or off should also assert that state in logic. Doors would send 'false' when closed, jump drives would send 'true' when charged, false when discharged.

    edit: Looks like some items do this, if you put an activation block next to them

    4) Jump drive logic
    Jump drive modules should charge with an 'or' gate and jump with an 'and' gate. This would permit the use of 'useable interiors' that had a charge/jump activation button.

    5) Ship docks should assert true/false when a ship is docked.
    My use case is automatic blast doors over a hangar, but there are plenty of others.

    6) Turret docks should 'disable' with an OR signal and undock with an 'and' signal.
    It should be possible to disable turrets via signal without them undocking.
    Also, sending 'false' to a turret dock would lock it and prevent accidental undock.

    7) sensor controllers that sense enemies should send a true signal.

    8) if a door has AND or NOT signal going to it, it remains in whatever state it is in. In other words, if all inputs are true, it remains open. If all inputs are false, it remains closed and cannot be manually opened. If the signal is XOR, or no signal it can be manually activated.

    I'd prefer if logic gates were only visible in edit mode and were nocollide.


    More later
    Last edited by Nox; 21 minutes ago
     
    Last edited:

    Jaaskinal

    ¯\_(ツ)_/¯
    Joined
    Jan 19, 2014
    Messages
    1,377
    Reaction score
    646
    • Legacy Citizen 4
    • Wired for Logic Gold
    • Thinking Positive
    NOT would really be NAND IIRC
    5) already exists.
    7) exists if you are clever :p
    9) just no.
     
    Joined
    Dec 13, 2014
    Messages
    77
    Reaction score
    16
    Ship docks assert when a ship is docked? I haven't seen this. I'm not able to link it.

    Also the area trigger needs to be momentary instead of a toggle. it's much harder if not impossible to determine state just from a change, considering you really have to complicate circuits to try to lock out logical conditions such as "multiple events before logic is fully processed" etc.

    I don't want to have to build a latch to just hold/reset an event. That is awkward and I don't see the possible benefit over just having things like area and 'stand on' be toggles.

    Yes I know ...



    But that shouldn't be necessary.



    UPDATE :

    Ok, I see - I hadn't seen that in any description.

    If you put an activation next to a dock, the activation picks up the status from the block. That was not made clear to me in anything I've read, so thanks.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    XOR input : more than one signal, at least one true and one false.
    That's not that helpful. If you want a scaling XOR, use the definition "has an odd number of on inputs" which means that the XOR toggles with every input changed.
     
    Joined
    Dec 13, 2014
    Messages
    77
    Reaction score
    16
    XOR is helpful in the context I've use it for the purposes that I've described. How is it not helpful?

    I just mean "not all false" and "not all true" - which is XOR, which is what I meant.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    When referring to the logic function XOR, retaining that toggalbility is the important part, because scaling that using the exsisting blocks is a pain. It takes 4 blocks to make a 2-input XOR. 4 more blocks must be added for each input. That is why toggling is so important. As for your definition, it can be implemented using (OR -> AND <-(NOT <-(AND), and that also allows you to do it using more than two inputs with only 4 blocks.
     
    Last edited:
    Joined
    Dec 13, 2014
    Messages
    77
    Reaction score
    16
    Oh no no, I mean that the block in question behave that way if XOR logic is sent to it - meaning if a mix of signals is present as inputs.

    Yes god I know. I spent 2 hours last night coming up with a simple logical circuit to handle some door / dock functions. It's a chore.
     
    Joined
    Apr 29, 2015
    Messages
    17
    Reaction score
    16
    • Purchased!
    [Edit: MY logic regarding multiple input XORs is wrong.

    A^B^C....^Z is only true if ONE of A, B, ... Z is true.

    I say this because I would love to see XOR blocks in game, as they are a fundamental part of any adder circuit. In which case, a correct implementation of an XOR block should be pretty simple : only send true when a single input is true.
    ]

    I would also like to see NAND gates implemented. Another fundamental gate with 2 useful properties: first, you can make any gate with just NANDs, and following on from that, you can make any combinatorial logic with just NANDs. Or NORs, if you're so inclined.
     
    Last edited:
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    A^B^C....^Z is only true if ONE of A, B, ... Z is true.
    I thought an XOR is true if the following 2 conditions are BOTH true:
    • At least 1 of the inputs is HIGH
    • At least 1 of the inputs is LOW
    (this is also how most circuit-simulators I know about handle an XOR [the modulo-definition of{if n be the number of HIGH-inputs, output HIGH only if n%2=1} is cared for in the odd-parity gate, for those wondering])
     
    Joined
    Apr 29, 2015
    Messages
    17
    Reaction score
    16
    • Purchased!
    Ah, i'm sorry to say. Wikipedia tells me that it is in fact, I, who is wrong. Yummy humble pie at 2am :)

    Still, XOR and NAND gates would be useful. As long as I'm not programming them, it seems.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    A^B^C....^Z is only true if ONE of A, B, ... Z is true.
    I thought an XOR is true if the following 2 conditions are BOTH true:
    • At least 1 of the inputs is HIGH
    • At least 1 of the inputs is LOW
    (this is also how most circuit-simulators I know about handle an XOR [the modulo-definition of{if n be the number of HIGH-inputs, output HIGH only if n%2=1} is cared for in the odd-parity gate, for those wondering])
    With Megacrafter127 logic, it would not be very useful in some cases.
    • X = Exclusive = Just one. (At least you expect this)
    NAND:
    0 .nand. 0 = not. 0 = 1
    0 .nand. 1 = not. 0 = 0
    1 .nand. 0 = not. 0 = 0
    1 .nand. 1 = not. 1 = 0
    nand.... 0 0 0 0 = 1
    nand.... 0 0 1 0 = 0​
    OR:
    0 .or. 0 = 0
    0 .or. 1 = 1
    1 .or. 0 = 1
    1 .or. 1 = 1
    or.... 0 0 0 0 = 0
    or.... 0 0 1 0 = 1​
    XOR:
    0 .xor. 0 = 0
    0 .xor. 1 = 1
    1 .xor. 0 = 1
    1 .xor. 1 = 0
    xor.... 0 0 0 0 = 0
    xor.... 0 0 1 0 = 1, exclusive 1 ???
    xor.... 0 1 0 1 = 1, even 1 ???
    xor.... 0 1 1 1 = 1, non-exclusive 1 ???
    xor.... 1 1 1 1 = 0
    => XOR is confusing.​


    Also a not-so-funny-fact:
    In Java, the | operator acts like a binary-or (A | B = A or B)

    But in my math lecture|course I heard | works differently in math!
    And I just thought: "f**k, now I have to remember 2 different standards!"​
     

    Edymnion

    Carebear Extraordinaire!
    Joined
    Mar 18, 2015
    Messages
    2,709
    Reaction score
    1,512
    • Purchased!
    • Thinking Positive Gold
    • Legacy Citizen 5
    Yeah, the X in XOR is for Exclusive, meaning only one of the inputs is valid.

    A NAND is just simply an AND gate with a NOT on it. Don't see a lot of need for a dedicated NAND block when its only a 1 block saving.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Yeah, the X in XOR is for Exclusive, meaning only one of the inputs is valid.

    A NAND is just simply an AND gate with a NOT on it. Don't see a lot of need for a dedicated NAND block when its only a 1 block saving.
    Agree, but only because other stuff is more important.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    XOR when talking to a electrical engineer pretty much always means parity XOR, which has toggling.
    Megacrafter127 What simulator are you using? Verilog, and I'm pretty sure VHDL, use parity-XOR.

    Also seeing the 1-only idea of XOR again and again when XOR has been brought up has got me curious: where would you use it? Is it honestly a purpose where a few or gates wouldn't work just as well?

    p.s. I figured out how to get an n-bit XOR that uses buttons with only 5 additional blocks besides the buttons. Two nots, two buttons, and a toggle. it doesn't work with simulatious flipping though.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Act1 <-->
    Act2 <--> XOR
    Act3 <-->
    <Xor> As one button can not be disabled by it's own signal, it would disable the others when XOR becomes negative (2 inputs).
    <Error> Unfortunately it also becomes negative if you disable the only 1-input, meaning all others will become 1.

    .... |–<–<–<–<–<–<–|
    Button1 -> Or <-> Act <-->
    Button2 -> Or <-> Act <--> XOR
    Button3 -> Or <-> Act <-->

    That's the only working (without error) setup.
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    Well, it isn't so much an XOR as it is a way to toggle a value whenever a switch is flipped. It's not actually useful for something like reading parity values.

    Anyway, what is the purpose of 1-only XOR?
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Anyway, what is the purpose of 1-only XOR?
    An air-lock.
    If 1, open left.
    If not 1, open right.​

    Add delay to open, no delay to close ... well that makes it more complex ...
     
    Joined
    Aug 28, 2013
    Messages
    1,831
    Reaction score
    374
    • Legacy Citizen 2
    • Top Forum Contributor
    • Legacy Citizen
    Well, let's say you have three buttons: One on the inside of the ship, one in the airlock, and one outside the ship. You want to be able to switch the door state at all of them. So you would want parity-XOR. But really, it's easier just to chain the switches/buttons together in a lot of cases.

    As for getting your delay in deactivating the door, use a delay and an or.