Portal 2 Puzzle Maker/Logic Gates
It is possible to make some basic logic gates on the Puzzle maker.
Prefer To Watch
Watch it here.
To achieve AND logic just connect two buttons to one item
To make a latch first place a button. Connect this button to a laser emitter lined up with a laser catcher. Wire the laser catcher to a second laser emitter with it's beam lined up on a laser relay. On the other side of the relay place another laser emitter and connect it to the relay. Finally connect all the components you wish to connect to your latch to the relay.
Comment: Is the first laser and catcher really necessary? I've created a latch by placing two lasers facing a relay, wiring the relay to one and the input to the other. Works like a charm.
If there are too many components that you want to connect to your relay make a laser emitter lined up with a laser catcher or relay. Wire the emitter to the relay from the latch and then connect the components you need to attach to the latch to the laser catcher or relay depending on what you placed.
Create a basic latch but extend the laser that is power by the relay two blocks back and place a moving panel between the relay and the laser. Next connect the panel to a reset button and the relay
Another approach is to feed the reset line through an inverter (laser which is "Start enabled"), then feed this into the same laser which the relay output connects to. Using this trick, and by playing with the heights of the lasers, a resetable latch can be made in a single 1x1 pit.
- To create OR logic place a laser relay and a laser emitter on each side of the relay, up to four, make a latch for each of the emitters. Now connect your buttons to the latches and the items you want OR control on get connected to the laser relay.
If there are too many components connected to your relay and you need to connect more place a laser emitter lined up with a laser catcher or relay. Connect the relay from the OR gate to your laser emitter and the laser catcher or relay gets connected to your items.
- Another method is to use a redirection cube (no dropper) aimed at a laser catcher connected to the desired output. Link your inputs (up to four) to lasers directed at the cube. Should you wish to have more than four inputs, simply add an extra cube to the chain.
- XOR gates are particularly useful in adders and related circuits, and can be made in a single 1x1 pit.
Assuming two inputs A and B, the trick is to write the XOR equation as (A + B)./(A.B) = A./(AB) + B./(AB) (where "+" is OR, "." is AND and "/" is NOT). Generate /(AB) by wiring A and B into a laser which is "start enabled", and put a catcher directly opposite. Create the OR by placing a relay, with two lasers pointing into it. Wire A and /(AB) into the first of these lasers, and B and /(AB) into the second laser. The output of the relay is the output of the XOR.
To fit the whole lot into a 1x1 pit, place the relay in the bottom of the pit, and the two lasers shining into it on the north and south sides of the pit. Place the inverting laser and catcher on the east and west sides, but raise them so this laser doesn't shine into the relay.
- A two-input XOR gate can also be created by creating an OR gate using the redirection cube method described above and placing a glass panel between the cube and the catcher. Link both of your inputs to the panel so that when both are pressed the panel is raised, blocking the laser. This method requires a slightly larger room than the above method (3x1) and is a little more expensive in terms of item count.
Basic delayers or uncontrollable delayers are created by placing an excursion funnel with a box button at the end of it. Place a box dropper above the excursion funnel, make sure that "auto drop first cube" and "auto respawn cube" are disabled. The length of the delay is changed by how far away the box dropper is from the button.
Advanced delayers or controllable delayers are very complex. First create four raised blocks on one side place two laser catchers and on the other two laser emitters. Place a button, the one that you want to start the delay, and connected it to the first laser. The laser catcher that faces the first laser should be connected to the second laser emitter. The second laser emitter should be set to on by default, so that when the laser gets powered it turns off, this creates a NOT gate. Now create a basic latch (non-resetable) and connect the input to the button you are using at the start of the delay. The output should be connected to a basic delayer, as detailed above, the delayer should have a one block space between the button and the dropper. Next create the item you want to use as you output and connect the box button from the basic delayer to it and also connect the second laser catcher. To control the length of the delay change the button "on" time.