HOME  |  WEB DESIGN  |  COMPUTING  |  GRAPHICS/PHOTOS  |  MUSIC
Early UK Computer Mags Commodore 500/600/700 CBM BASIC Program Lister Commodore PET Brochure Spam Safe Email Address? DLX Simulator Gnome's Computers Java Applets Introduction Solar System Logic Gates TrafficSim - T-Junction TrafficSim - Roundabout TrafficSim - Download Magazine Indexer Fixing Firefox Extensions

Logic Gates

Java Applets

This applet simulates electronic logic gates and circuits. To build up a circuit drag the required gates from the toolbar at the top into the main area. As a gate is added to the main area it gains a reference number and sprouts some input and output 'prongs'. The leftmost 'gate' (the circle) in the toolbar is an 'input point' and not really a gate. Input points are used to set the input states of your circuit.

To join gates together click on any of the 'prongs' and drag a line to another gate's connection. Note that you can only join inputs with outputs though there is no restriction on the number of lines you can connect to each 'prong'. While you are drawing a link then pressing the space bar will flip the orientation of the line. Moving a gate will not detach any links to other gates but will move them around with the gate.

Right-clicking on gates (but not input points), links or the background displays a pop-up menu. For a gate the menu enables you to add or delete inputs, or to delete the whole gate (all of its connections must be deleted first). For links you have the options: to delete it, to flip it or to change its colour. The menu that appears when you right-click the background has options to change the background colour, optionally display a grid, allows the whole circuit to be deleted (with confirmation) and sets the output display status. The latter option determines whether you see the logic states of the whole circuit, just the circuit outputs (any output of a gate that is not connected to another gate's input) or have the logic states turned off. When turned on then red is logic 0 (off) and green is logic 1 (on). Pressing 'z' or 'Z' when the grid is turned on will alter its size.

To change the state of an input point just right click it or, alternatively, use the number keys 1 to 9 to toggle the state of inputs 1 to 9 (if you have more than 9 inputs you will have to use the mouse on those numbered 10 and above). If you have set the circuit to display the logic levels throughout the entire circuit then you should see some of the states further along change when you change the logic level of an inputs point.

Adder circuit

To the right is the circuit for a simple adder circuit made up from a two-input EX-OR gate plus a two-input AND gate. Try building this circuit if you are trying out the applet for the first time. The top output is the SUM output and the bottom one is the CARRY output. It demonstrates the following truth table:

Input 1Input 2SUMCARRYExplanation
00000 + 0 = 0 (no carry)
01100 + 1 = 1 (no carry)
10101 + 0 = 1 (no carry)
11011 + 1 = 0 (carry 1)

I don't consider this applet complete as yet - there is no way to load or save circuits, you cannot form feedback loops in the circuit (an error message will appear if you attempt this) and input points cannot be deleted once they have been added.

If you read this then Java has not been enabled in your browser.