Tuesday, May 17, 2011

Locating the path of files using the shell

Here is a text file containing human genetics data:


If you had forgotten where you downloaded the file, how would you locate the path of all files with that name on the computer (using the shell)?


The find command used to find the files.To locate the path of given file we can use the command ,

$ find / -name "1000gp.vcf"

Here the system would search for any file named 1000gp.vcf on the root and all sub-directories from the root.

If we are giving the command, $ find -name "1000gp.vcf" the system would search for any file named 1000gp.vcf in the current directory and any sub-directory only.

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.