Saturday, 5 January 2013

Logic Gates - An introduction


http://www.ee.surrey.ac.uk/Projects/Labview/gatesfunc/index.html

Logic Gates



Introduction

  • 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.
  • There is always a time delay between an input being applied and the output responding.
 Table 1: Logic gate symbols


http://www.kpsec.freeuk.com/gates.htm

Logic Gates

Gate types: NOT | AND | NAND | OR | NOR | EX-OR | EX-NOR
Symbols | Truth tables | Logic ICs | Summary truth tables | Combinations | Substituting

Introduction

Logic states
 True False
10
HighLow
+Vs0V
OnOff
Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs represents true and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right. It is best to be familiar with them all.
Gates are identified by their function: NOTANDNANDORNOREX-OR and EX-NOR. Capital letters are normally used to make it clear that the term refers to a logic gate.
Note that logic gates are not always required because simple logic functions can be performed with switches or diodes:


Logic gate symbols

There are two series of symbols for logic gates:
  • The traditional symbols have distinctive shapes making them easy to recognise so they are widely used in industry and education.
    AND gateNOR gateNOT gate
  • The IEC (International Electrotechnical Commission) symbols are rectangles with a symbol inside to show the gate function. They are rarely used despite their official status, but you may need to know them for an examination.
    AND gateNOR gateNOT gate

Inputs and outputs

AND gate with inputs and output labelledGates have two or more inputs, except a NOT gate which has only one input. All gates have only one output. Usually the letters A, B, C and so on are used to label inputs, and Q is used to label the output. On this page the inputs are shown on the left and the output on the right. 

The inverting circle (o)

NAND gate showing inverting circleSome gate symbols have a circle on their output which means that their function includes inverting of the output. It is equivalent to feeding the output through a NOT gate. For example the NAND (Not AND) gate symbol shown on the right is the same as an AND gate symbol but with the addition of an inverting circle on the output. 

Truth tables

Input AInput BOutput Q
000
010
100
111
A truth table is a good way to show the function of a logic gate. It shows the output states for every possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables. The example truth table on the right shows the inputs and output of an AND gate.
There are summary truth tables below showing the output states for all types of 2-input and 3-input gates. These can be helpful if you are trying to select a suitable gate. 

Logic ICs

4001 and other quad 2-input gatesLogic gates are available on special ICs (chips) which usually contain several gates of the same type, for example the 4001 IC contains four 2-input NOR gates. There are several families of logic ICs and they can be split into two groups: To quickly compare the different families please see:
The 4000 and 74HC families are the best for battery powered projects because they will work with a good range of supply voltages and they use very little power. However, if you are using them to design circuits and investigate logic gates please remember that all unused inputs MUST be connected to the power supply (either +Vs or 0V), this applies even if that part of the IC is not being used in the circuit!

NOT gate (inverter)

The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A 
A NOT gate can only have one input. A NOT gate is also called an inverter.
traditional NOT gate symbolIEC NOT gate symbol
Input AOutput Q
01
10
Traditional symbolIEC symbolTruth Table

AND gate

The output Q is true if input A AND input B are both true: Q = A AND B 
An AND gate can have two or more inputs, its output is true if all inputs are true.
traditional AND gate symbolIEC AND gate symbol
Input AInput BOutput Q
000
010
100
111
Traditional symbolIEC symbolTruth Table

NAND gate (NAND = Not AND)

This is an AND gate with the output inverted, as shown by the 'o' on the output. 
The output is true if input A AND input B are NOT both true: Q = NOT (A AND B) 
A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.
traditional NAND gate symbolIEC NAND gate symbol
Input AInput BOutput Q
001
011
101
110
Traditional symbolIEC symbolTruth Table

OR gate

The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B 
An OR gate can have two or more inputs, its output is true if at least one input is true.
traditional OR gate symbolIEC OR gate symbol
Input AInput BOutput Q
000
011
101
111
Traditional symbolIEC symbolTruth Table

NOR gate (NOR = Not OR)

This is an OR gate with the output inverted, as shown by the 'o' on the output. 
The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B) 
A NOR gate can have two or more inputs, its output is true if no inputs are true.
traditional NOR gate symbolIEC NOR gate symbol
Input AInput BOutput Q
001
010
100
110
Traditional symbolIEC symbolTruth Table

EX-OR (EXclusive-OR) gate

The output Q is true if either input A is true OR input B is true, but not when both of them are true:Q = (A AND NOT B) OR (B AND NOT A) 
This is like an OR gate but excluding both inputs being true. 
The output is true if inputs A and B are DIFFERENT
EX-OR gates can only have 2 inputs.
traditional EX-OR gate symbolIEC EX-OR gate symbol
Input AInput BOutput Q
000
011
101
110
Traditional symbolIEC symbolTruth Table

EX-NOR (EXclusive-NOR) gate

This is an EX-OR gate with the output inverted, as shown by the 'o' on the output. 
The output Q is true if inputs A and B are the SAME (both true or both false): Q = (A AND B) OR (NOT A AND NOT B) 
EX-NOR gates can only have 2 inputs.
traditional EX-NOR gate symbolIEC EX-NOR gate symbol
Input AInput BOutput Q
001
010
100
111
Traditional symbolIEC symbolTruth Table


Summary truth tables

The summary truth tables below show the output states for all types of 2-input and 3-input gates.
Summary for all 2-input gates
InputsOutput of each gate
 A  B ANDNAND OR NOREX-OREX-NOR
00010101
01011010
10011010
11101001
Summary for all 3-input gates
InputsOutput of each gate
 A  B  C ANDNAND OR NOR
0000101
0010110
0100110
0110110
1000110
1010110
1100110
1111010
Note that EX-OR and EX-NOR
gates can only have 2 inputs.

Combinations of logic gates

Logic gates can be combined to produce more complex functions. They can also be combined to substitute one type of gate for another.
Input AInput BOutput Q
000
010
101
110
For example to produce an output Q which is true only when input A is true and input B is false, as shown in the truth table on the right, we can combine a NOT gate and an AND gate like this:
A AND NOT B
Q = A AND NOT B 

Working out the function of a combination of gates

Truth tables can be used to work out the function of a combination of gates.
InputsOutputs
 A  B  C  D  E  Q 
000101
001101
010000
011011
100000
101000
110000
111011
For example the truth table on the right show the intermediate outputs D and E as well as the final output Q for the system shown below.
Combination of NOR, AND and OR gates
D = NOT (A OR B)
E = B AND C
Q = D OR E = (NOT (A OR B)) OR (B AND C) 

Substituting one type of gate for another

Logic gates are available on ICs which usually contain several gates of the same type, for example four 2-input NAND gates or three 3-input NAND gates. This can be wasteful if only a few gates are required unless they are all the same type. To avoid using too many ICs you can reduce the number of gate inputs or substitute one type of gate for another.
3-input AND gate operating as a 2-input AND gate

Reducing the number of inputs

The number of inputs to a gate can be reduced by connecting two (or more) inputs together. The diagram shows a 3-input AND gate operating as a 2-input AND gate. 
making a NOT gate from a NAND gate

Making a NOT gate from a NAND or NOR gate

Reducing a NAND or NOR gate to just one input creates a NOT gate. The diagram shows this for a 2-input NAND gate. 

Any gate can be built from NAND or NOR gates

As well as making a NOT gate, NAND or NOR gates can be combined to create any type of gate! This enables a circuit to be built from just one type of gate, either NAND or NOR. For example an AND gate is a NAND gate then a NOT gate (to undo the inverting function). Note that AND and OR gates cannot be used to create other gates because they lack the inverting (NOT) function.
To change the type of gate, such as changing OR to AND, you must do three things:
  • Invert (NOT) each input.
  • Change the gate type (OR to AND, or AND to OR)
  • Invert (NOT) the output.
For example an OR gate can be built from NOTed inputs fed into a NAND (AND + NOT) gate.

NAND gate equivalents

The table below shows the NAND gate equivalents of NOT, AND, OR and NOR gates:
GateEquivalent in NAND gates
NOTNOT gateNOT gate made from a NAND gate
ANDAND gateAND gate made from NAND gates
OROR gateOR gate made from NAND gates
NORNOR gateNOR gate made from NAND gates

Substituting gates in an example logic system

Combination of NOR, AND and OR gatesThe original system has 3 different gates: NOR, AND and OR. This requires three ICs (one for each type of gate).
To re-design this system using NAND gates only begin by replacing each gate with its NAND gate equivalent, as shown in the diagram below.

Equivalent NAND gate system

Simplified NAND gate systemThen simplify the system by deleting adjacent pairs of NOT gates (marked Xabove). This can be done because the second NOT gate cancels the action of the first.
The final system is shown on the right. It has five NAND gates and requires two ICs (with four gates on each IC). This is better than the original system which required three ICs (one for each type of gate).
Substituting NAND (or NOR) gates does not always increase the number of gates, but when it does (as in this example) the increase is usually only one or two gates. The real benefit is reducing the number of ICs required by using just one type of gate. 

Admittance




admittance [ədˈmɪtəns]
n
1. the right or authority to enter
2. the act of giving entrance (Electronics) (Physics / General Physics)
3. (Engineering / Electrical Engineering) Electrical engineering the reciprocal of impedance, usually measured in siemens. It can be expressed as a complex quantity, the real part of which is the conductance and the imaginary part the susceptance Symbol y


admittance (Y)

Part of the Electronics glossary:
Admittance (symbolized Y ) is an expression of the ease with which alternating current ( AC) flows through a complex circuit or system. Admittance is a vector quantity comprised of two independent scalar phenomena: conductance and susceptance .
Conductance, denoted G , is a measure of the ease with which charge carriers can pass through a component or substance. The more easily the charge carriers move in response to a given applied electric potential, the higher the conductance, which is expressed in positive real-number siemens . Conductance is observed with AC and also with direct current ( DC ).
Susceptance, denoted B , is an expression of the readiness with which an electronic component, circuit, or system releases stored energy as the current and voltage fluctuate. Susceptance is expressed in imaginary number siemens. It is observed for AC, but not for DC. When AC passes through a component that contains susceptance, energy might be stored and released in the form of a magnetic field, in which case the susceptance is inductive (denoted - jB L ), or energy might be stored and released in the form of an electric field, in which case the susceptance is capacitive (denoted + jB C ).
Admittance is the vector sum of conductance and susceptance. Susceptance is conventionally multiplied by the positive square root of -1, the unit imaginary number called symbolized by j , to express Y as a complex quantity G - jB L (when the net susceptance is inductive) or G + jB C (when the net susceptance is capacitive).
In parallel circuits, conductance and susceptance add together independently to yield the composite admittance. In series circuits, conductance and susceptance combine in a more complicated manner. In these situations, it is easier to convert conductance to resistance, susceptance to reactance, and then calculate the composite impedance.
Also see conductance , reactance , resistance , impedance , ohm , siemens , henry , andfarad .



Admittance

From Wikipedia, the free encyclopedia
In electrical engineering, the admittance (Y) is a measure of how easily a circuit or device will allow a current to flow. It is defined as the inverse of the impedance (Z). The SI unit of admittance is the siemens (symbol S). Oliver Heaviside coined the term in December 1887.[1]
Y = Z^{-1} = 1/Z  \,
where
Y is the admittance, measured in siemens
Z is the impedance, measured in ohms
Note that the synonymous unit mho, and the symbol ℧ (an upside-down uppercase omega Ω), are also in common use.
Resistance is a measure of the opposition of a circuit to the flow of a steady current, while impedance takes into account not only the resistance but also dynamic effects (known as reactance). Likewise, admittance is not only a measure of the ease with which a steady current can flow, but also the dynamic effects of the material's susceptance to polarization:
Y = G + j B \,
where
  • Y is the admittance, measured in siemens (a.k.a. mho, the inverse of ohm).
  • G is the conductance, measured in siemens.
  • B is the susceptance, measured in siemens.
  • j^2 = -1

Contents

  [hide

[edit]Conversion from impedance to admittance

Parts of this article or section rely on the reader's knowledge of the complex impedance representation of capacitors andinductors and on knowledge of the frequency domain representation of signals.
The impedance, Z, is composed of real and imaginary parts,
Z = R + jX \,
where
R is the resistance, measured in ohms
X is the reactance, measured in ohms
Y = Z^{-1}= \frac{1}{R+jX} = \left( \frac{R}{R^2+X^2} \right) + j\left(\frac{-X}{R^2+X^2}\right)
Admittance, just like impedance, is a complex number, made up of a real part (the conductance, G), and an imaginary part (the susceptance, B), thus:
Y = G + jB \,\!,
where G (conductance) and B (susceptance) are given by:
 G = \Re(Y) = \left( \frac{R}{R^2+X^2} \right)

 B = \Im(Y) = \left( \frac{-X}{R^2+X^2}\right)
The magnitude and phase of the admittance are given by:
\left | Y \right | = \sqrt {G^2 + B^2} = \frac {1} {\sqrt {R^2 + X^2} }  \,

 \angle Y = \arctan \left( {\frac{B}{G}} \right)= \arctan \left( {\frac{-X}{R}} \right)
where
G is the conductance, measured in siemens
B is the susceptance, also measured in siemens
Note that (as shown above) the signs of reactances become reversed in the admittance domain, i.e. capacitive susceptance is positive and inductive suceptance is negative.

[edit]Admittance in mechanics

In mechanical systems (particularly in the field of haptics), an admittance is a dynamic mapping from force to motion. In other words, an equation (or virtual environment) describing an admittance would have inputs of force and would have outputs such as position or velocity. So, an admittance device would sense the input force and "admit" a certain amount of motion.
Similar to the electrical meanings of admittance and impedance, an impedance in the mechanical sense can be thought of as the "inverse" of admittance. That is, it is a dynamic mapping from motion to force. An impedance device would sense the input motion and "impede" the motion with some force.
An example of these concepts is a virtual spring. The equation describing a spring is Hooke's Law,
F = -kx \,
If the input to the virtual spring is the spring displacement, x, and the output is the force that the virtual spring applies, F, then the virtual spring would be classified as an impedance. If the input to the virtual spring is the force applied to the spring, F, and the output is the spring displacement, x, then the virtual spring would be classified as an admittance.

[edit]Admittance in geophysics

The geophysical conception of admittance is similar to that described above for mechanical systems. The concept is primarily used for describing the small effects of atmospheric pressure on earth gravity. Studies have also been carried out regarding the gravity of Venus.[2] Admittance in geophysics takes atmospheric pressure as the input and measures small changes in the gravitational field as the output. Geophysics admittance is commonly measured in μGal/mbar. These units convert according to 1 Gal = 0.01 m/s2and 1 bar = 100 kPa, so in SI units the measurement would be in units of;
\frac{\mathrm{m}/\mathrm{s}^2}{\mathrm{Pa}}   or   \frac{\mathrm{m}/\mathrm{s}^2}{\mathrm{N}/\mathrm{m}^2}   or   \frac{\mathrm{m}^3}{\mathrm{N}\cdot \mathrm{s}^2}   or, in primary units   \frac{\mathrm{m}^2}{\mathrm{kg}}
However, the relationship is not a straightforward one of proportionality. Rather, an admittance function is described which is time and frequency dependent in a complex way.[3]

[edit]Admittance in Building Fabric

This is the buildings response to a swing in temperature over 24 hours, i.e. Watts absorbed per unit area (meters) per temperature change (K).