Beruflich Dokumente
Kultur Dokumente
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 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 pchannel) 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.
Distinctive
shape
Rectangular
shape
Boolean algebra
between A & B
Truth table
INPUT OUTPUT
AND
or
&
A AND
B
INPUT OUTPUT
A
B A OR B
OR
INPUT OUTPUT
NOT
NOT A
or ~
INPU
OUTPUT
T
NAN
D
or
A B
A NAND
B
0 0
0 1
1 0
1 1
INPUT OUTPUT
NOR
or
A NOR
B
INPUT OUTPUT
A XOR
B
XOR
INPU
OUTPUT
T
XNO
R
or
A B
A XNOR
B
0 0
0 1
1 0
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
The 7400 chip, containing four NANDs. The two additional pins supply
power (+5 V) and connect the ground.
Charles Sanders Peirce (winter of 188081) 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.
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
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 highimpedance 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 development
Unconventional computing
Since 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.
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 GATES
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.
(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
inputs
or
both
not
both
of
two
inputs
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.
least one of the inputs is made low. ExampleThe hot sunny day
To switch on the pump it must be hot AND sunny. This needs an AND
circuit.
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
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
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:
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.
Gate INPUTS are driven by voltages having two nominal values, e.g.
0V and 5V representing logic 0 and logic 1 respectively.
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
NOT gate
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.
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.
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.
Alphabetic numerals
Abjad Armenian ryabhaa Cyrillic Ge'ez Greek Roman Georgian Hebrew
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
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
Decimal representation
The same tracheotomy holds for other base-n positional numeral systems:
Terminating representation: rational where the denominator divides some
nk
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.
History
16251500 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 BC1450 BC) and Linear B (ca. 13751200 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. 287212 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]
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.
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 signal
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
Logic level
The 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 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.
Technology
L voltage
H voltage
Notes
CMOS
0 V to VDD/2
VDD/2 to VDD
TTL
0 V to 0.8 V
2 V to VCC
ECL
Hobbyist frequency counter circuit built almost entirely of TTL logic chips.