This simulates the interactions of logic gates. Press S to save your circuit. Copy the code and paste in the comments to share it with everyone. Press L to load a circuit: it will ask for the code; copy and paste the code there. If you accidentally press L, type "cancel" to keep your circuit from being deleted. Scroll or use the number keys to select a component and click to place it. Click a component and drag to make a wire connecting it to another component. The arrow on the wire indicates the direction in which it connects. Make the exact same connection again to delete it. Hold D and click a component to delete it. Hold M and click a component and drag to move it. Press space to toggle between modes: Editing: can only place and connect components. Running: can only interact with the circuits you've made. Press T to toggle "Ticks per second" slider. Components, from left to right: OR: on if at least 1 input is on. AND: on if all inputs are on. XOR: on if an odd number of inputs are on. NOR: on if no inputs are on. NAND: on if at least 1 input is off. XNOR: on if an even number of inputs are on. Switch: toggles state when clicked. Button: on while clicked. Light: on if its input is on.
This is one of my most complicated projects yet, and one of the ones I'm most proud of. It's also 100% pen! If something doesn't work right, slow down the tick speed to more easily see what's going on. You may have to click and hold a bit when doing some actions, especially when you have many components and/or connections; Scratch struggles to keep up with the simulation. Your mouse must be clicked when the next tick starts for a button or switch to react, so be sure to hold down long enough when at a low ticks per second setting.