Monday, May 9, 2011

A Digital circuit simulation tool

My first project is simulating logic circuits in Python. Real logic circuits built with electronic components are the basis for computer hardware. The simplest gates (AND, OR, NOT) are made with only a few transistors and resisters.

Digital Simulator has a toolbar of digital circuit elements, including logic gates, flip-flops, switches, and indicators. Drawing a circuit with Digital Simulator is like using a paint program. You click the element's icon on the toolbar, then click where you want the element to go. You use a similar procedure to draw wires and indicate connections.

The AND gate has two inputs (generally labeled A and B) and and output C. The inputs and output may have the value 0 or 1. The output C is 1 if and only if both A and B are 1. Otherwise it is 0.


The OR gate is very similar with the same inputs A and B, and output C. The output C is 1 if either A or B is 1, Otherwise it is 0.

The NOT gate has a single input A and output B.The output is the opposite of the input. If the input is 0, the output is 1. If the input is 1, the output is 0.

By using existing gates and connecting outputs to inputs in certain ways we can build several circuits. For example to make a NAND gate where the output is 0 if and only if both inputs are 1, we can use and AND gate followed by a NOT gate. The inputs of the AND gate are the inputs to the NAND. The AND output is connected to the NOT input. The NOT output is the output for the NAND.

Here you can use DCD to simulate digital circuits using basic gates like AND, OR, NOT, NAND, Flip Flops (JK, SR, T) and many pre-built integrated circuits. This program comes with many pre-built demonstration circuits like seven segment displays, RAM chip simulations, digital clock circuits etc.

No comments:

Post a Comment