Wednesday, April 8, 2009

Logic Gates

Logic gates take binary values and perform functions on them, similar to the functions found in simple algebra. Binary algebra is the set of mathematical laws that are valid for binary values. A binary value can only be a 1 or a 0. 1 is a high value, representing true and high voltage. 0 is a low value, representing a false value and low voltage.

Logic gates are typically packaged in integrated circuits, although they can be constructed using analogue components. Integrated circuits allow multiple logic gates to be packaged in one chip and are usually quite reliable. Logic gates typically come in two flavours, TTL (transistor-transistor logic) and CMOS (Complementary Metal Oxide Semiconductor). One must be careful mixing the two types, there logic low and logic high are different voltages. A CMOS might take a TTL high as a LOW and a TTL will accept a CMOS low as a high. Because of this they are generally incompatible, but there are a few CMOS that can accept TTL inputs and vice versa.





The buffer and NOT gates are the simplest of the logic gates. The buffer would be used as a digital signal booster, if a logic signal was to travel for some distance voltage drop from wire resistance would lower a logic high voltage so low that when it reaches its destination its read as a logic low, putting this in between would solve that problem. The buffers algebra function is B = A

NOT gates simply change the input from a 1 to a 0 or vice versa. It is also called an inverter and has many uses in logic circuits. For example, you have 2 lights, but you only want 1 on at any one time, you would put a NOT gate between one light so when there is a logic high input 1 light is on and the other connected to the NOT gate is off and when there is a logic low input the second comes on because of the NOT gate. The circle on the end of the triangle indicates that it’s an inverting gate and you can recognise any inverting logic device by this circle.

The equivalent binary algebra function is B = A’, where B is the output and A is an input value.



The AND gate most commonly come in IC packages of 2 and 3 input versions. The output only produces a logical 1 when all of the inputs are 1. An AND gate could be used in an alarm circuit, where input A would be a reed switch input and B would be an armed control, So the alarm would only be activated if the alarm was active AND the reed switch was circuit was opened (opened door ect.).



The OR gate has a minimum of two inputs and produces an output of 1 if at least one of the inputs has a value of 1. An OR gate could be used to expand the number of reed switches in the previous example




No comments: