Professional Documents
Culture Documents
Logic
Formal logic is a branch of mathematics
that deals with true and false values
instead of numbers.
Introduction
A logic gate is an idealized or physical device implementing a
Boolean function; that is, it performs 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. 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 logic,
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 Signals
There are a number of different systems for representing binary
information in physical systems.
A voltage signal with zero (0) corresponding to 0 volts and one (1)
corresponding to five or three volts.
A sinusoidal signal with zero corresponding to some frequency,
and one corresponding to some other frequency.
A current signal with zero corresponding to 4 milliamps and one
corresponding to 20 milliamps.
And one last way is to use switches, OPEN for "0" and CLOSED for
"1".
( And there are more ways !)
AND gate
e.g. I get up if it is 8-00 a.m. AND it is a weekday he said if A = 8-00 a.m. B = weekday
and Y = get up then he said you can write:
Y A B
where the dot represents logical AND.
He went on to say that if 1 represents TRUE
and 0 represents FALSE
then the function can be defined in a truth table.
Truth Table
The truth table has an entry for each possible combination of inputs.
For n inputs there will be 2n entries 2 inputs = 4 entries.
Logic Gates
Symbol
The symbol adopted for the AND function ( gate) is shown below
American (MIL-STD-806)
British (IEC 617:12)
A
B
A
Y
B
Logic Gates
&
OR gate
e.g. I turn on my headlights if it is dark OR it is raining
if A = dark B = raining and Y = headlights on then:
Y A B
where the + sign represents logical OR.
Logic Gates
American (MIL-STD-806)
A
Y
B
Logic Gates
NOT gate
e.g. I turn on the heating if it is NOT hot
if A = hot and Y = Heating on then:
Y A
Logic Gates
American (MIL-STD-806)
British (IEC 617:12)
Y A B
Note that the normal OR includes the case where we have both inputs true. The EXOR does not
include this case.
For more than two inputs the gate is defined as:
The output is TRUE if we have an odd number of inputs TRUE
A
B
A
Y
B
Logic Gates
Logic Gates
&
A
B
Y
B
Logic Gates
Logic Gates
Universal Gates
NAND and NOR gates are referred to as
universal gates as the three basic gates can
be constructed using either one of the two.
This therefore implies that all logic circuits can
be constructed using either of the gates.
The notes show this process for NAND only but
it can be shown for NOR also.
Logic Gates
Logic Gates
Logic Gates
B A B
B A B
B A B A
A B
B A B
A B
A B
Finally if we invert our result we see that the 3rd and 7th column are
identical. This means that if we invert the inputs then NAND then
we will end up with the OR function.
Logic Gates
A drill (D) is to operate if we are in automatic (A) and the system (S)
is running or if we are in manual (M) and a button (B) is pressed or
if an override (O) input is not operated.
The boolean (logic) expression for this can be written in the
following way:
D A S M B O
Logic Gates
Logic Gates
At this point let us examine different logic integrated circuits (I.C.s) families which
can be used to construct logic circuits.
Logic Families
Transistor-Transistor Logic (TTL) is a class of digital circuits built from bipolar
junction transistors (BJT), and resistors. It is called transistor-transistor logic
because both the logic gating function (e.g. AND) and the amplifying function are
performed by transistors (contrast this with RTL and DTL).
Transistor Transistor Logic TTL prefix 74 e.g. 7400Quad 2-input NAND
More Specifically
MM74XXX00P
MM Manufacturers codes
e.g.
SN Texas Instruments
CD
Harris Semiconductors
DM
Fairchild Semiconductors
M SGS-Thomson Microelectronics
Logic Gates
MC
Motorola
Transistor Transistor Logic TTL
XXX variants
e.g.
L
Low power
S Schottky high speed
LS
Low power Schottky
ALS
Advanced low power Schottky
Power
LS +5V 5% 10nS
2 mW
ALS +5V 5% 7nS 1 mW
Transistor Transistor Logic TTL
Prefix 54 not 74 is used for higher specifications
( normally military )
range
tolerance
Commercial 74
0 - 70C 5 %
families
Military 54 families -55 - +125C 10 %
Transistor Transistor Logic TTL
Most TTL families
An input is recognised as 1 if the input is >2V
An input is recognised as 0 if the input is < 0.8V
Noise immunity is the difference = 1.2V
A low output has a maximum output of 0.2V
A high output has a minimum output of 3.3V
Available TTL Gate Packages
Quad 2-input gates
Logic Gates
7408
7409
7410
7411
7412
Others
7430 8- input NAND gate
Hex NOT gates
74HCT
74ACT
74AC
Logic Problem.
Logic Gates
BUT
By observation we can see that NANDs 2 and 3
simply invert 1s output then invert it again.
This means that they cancel each other out
and can be removed.
This is also true for NANDs 5 and 6 and
NANDs 8 and 9, leaving us with
Logic Gates
This requires:
2 x 2-input NAND 1 x 7400
1 x 3-input NAND 1 x 7410
With a little understanding of logic gates we
can reduce the requirements to only one chip
by using the fact that:
Logic Gates
So we need:
3 x 3-input NANDs1 x 7410
Note.
Conversions from AND, OR, NOT to NAND only
rarely produce a less complex circuit but
normally the complexity is similar. The
advantage lies in the fact that NAND chips
Logic Gates
Logic Gates
a
b
c
R2
R4
Q3
Q1
Q2
D
Q4
R3
Logic Gates
gate
Vs+
Input A
Q1
Input B
Q2
Output
Q4
Q3
Logic Gates
Logic Gates
This resource was created by the University of Wales Newport and released as an open educational resource
through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open
Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme.
Logic Gates