logic gate

38
Logic In electronic, a logic gate is an idealized or physical device implementing a Boolean function; that is, it pesrforms a logical operation on one or more logical inputs, and produces a single logical output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and unlimited fan-out, or it may refer to a non-ideal physical device for comparison. Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but can also be constructed using electromagnetic relays (relay logic)fluidic logic, pneumatic, optics, molecules, or even mechanical elements. With amplification, logic gates can be cascaded in the same way that Boolean functions can be composed, allowing the construction of a physical model of all of Boolean logic, and therefore, all of the algorithms and mathematics that can be described with Boolean logic. Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer memory, all the way up through complete microprocessors, which may contain more than 100 million gates. In practice, the gates are made from field- effect transistors (FETs), particularly MOSFETs (metal–oxide– semiconductor field-effect transistors). Compound logic gates AND-OR-Invert (AOI) and OR-AND-Invert (OAI) are often employed in circuit design because their construction using MOSFETs is simpler and more efficient than the sum of the individual gates. In reversible logic, Toffoli gates are used. Electronic Gates Logic family To build a functionally complete logic system, relays, valves (vacuum tubes), or transistors can be used. The simplest family of logic gates using bipolar transistors is called resistor (RTL). Unlike simple diode

Upload: himanshu

Post on 02-Dec-2015

64 views

Category:

Documents


1 download

DESCRIPTION

Logic Gate downbload

TRANSCRIPT

Page 1: Logic Gate

Logic In electronic, a logic gate is an idealized or physical device implementing a Boolean function; that is, it pesrforms a logical operation on one or more logical inputs, and produces a single logical output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and unlimited fan-out, or it may refer to a non-ideal physical device for comparison.

Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but can also be constructed using electromagnetic relays (relay logic)fluidic logic, pneumatic, optics, molecules, or even mechanical elements. With amplification, logic gates can be cascaded in the same way that Boolean functions can be composed, allowing the construction of a physical model of all of Boolean logic, and therefore, all of the algorithms and mathematics that can be described with Boolean logic.

Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer memory, all the way up through complete microprocessors, which may contain more than 100 million gates. In practice, the gates are made from field-effect transistors (FETs), particularly MOSFETs (metal–oxide–semiconductor field-effect transistors).

Compound logic gates AND-OR-Invert (AOI) and OR-AND-Invert (OAI) are often employed in circuit design because their construction using MOSFETs is simpler and more efficient than the sum of the individual gates. 

In reversible logic, Toffoli gates are used.

Electronic Gates

Logic familyTo build a functionally complete logic system, relays, valves (vacuum tubes), or transistors can be used. The simplest family of logic gates using bipolar transistors is called resistor (RTL). Unlike simple diode logic gates (which do not have a gain element), RTL gates can be cascaded indefinitely to produce more complex logic functions. RTL gates were used in early integrated circuits. For higher speed and better density, the resistors used in RTL were replaced by diodes resulting in diode-transistor logic (DTL). Transistor-transistor logic (TTL) then supplanted DTL. As integrated circuits became more complex, bipolar transistors were replaced with smaller field-effect transistors (MOSFETs); see PMOS and NMOS. To reduce power consumption still further, most contemporary chip implementations of digital systems now use CMOS logic. CMOS uses complementary (both n-channel and p-channel) MOSFET devices to achieve a high speed with low power dissipation.

For small-scale logic, designers now use prefabricated logic gates from families of devices such as the TTL 7400 series by Texas Instruments, the CMOS 4000 series by RCA, and their more recent descendants. Increasingly, these fixed-function logic gates are being replaced by programmable logic devices, which allow designers to pack a large number of mixed logic 

Page 2: Logic Gate

gates into a single integrated circuit. The field-programmable nature of programmable logic devices such as FPGAs has removed the 'hard' property of hardware; it is now possible to change the logic design of a hardware system by reprogramming some of its components, thus allowing the features or function of a hardware implementation of a logic system to be changed.

Electronic logic gates differ significantly from their relay-and-switch equivalents. They are much faster, consume much less power, and are much smaller (all by a factor of a million or more in most cases). Also, there is a fundamental structural difference. The switch circuit creates a continuous metallic path for current to flow (in either direction) between its input and its output. The semiconductor logic gate, on the other hand, acts as a high-gain voltage amplifier, which sinks a tiny current at its input and produces a low-impedance voltage at its output. It is not possible for current to flow between the output and the input of a semiconductor logic gate.

Another important advantage of standardized integrated circuit logic families, such as the 7400 and 4000 families, is that they can be cascaded. This means that the output of one gate can be wired to the inputs of one or several other gates, and so on. Systems with varying degrees of complexity can be built without great concern of the designer for the internal workings of the gates, provided the limitations of each integrated circuit are considered.

The output of one gate can only drive a finite number of inputs to other gates, a number called the 'fanout limit'. Also, there is always a delay, called the 'propagation delay', from a change in input of a gate to the corresponding change in its output. When gates are cascaded, the total propagation delay is approximately the sum of the individual delays, an effect which can become a problem in high-speed circuits. Additional delay can be caused when a large number of inputs are connected to an output, due to the distributed capacitance of all the inputs and wiring and the finite amount of current that each output can provide.

Symbols

A synchronous 4-bit up/down decade counter symbol (74LS192) in accordance with ANSI/IEEE Std. 91-1984 and IEC Publication 60617-12.

There are two sets of symbols for elementary logic gates in common use, both defined in ANSI/IEEE Stud 91-1984 and its supplement ANSI/IEEE Stud 91a-1991. The "distinctive 

Page 3: Logic Gate

shape" set, based on traditional schematics, is used for simple drawings, and derives from MIL-STD-806 of the 1950s and 1960s. It is sometimes unofficially described as "military", reflecting its origin. The "rectangular shape" set, based on IEC 60617-12 and other early industry standards, has rectangular outlines for all types of gate and allows representation of a much wider range of devices than is possible with the traditional symbols. The IEC's system has been adopted by other standards, such as EN 60617-12:1999 in Europe and BS EN 60617-12:1999 in the United Kingdom.

The goal of IEEE Stud 91-1984 was to provide a uniform method of describing the complex logic functions of digital circuits with schematic symbols. These functions were more complex than simple AND and OR gates. They could be medium scale circuits such as a 4-bit counter to a large scale circuit such as a microprocessor. IEC 617-12 and its successor IEC 60617-12 do not explicitly show the "distinctive shape" symbols, but do not prohibit them.[3] These are, however, shown in ANSI/IEEE 91 (and 91a) with this note: "The distinctive-shape symbol is, according to IEC Publication 617, Part 12, not preferred, but is not considered to be in contradiction to that standard." This compromise was reached between the respective IEEE and IEC working groups to permit the IEEE and IEC standards to be in mutual compliance with one another.

A third style of symbols was in use in Europe and is still preferred by some, see the column "DIN 40700" in the table in the German Wikipedia.

In the 1980s, schematics were the predominant method to design both circuit boards and custom ICs known as gate arrays. Today custom ICs and the field-programmable gate array are typically designed with Hardware Description Languages (HDL) such as Verilog or VHDL.

Type Distinctive shape Rectangular shape

Boolean algebra between A & B

Truth table

AND  or   & 

INPUT OUTPUT

A B A AND B

0 0 0

0 1 0

1 0 0

1 1 1

Page 4: Logic Gate

OR

INPUT OUTPUT

A B A OR B

0 0 0

0 1 1

1 0 1

1 1 1

NOT  or ~

INPUT OUTPUT

A NOT A

0 1

1 0

In electronics a NOT gate is more commonly called an inverter. The circle on the symbol is called a bubble, and is used in logic diagrams to indicate a logic negation between the external logic state and the internal logic state (1 to 0 or vice versa). On a circuit diagram it must be accompanied by a statement asserting that the positive logic convention or negative logic convention is being used (high voltage level = 1 or high voltage level = 0, respectively). The wedge is used in circuit diagrams to directly indicate an active-low (high voltage level = 0) input or output without requiring a uniform convention throughout the circuit diagram. This is called Direct Polarity Indication. See IEEE Stud 91/91A and IEC 60617-12. Both the bubble and the wedge can be used on distinctive-shape and rectangular-shape symbols on circuit diagrams, depending on the logic convention used. On pure logic diagrams, only the bubble is meaningful.

Page 6: Logic Gate

0 1 1

1 0 1

1 1 0

XNOR  or 

INPUT OUTPUT

A B A XNOR B

0 0 1

0 1 0

1 0 0

1 1 1

Two more gates are the exclusive-OR or XOR function and its inverse, exclusive-NOR or XNOR. The two input Exclusive-OR is true only when the two input values are different, false if they are equal, regardless of the value. If there are more than two inputs, the gate generates a true at its output if the number of trues at its input is odd .In practice; these gates are built from combinations of simpler logic gates.

Universal logic gates

 

Page 7: Logic Gate

 The 7400 chip, containing four NANDs. The two additional pins supply power (+5 V) and connect the ground.

Charles Sanders Peirce (winter of 1880–81) showed that NOR gates alone (or alternatively NAND gates alone) can be used to reproduce the functions of all the other logic gates, but his work on it was unpublished until 1933.[4] The first published proof was by Henry M. Sheffer in 1913, so the NAND logical operation is sometimes called Sheffer stroke; the logical NOR is sometimes called Peirce's arrow. Consequently, these gates are sometimes called universal logic gates. 

De Morgan equivalent symbols  By use of De Morgan's theorem, an AND function is identical to an OR function with negated inputs and outputs. Likewise, an OR function is identical to an AND function with negated inputs and outputs. A NAND gate is equivalent to an OR gate with negated inputs, and a NOR gate is equivalent to an AND gate with negated inputs. This leads to an alternative set of symbols for basic gates that use the opposite core symbol (AND or OR) but with the inputs and outputs negated. Use of these alternative symbols can make logic circuit diagrams much clearer and help to show accidental connection of an active high output to an active low input or vice-versa. Any connection that has logic negations at both ends can be replaced by a negation less connection and a suitable change of gate or vice-versa. Any connection that has a negation at one end and no negation at the other can be made easier to interpret by instead using the De Morgan equivalent symbol at either of the two ends. When negation or polarity indicators on both ends of a connection match, there is no logic negation in that path (effectively, bubbles "cancel"), making it easier to follow logic states from one symbol to the next. This is commonly seen in real logic diagrams - thus the reader must not get into the habit of associating the shapes exclusively as OR or AND shapes, but also take into account the bubbles at both inputs and outputs in order to determine the "true" logic function indicated.A De Morgan symbol can show more clearly a gate's primary logical purpose and the polarity of its nodes that are considered in the "signaled" (active, on) state. Consider the simplified case where a two-input NAND gate is used to drive a motor when either of its inputs are brought low by a switch. The "signaled" state (motor on) occurs when either one OR the other switch is on. Unlike a regular NAND symbol, which suggests AND logic, the De Morgan version, a two negative-input OR gate, correctly shows that OR is of interest. The regular NAND symbol has a bubble at the output and none at the inputs (the opposite of the states that will turn the motor on), but the De Morgan symbol shows both inputs and output in the polarity that will drive the motor. DE Morgan's theorem is not most commonly used to implement logic gates as combinations of only NAND gates or as combinations of only NOR gates, for economic reasons.

Page 8: Logic Gate

Three-state logic gates

A tristate buffer can be thought of as a switch. If B is on, the switch is closed. If B is off, the switch is open.

Tri-state buffer A three-state logic gate is a type of logic gate that can have three different outputs: high (H), low (L) and high-impedance (Z). The high-impedance state plays no role in the logic, which is strictly binary. These devices are used on buses of the CPU to allow multiple chips to send data. A group of three-states driving a line with a suitable control circuit is basically equivalent to a multiplexer, which may be physically distributed over separate devices or plug-in cards.

In electronics, a high output would mean the output is sourcing current from the positive power terminal (positive voltage). A low output would mean the output is sinking current to the negative power terminal (zero voltage). High impedance would mean that the output is effectively disconnected from the circuit.

History and developmentThe binary number system was refined by Gottfried Wilhelm Leibniz (published in 1705) and he also established that by using the binary system, the principles of arithmetic and logic could be combined. In an 1886 letter, Charles Sanders Peirce described how logical operations could be carried out by electrical switching circuits. Eventually, vacuum tubes replaced relays for logic operations. Lee De Forest's modification, in 1907, of the Fleming valve can be used as AND logic gate. Ludwig Wittgenstein introduced a version of the 16-row truth table as proposition 5.101 of Tractates Logico-Philosophicus (1921). Walther Bothe, inventor of the coincidence circuit, got part of the 1954 Nobel Prize in physics, for the first modern electronic AND gate in 1924. Conrad Zuse designed and built electromechanical logic gates for his computer Z1 (from 1935–38). Shannon introduced the use of Boolean algebra in the analysis and design of switching circuits in 1937. Active research is taking place in molecular logic gates.

Implementations

Unconventional computingSince the 1990s, most logic gates are made in CMOS technology (i.e. NMOS and PMOS transistors are used). Often millions of logic gates are packaged in a single integrated circuit.

Page 9: Logic Gate

There are several logic families with different characteristics (power consumption, speed, cost, size) such as: RDL (resistor-diode logic), RTL (resistor-transistor logic), DTL(diode-transistor logic), TTL (transistor-transistor logic) and CMOS (complementary metal oxide semiconductor). There are also sub-variants, e.g. standard CMOS logic vs. advanced types using still CMOS technology, but with some optimizations for avoiding loss of speed due to slower PMOS transistors.

Non-electronic implementations are varied, though few of them are used in practical applications. Many early electromechanical digital computers, such as the Harvard Mark I, were built from relay logic gates, using electro-mechanical relays. Logic gates can be made using pneumatic devices, such as the Sorteberg relay or mechanical logic gates, including on a molecular scale. Logic gates have been made out of DNA (see DNA nanotechnology) and used to create a computer called MAYA (see MAYA II). Logic gates can be made from quantum mechanical effects (though quantum computing usually diverges from Boolean design). Photonic logic gates use non-linear optical effects.

In principle any method that leads to a gate that is functionally complete (for example, either a NOR or a NAND gate) can be used to make any kind of digital logic circuit. Note that the use of 3-state logic for bus systems is not needed, and can be replaced by digital multiplexers  

LOGIC GATESThe switching action of a transistor makes it especially suitable for use in digital logic circuits where the output is either 0 or 1 depending on the input. Applications of such circuits are to:

Switch   on   a   water   pump   on   a   hot   sunny   daySound   an   alarm   if   the   pilot   light   of   a   boiler   went   offSound   an   alarm   if   a   burglar   stepped   on   a   pressure   pad   or   shone   his   torchSwitch   a   light   on   if   it   was   a   cloudy   dayAdd   two   simple   binary   numbers   togetherSwitch on a fan if a darkroom door was shut and it was warm inside

All   these things and  indeed many more can be done with ELECTRONIC LOGIC CIRCUITS. These circuits are ones that can make decisions. Different decisions need different circuits.

If you refer to the switching circuit for the transistor you will see that the output voltage is high (consider this as 1) when the input voltage is low (consider this as 0). This is the basic NOT   gate   -   there   is   an   output   when   there   is   not   an   input.

Combinations of these switching circuits  can be made  into  logic gates that will  perform simple decisions within a microprocessor. These logic gates are the basis of all  decisions within computers and from now on we will consider their effects rather then their internal structure. 

Page 10: Logic Gate

We   will   consider   the   following   types   of   logic   gate:(a)   NOT   gate  -   this   gives   an   output   1   for   an   input   of   0(b)   NOR   gate  -   this   gives   an   output   1   for   neither   of   two   inputs   1(c)  OR  gate  -   this   gives   an   output   1   for   either   of   two   inputs   1   and   both   inputs   1(d)   AND   gate  -   this   gives   an   output   1   for   both   two   inputs   1(e) NAND gate  - this gives an output I for either but not both of two inputs 1 or both 0inputs                                                                                                       (f)   EXCLUSIVE-OR  -   this   gives   an   output   I   for   either   but   not   both   of   two   inputs   1(g)   EXCLUSIVE-NOR  -   this   gives   an   output   1   when   both   inputs   are   0   or   1

Because of its wide use in modern digital electronics the NAND gate will be considered as a basic building block for a variety of logic circuits. In fact a number of other logic gates can be constructed from NAND gates as is shown below. The circuit in Figure 1 shows how a NAND gate might be constructed from discrete components, although it would normally be in the form   of   an   integrated   circuit. 

Page 11: Logic Gate

There will be a large output voltage across the transistor as long as at least one of the inputs is made low. Example-The hot sunny dayTo switch on the pump it must be hot AND sunny. This needs an AND circuit.

SUMMARY OF THE USE OF THE NAND GATE

One of the most useful circuits in school electronics is the NAND gate and so we will think about what it does in a little more detail.(a) it has two inputs - if either (or both) these are 0 then the output is 1 (high) , but if both are 1 the output is 0 (low)(b) a flying lead (unconnected input) is high (1)a few milliamps. It will therefore operate a buzzer with difficulty but will NOT operate a motor (the motor will need hundreds of milliamps)

MAKING OTHER LOGIC GATES FROM NAND GATESThe circuits below show you how to make a NOT, OR, NOR and AND gate using NAND gates.

Page 12: Logic Gate

Student investigation

Design and construct circuits using NAND gates that will do the following things:(a) switch a light on when it gets dark(b) switch a light on when it gets light(c) detect when an object is longer than a certain length(d) switch on a warning light when either of the two front doors of a car are open(e) sound a buzzer if there is a person sitting on the front seat of a car and the ignition key is turned(f) sound a buzzer when all three coconuts on a coconut shy have been knocked off(g) switch a light on if a safe door has been closed but not locked(h) switch on a buzzer when the temperature of a room falls below a certain value 

Digital signals and gates

While the binary numeration system is an interesting mathematical abstraction, we haven't yet seen its practical application to electronics. This chapter is devoted to just that: practically applying the concept of binary bits to circuits. What makes binary numeration so important to the application of digital electronics is the ease in which bits may be represented in physical terms. Because a binary bit can only have one of two different values, either 0 or 1, any physical medium capable of switching between two saturated states may be used to represent a bit. Consequently, any physical system capable of representing binary bits is able to represent numerical quantities, and potentially has the ability to manipulate those numbers. This is the basic concept underlying digital computing.

Electronic circuits are physical systems that lend themselves well to the representation of binary numbers. Transistors, when operated at their bias limits, may be in one of two different states: either cutoff (no controlled current) or saturation (maximum controlled current). If a transistor circuit is designed to maximize the probability of falling into either one of these states (and not operating in the linear, or active, mode), it can serve as a physical representation of a binary bit. A voltage signal measured at the output of such a circuit may also serve as a representation of a single bit, a low voltage representing a binary "0" and a (relatively) high voltage representing a binary "1." Note the following transistor circuit:

Page 13: Logic Gate

In this circuit, the transistor is in a state of saturation by virtue of the applied input voltage (5 volts) through the two-position switch. Because its saturated, the transistor drops very little voltage between collector and emitter, resulting in an output voltage of (practically) 0 volts. If we were using this circuit to represent binary bits, we would say that the input signal is a binary "1" and that the output signal is a binary "0." Any voltage close to full supply voltage (measured in reference to ground, of course) is considered a "1" and a lack of voltage is considered a "0." Alternative terms for these voltage levels are high (same as a binary "1") and low (same as a binary "0"). A general term for the representation of a binary bit by a circuit voltage is logic level.

Moving the switch to the other position, we apply a binary "0" to the input and receive a binary "1" at the output:

Page 14: Logic Gate

What we've created here with a single transistor is a circuit generally known as a logic gate, or simply gate. A gate is a special type of amplifier circuit designed to accept and generate voltage signals corresponding to binary 1's and 0's. As such, gates are not intended to be used for amplifying analog signals (voltage signals between 0 and full voltage). Used together, multiple gates may be applied to the task of binary number storage (memory circuits) or manipulation (computing circuits), each gate's output representing one bit of a multi-bit binary number. Just how this is done is a subject for a later chapter. Right now it is important to focus on the operation of individual gates.The gate shown here with the single transistor is known as an inverter, or NOT gate, because it outputs the exact opposite digital signal as what is input. For convenience, gate circuits are generally represented by their own symbols rather than by their constituent transistors and resistors. The following is the symbol for an inverter:

An alternative symbol for an inverter is shown here:

Notice the triangular shape of the gate symbol, much like that of an operational amplifier. As was stated before, gate circuits actually are amplifiers. The small circle, or "bubble" shown on either the input or output terminal is standard for representing the inversion function. As you might suspect, if we were to remove the bubble from the gate symbol, leaving only a triangle, the resulting symbol would no longer indicate inversion, but merely direct amplification. Such a symbol and such a gate actually do exist, and it is called a buffer, the subject of the next section.Like an operational amplifier symbol, input and output connections are shown as single wires, the implied reference point for each voltage signal being "ground." In digital gate circuits, ground is almost always the negative connection of a single voltage source (power supply). Dual, or "split," power supplies are seldom used in gate circuitry. Because gate circuits are amplifiers, they require a source of power to operate. Like operational amplifiers, the power supply connections for digital gates are often omitted from the symbol for simplicity's sake. If we were to show all the necessary connections needed for operating this gate, the schematic would look something like this:

Page 15: Logic Gate

Power supply conductors are rarely shown in gate circuit schematics, even if the power supply connections at each gate are. Minimizing lines in our schematic, we get this:

"Vcc" stands for the constant voltage supplied to the collector of a bipolar junction transistor circuit, in reference to ground. Those points in a gate circuit marked by the label "Vcc" are all connected to the same point, and that point is the positive terminal of a DC voltage source, usually 5 volts.

As we will see in other sections of this chapter, there are quite a few different types of logic gates, most of which have multiple input terminals for accepting more than one signal. The output of any gate is dependent on the state of its input(s) and its logical function.

One common way to express the particular function of a gate circuit is called a truth table. Truth tables show all combinations of input conditions in terms of logic level states (either "high" or "low," "1" or "0," for each input terminal of the gate), along with the corresponding output logic level, either "high" or "low." For the inverter, or NOT, circuit just illustrated, the truth table is very simple indeed:

Page 16: Logic Gate

Truth tables for more complex gates are, of course, larger than the one shown for the NOT gate. A gate's truth table must have as many rows as there are possibilities for unique input combinations. For a single-input gate like the NOT gate, there are only two possibilities, 0 and 1. For a two input gate, there are four possibilities (00, 01, 10, and 11), and thus four rows to the corresponding truth table. For a three-input gate, there are eight possibilities (000, 001, 010, 011, 100, 101, 110, and 111), and thus a truth table with eight rows are needed. The mathematically inclined will realize that the number of truth table rows needed for a gate is equal to 2 raised to the power of the number of input terminals.

Basic Gates and Functions AND gate

OR gate NOT gate NAND gate NOR gate EOR gate ENOR gate

 Introduction

Boolean functions may be practically implemented by using electronic gates. The following points are important to understand.

Electronic gates require a power supply. Gate INPUTS are driven by voltages having two nominal values, e.g. 0V and 5V 

representing logic 0 and logic 1 respectively. The OUTPUT of a gate provides two nominal values of voltage only, e.g. 0V and 5V 

representing logic 0 and logic 1 respectively. In general, there is only one output to a logic gate except in some special cases.

Page 17: Logic Gate

There is always a time delay between an input being applied and the output responding. 

 Truth Tables

Truth tables are used to help show the function of a logic gate. If you are unsure about truth tables and need guidence on how go about drowning them for individual gates or logic circuits then use the table section link.

 Logic gates

Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with the aid of truth tables.

      AND gate

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high.  A dot (.) is used to show the AND operation i.e. A.B.  Bear in mind that this dot is sometimes omitted i.e. AB

 

OR gate

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high.  A plus (+) is used to show the OR operation.

 

NOT gate

Page 18: Logic Gate

The NOT gate is an electronic circuit that produces an inverted version of the input at its output.  It is also known as an inverter.  If the input variable is A, the inverted output is known as NOT A.  This is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams below show two ways that the NAND logic gate can be configured to produce a NOT gate. It can also be done using NOR logic gates in the same way.

           NAND gate

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate.  The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.

                NOR gate 

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate.  The outputs of all NOR gates are low if any of the inputs are high.

The symbol is an OR gate with a small circle on the output. The small circle represents inversion.

              EXOR gate

The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two inputs are high.  An encircled plus sign ( ) is used to show the EOR operation.

    The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on the output. The small circle represents inversion.

 

The NAND and NOR gates are called universal functions since with either one the AND and OR functions and NOT can be generated.

Note:      A function in sum of products form can be implemented using NAND gates 

by replacing all AND and OR gates by NAND gates.

Page 19: Logic Gate

A neither function in product of sums form can be implemented using NOR gates by replacing all AND and OR gates by NOR gates.

         Table 1.Logic gate symbol              Table 2.is a summary truth table of the input/output combinations for the NOT gate together with all possible input/output combinations for the other gate functions. Also note that a truth table with 'n' inputs has 2n rows. You can compare the outputs of different gates.

Table 2: Logic gates representation using the Truth table

 

 Decimal representation.

Numeral systems by culture

Hindu–Arabic numerals

Western Arabic Eastern Arabic Indian family Bengali Tamil Telugu Burmese Khmer Lao Mongolian Sinhala Thai

East Asian numerals

Chinese Japanese Suzhou Korean Vietnamese Counting rods

Alphabetic numerals

Abjad Armenian Āryabhaṭa Cyrillic Ge'ez Greek Roman Georgian Hebrew

Other historical systems

Aegean Attic Babylonian Brahmi Egyptian Etruscan Inuit Kharosthi Mayan Prehistoric numerals Quipu

Positional systems by base

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 26 27 30 32 36 60 64 85

Non-standard positional numeral systems

Page 20: Logic Gate

Decimal notationDecimal notation is the writing of numbers in a base-10 numeral system. Examples are Roman numerals, Brahmi numerals, and Chinese numerals, as well as the Hindu-Arabic numerals used by speakers of many European languages. Roman numerals have symbols for the decimal powers (1, 10, 100, 1000) and secondary symbols for half these values (5, 50, 500). Brahmi numerals have symbols for the nine numbers 1–9, the nine decades 10–90, plus a symbol for 100 and another for 1000. Chinese numerals have symbols for 1–9, and additional symbols for powers of 10, which in modern usage reach 1044.However, when people who use Hindu-Arabic numerals speak of decimal notation, they often mean not just decimal numeration, as above, but also decimal fractions, all conveyed as part of a positional system. Positional decimal systems include a zero and use symbols (called digits) for the ten values (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to represent any number, no matter how large or how small. These digits are often used with a decimal separator which indicates the start of a fractional part, and with a symbol such as the plus sign + (for positive) or minus sign − (for negative) adjacent to the numeral to indicate whether it is greater or less than zero, respectively. Positional notation uses positions for each power of ten: units, tens, hundreds, thousands, etc. The position of each digit within a number denotes the multiplier (power of ten) multiplied with that digit—each position has a value ten times that of the position to its right. There were at least two presumably independent sources of positional decimal systems in ancient civilization: the Chinese counting rod system and the Hindu-Arabic numeral system. Ten is the number which is the count of fingers and thumbs on both hands (or toes on the feet). The English word digit as well as its translation in many languages is also the anatomical term for fingers and toes. In English, decimal (decimus < Lat.) means tenth, decimate means reduce by a tenth, and denary (denarius < Lat.) means the unit of ten. The symbols for the digits in common use around the globe today are called Arabic numerals by Europeans and Indian numerals by Arabs, the two groups' terms both referring to the culture from which they learned the system. However, the symbols used in different areas are not identical; for instance, Western Arabic numerals (from which the European numerals are derived) differ from the forms used by other Arab cultures.

Decimal fractions

A decimal fraction is a fraction whose denominator is a power of ten. Decimal fractions are commonly expressed without a denominator, the decimal separator being inserted into the numerator (with leading zeros added if needed) at the position from the right corresponding to the power of ten of the denominator; e.g., 8/10, 83/100, 83/1000, and 8/10000 are expressed as 0.8, 0.83, 0.083, and 0.0008. In English-speaking, some Latin American and many Asian countries, a period (.) or raised period (•) is used as the decimal separator; in many other countries, particularly in Europe, a comma (,) is used.  The integer part, or integral part of a decimal number is the part to the left of the decimal 

Page 21: Logic Gate

separator. The part from the decimal separator to the right is the fractional part. It is usual for a decimal number that consists only of a fractional part (mathematically, a proper fraction) to have a leading zero in its notation (its numeral). This helps disambiguation between a decimal sign and other punctuation, and especially when the negative number sign is indicated, it helps visualize the sign of the numeral as a whole. Trailing zeros after the decimal point are not necessary, although in science, engineering and statistics they can be retained to indicate a required precision or to show a level of confidence in the accuracy of the number: Although 0.080 and 0.08 are numerically equal, in engineering 0.080 suggests a measurement with an error of up to one part in two thousand (±0.0005), while 0.08 suggests a measurement with an error of up to one in two hundred. 

Other rational numbers

Any rational number with a denominator whose only prime factors are 2 and/or 5 may be precisely expressed as a decimal fraction and has a finite decimal expansion.      

1/2 = 0.5

1/20 = 0.05

1/5 = 0.2

1/50 = 0.02

1/4 = 0.25

1/40 = 0.025

1/25 = 0.04

1/8 = 0.125

1/125 = 0.008

1/10 = 0.1

If the rational number's denominator has any prime factors other than 2 or 5, it cannot be expressed as a finite decimal fraction,[4] and has a unique eventually repeating infinite decimal expansion.

1/3 = 0.333333… (with 3 repeating)

1/9 = 0.111111… (with 1 repeating)

100 − 1 = 99 = 9 × 11:

1/11 = 0.090909…

Page 22: Logic Gate

1000 − 1 = 9 × 111 = 27 × 37:

1/27 = 0.037037037…

1/37 = 0.027027027…

1/111 = 0 .009009009…

   The converse to this observation is that every recurring decimal represents a rational number p/q. This is a consequence of the fact that the recurring part of a decimal representation is, in fact, an infinite geometric series which will sum to a rational number. For instance, 0.0123123123\cdots = \frac{123}{10000} \sum_{k=0}^\infty 0.001^k = \frac{123}{10000}\ \frac{1}{1-0.001} = \frac{123}{9990} = \frac{41}{3330}

Real numbers Decimal representation

Every real number has a (possibly infinite) decimal representation; i.e., it can be written as

x = \mat hop {\am sign} \sum_{i\in\math Z} a\,10^I Where Sign \in \{+,-\}, which is related to the sign function, Z is the set of all integers (positive, negative, and zero), and

ai ∈ { 0,1,…,9 } for all i ∈ Z are its decimal digits, equal to zero for all i greater than some number (that number being the common logarithm of |x|).

Such a sum converges as more and more negative values of i are included, even if there are infinitely many non-zero ai.

Rational numbers (e.g., p/q) with prime factors in the denominator other than 2 and 5 (when reduced to simplest terms) have a unique recurring decimal representation.

Non-uniqueness of decimal representation

This section needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (March 2012)

Consider those rational numbers which have only the factors 2 and 5 in the denominator, i.e., which can be written as p/(2a5b). In this case there is a terminating decimal representation. For instance, 1/1 = 1, 1/2 = 0.5, 3/5 = 0.6, 3/25 = 0.12 and 1306/1250 = 1.0448. Such numbers are the only real numbers which do not have a unique decimal representation, as they can also be written as a representation that has a recurring 9, for instance 1 = 0.99999…, 1/2 = 0.499999…, etc. The number 0 = 0/1 is special in that it has no representation with recurring 9.This leaves the irrational numbers. They also have unique 

Page 23: Logic Gate

infinite decimal representations, and can be characterised as the numbers whose decimal representations neither terminate nor recur.

So in general the decimal representation is unique, if one excludes representations that end in a recurring 9. 

The same tracheotomy holds for other base-n positional numeral systems:

Terminating representation: rational where the denominator divides some nk

Recurring representation: other rational

Non-terminating, non-recurring representation: irrational

A version of this even holds for irrational-base numeration systems, such as golden mean base representation.

Decimal computation

Diagram of the world's earliest decimal multiplication table (c. 305 BC) from the Warring States period

Decimal computation was carried out in ancient times in many ways, typically in rod calculus, with decimal multiplication table used in ancient China and with sand tables in India and Middle East or with a variety of abaci.

Modern computer hardware and software systems commonly use a binary representation internally (although many early computers, such as the ENIAC or the IBM 650, used decimal representation internally. For most purposes, however, binary values are converted to or from the equivalent decimal values for presentation to or input from humans; computer programs express literals in decimal by default. (123.1, for example, are written as such in a computer program, even though many computer languages are unable to encode that number precisely.)

Both computer hardware and software also use internal representations which are effectively decimal for storing decimal values and doing arithmetic. Often this arithmetic is done on data which are encoded using some variant of binary-coded decimal,  especially in database implementations, but there are other decimal representations in use (such as in the new IEEE 754 Standard for Floating-Point Arithmetic).

Decimal arithmetic is used in computers so that decimal fractional results can be computed exactly, which is not possible using a binary fractional representation. This is often important for financial and other calculations.

Page 24: Logic Gate

HistoryMany ancient cultures calculated from early on with numerals based on ten: Egyptian hieroglyphs, in evidence since around 3000 BC, used a purely decimal system,[9][10] just as the Cretan hieroglyphs (ca. 1625−1500 BC) of the Minoans whose numerals are closely based on the Egyptian model.[11][12] The decimal system was handed down to the consecutive Bronze Age cultures of Greece, including Linear A (ca. 18th century BC−1450 BC) and Linear B (ca. 1375−1200 BC) — the number system of classical Greece also used powers of ten, including, like the Roman numerals did, an intermediate base of 5.[13] Notably, the polymath Archimedes (c. 287–212 BC) invented a decimal positional system in his Sand Reckoner which was based on 108[13] and later led the German mathematician Carl Friedrich Gauss to lament what heights science would have already reached in his days if Archimedes had fully realized the potential of his ingenious discovery.[14] The Hittites hieroglyphs (since 15th century BC), just like the Egyptian and early numerals in Greece, was strictly decimal.

The Egyptian hieratic numerals, the Greek alphabet numerals, the Roman numerals, the Chinese numerals and early Indian Brahmi numerals are all non-positional decimal systems, and required large numbers of symbols. For instance, Egyptian numerals used different symbols for 10, 20, to 90, 100, 200, to 900, 1000, 2000, 3000, 4000, to 10,000.[16]

History of decimal fractions

Counting rod decimal fraction 1/7

According to Joseph Needham, decimal fractions were first developed and used by the Chinese in the 1st century BC, and then spread to the Middle East and from there to Europe.[17] The written Chinese decimal fractions were non-positional.[17] However, counting rod fractions were positional.

Qin Jiushao in his book Mathematical Treatise in Nine Sections (1247) denoted 0.96644 by

Counting rod 0.pngCounting rod h9 num.pngCounting rod v6.pngCounting rod h6.pngCounting rod v4.pngCounting rod h4.png, meaning09664

The Jewish mathematician Immanuel Boils invented decimal fractions around 1350, anticipating Simon Stevin, but did not develop any notation to represent them.

The Persian mathematician Jams hid al-Kasha claimed to have discovered decimal fractions himself in the 15th century, though J. Lennar Berggren notes that positional decimal 

Page 25: Logic Gate

fractions were used five centuries before him by Arab mathematician Abu'l-Hasan al-Uqlidisi as early as the 10th century.

Khwarizmi introduced fractions to Islamic countries in the early 9th century. . This form of fraction with the numerator on top and the denominator on the bottom, without a horizontal bar, was also used in the 10th century by Abu'l-Hasan al-Uqlidisi and again in the 15th century work "Arithmetic Key" by Jamshīd al-Kasha.[citation needed]

Analog signal

Signal

(electronics)

An analog or analogue signal is any continuous signal for which the time varying feature (variable) of the signal is a representation of some other time varying quantity, i.e., analogous to another time varying signal. For example, in an analog audio signal, the instantaneous voltage of the signal varies continuously with the pressure of the sound waves. It differs from a digital signal, in which a continuous quantity is represented by a discrete function which can only take on one of a finite number of values. The term analog signal usually refers to electrical signals; however, mechanical, pneumatic, hydraulic, and other systems may also convey analog signals.

An analog signal uses some property of the medium to convey the signal's information. For example, an aneroid barometer uses rotary position as the signal to convey pressure information. In an electrical signal, the voltage, current, or frequency of the signal may be varied to represent the information.

Any information may be conveyed by an analog signal; often such a signal is a measured response to changes in physical phenomena, such as sound, light, temperature, position, or pressure. The physical variable is converted to an analog signal by a transducer. For example, in sound recording, fluctuations in air pressure (that is to say, sound) strike the diaphragm of a microphone which induces corresponding fluctuations in the current produced by a coil in an electromagnetic microphone, or the voltage produced by a condenser microphone. The voltage or the current is said to be an "analog" of the sound.

An analog signal has a theoretically infinite resolution. In practice an analog signal is subject to electronic noise and distortion introduced by communication channels and signal processing operations, which can progressively degrade the signal-to-noise ratio. In contrast, digital signals have a finite resolution. Converting an analog signal to digital form introduces a constant low-level noise called quantization noise into the signal which determines the noise floor, but once in digital form the signal can in general be processed or 

This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (January 2013)

Page 26: Logic Gate

transmitted without introducing additional noise or distortion. Therefore as analog signal processing systems become more complex, they may ultimately degrade signal resolution to such an extent that their performance is surpassed by digital systems. This explains the widespread use of digital signals in preference to analog in modern technology. In analog systems, it is difficult to detect when such degradation occurs. However, in digital systems, degradation can not only be detected but corrected as well.

Disadvantages

The primary disadvantage of analog signal is that any system has noise – i.e., random unwanted variation. As the signal is copied and re-copied, or transmitted over long distances, or electronically processed, the unavoidable noise introduced by each step in the signal path is additive, progressively degrading the signal-to-noise ratio, until in extreme cases the signal can be overwhelmed. This is called generation loss. Noise can show up as 'hiss' and intermodulation distortion in audio signals, or "snow" in video signals. This degradation is impossible to recover, since there is no sure way to distinguish the noise from the signal; amplifying the signal to recover attenuated parts of the signal amplifies the noise (distortion/interference) as well. Since digital signals can be transmitted, stored and processed without introducing noise, even if the resolution of an analog signal is higher than a comparable digital signal, after enough processing the analog signal to noise ratio will be lower.

Electrically, analog signal noise can be diminished by shielding, good connections, and several cable types such as coaxial or twisted pair.

Modulation

Another method of conveying an analog signal is to use modulation. In this, some base signal (e.g., a sinusoidal carrier signal) has one of its properties modulated: amplitude modulation involves altering the amplitude of a sinusoidal voltage waveform by the source information, frequency modulation changes the frequency. Other techniques, such as changing the phase of the base signal also work.

Analog circuits do not involve quantization of information into digital format. The concept being measured over the circuit, whether sound, light, pressure, temperature, or an exceeded limit, remains from end to end.

Digital signalA digital signal is a physical signal that is a representation of a sequence of discrete values (a quantified discrete-time signal), for example of an arbitrary bit stream, or of digitized (sampled and analog-to-digital converted) analog signal. The term digital signal can refer to either of the following:

1. any continuous-time waveform signal used in digital communication, representing a bit stream or other sequence of discrete values

Page 27: Logic Gate

2. a pulse train signal that switches between a discrete number of voltage levels or levels of light intensity, also known as a line coded signal or baseband transmission, for example a signal found in digital electronics or in serial communications, or a pulse code modulation (PCM) representation of a digitized analog signal.

A signal that is generated by means of a digital modulation method (digital passband transmission), to be transferred between modems, is in the first case considered as a digital signal, and in the second case as converted to an analog signal.

Waveforms in digital systems

A digital signal waveform: (1) low level, (2) high level, (3) rising edge, and (4) falling edge.

In computer architecture and other digital systems, a waveform that switches between two voltage levels representing the two states of a Boolean value (0 and 1) is referred to as a digital signal, even though it is an analog voltage waveform, since it is interpreted in terms of only two levels.

The clock signal is a special digital signal that is used to synchronize digital circuits. The image shown can be considered the waveform of a clock signal. Logic changes are triggered either by the rising edge or the falling edge.

The given diagram is an example of the practical pulse and therefore we have introduced two new terms that are:

Rising edge: the transition from a low voltage (level 1 in the diagram) to a high voltage (level 2).

Falling edge: the transition from a high voltage to a low one.

Although in a highly simplified and idealized model of a digital circuit we may wish for these transitions to occur instantaneously, no real world circuit is purely resistive and therefore no circuit can instantly change voltage levels. This means that during a short, finite transition time the output may not properly reflect the input, and indeed may not correspond to either a logically high or low voltage.

Logic levelThe two states of a wire are usually represented by some measurement of an electrical property: Voltage is the most common, but currentis used in some logic families. A threshold is designed for each logic family. When below that threshold, the wire is "low", when above "high." Digital circuits establish a "no man's area" or "exclusion zone" that is 

Page 28: Logic Gate

wider than the tolerances of the components. The circuits avoid that area, in order to avoid indeterminate results.

It is usual to allow some tolerance in the voltage levels used; for example, 0 to 2 volts might represent logic 0, and 3 to 5 volts logic 1. A voltage of 2 to 3 volts would be invalid, and occur only in a fault condition or during a logic level transition. However, few logic circuits can detect such a condition and most devices will interpret the signal simply as high or low in an undefined or device-specific manner. Some logic devices incorporate Schmitt trigger inputs whose behaviour is much better defined in the threshold region, and have increased resilience to small variations in the input voltage.

The levels represent the binary integers or logic levels of 0 and 1. In active-high logic, "low" represents binary 0 and "high" represents binary 1. Active-low logic uses the reverse representation.

Examples of binary logic levels:

Technology

L voltage H voltage Notes

CMOS 0 V to VDD/2 VDD/2 to VDD VDD = supply voltage

TTL 0 V to 0.8 V 2 V to VCC VCC is 4.75 V to 5.25 V

ECL -1.175 V to VEE0.75 V to 0 V

VEE is about -5.2 V. VCC=Ground

Logic voltage levels

Hobbyist frequency counter circuit built almost entirely of TTL logic chips.