Professional Documents
Culture Documents
Logic Gates
Logic Gates
• -0 0 - - - - - - - - - - - - - - -1 -----------
0 0 0
0 1 0
1 0 0
1 1 1
• As we proceed further, the truth table will in some cases
become quite complex especially when more than two inputs
are used.
• In all cases it is important that you write all the possible
combinations of the inputs to obtain all the possible outputs.
• You work out how many outputs are possible by realizing that it
is given by where x is the number of inputs i.e. in our case = 4.
if there are three inputs then the number of outputs is given by ,
i.e. 8 and it can be seen immediately the relatively big jump in
the number of outputs in this case.
• The easiest way to make sure all possible inputs are considered
is to determine first the number of outputs, then starting at
decimal 0, write down one line below the next in the table under
the input columns, the binary equivalent numbers consecutively
up to the number of outputs required. Consider a 3 input AND
gate and write in Boolean algebra form. A.B.C = f. there are 8
possible outputs therefore we must write down the binary
equivalents of decimal 0 to 7 as shown in the truth table.
A B C F = A.B.C
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
0 0 0
0 1 1
1 0 1
1 1 1
THE NOT GATE
• The NOT gate has one input A and one output which
is the inverse of the input. This function in Boolean
algebra form is; f = Ã
• Since there is only one input, the number of outputs
possible is = 2 and the NOT gate truth table is shown
below.
A F=Ã
0 1
1 0
DE MORGANS RULES
• The fact is that in a doubled NOTTED expression, one NOT
cancels the other NOT
EXCLUSIVE-OR LOGIC
• Exclusive-or gates will produce a logic 1 output whenever
either one of the two inputs is at logic 1 and the other is at logic
0.
• Exclusive-or gates produce a logic 0 output whenever both
inputs have the same logical state (i.e. When both are at logic 0
or both are at logic 1).
A B REQUIRE OUTPUT
0 0 0
0 1 1
1 0 1
1 1 0
INVERTED INPUTS AND OUTPUTS
• The NAND and NOR gates are said to have inverted outputs. In
other words, they are equivalent to AND and OR gates with
their outputs passed through an inverter or NOT gate.
• NAND LOGIC
• NAND (i.e. NOT-AND) gates will only produce a logic 0
output when all inputs are simultaneously at logic 1. Any other
input combination will produce a logic 1 output. A NAND gate,
therefore, is nothing more than an AND gate with its output
inverted.
NOR LOGIC
• NOR (i.e. NOT-OR) gates will only produce a logic 1
output when all inputs are simultaneously at logic 0.
Any other input combination will produce a logic 0
output.
• A NOR gate, therefore, is simply an OR gate with its
output inverted.
SEQUENTIAL LOGIC CIRCUITS
• The fundamental elements of any digital computing system are
the gates and Bistables. A bistable is an element that has two
stable states.
• The majority have at least two inputs and two outputs, one of the
outputs is the complement of the other.
• A bistable element is a device which is capable of having its
output set by an input signal, the input signal may then be
removed but the bistable output will remain unchanged, provided
the normal power supplies are maintained.
BISTABLE CONT.
• The bistable will store one BIT (0 or 1) of the information i.e.
the device will remember the original input condition.
• Any number of bistables can be linked together to form a
register capable of remembering any number of bits of
information.
• A bistable is often called a sequential device because its output
depends not only on the present value of inputs but also upon
the past history of the inputs and outputs.
• Bistables are the basic building blocks for counters,
registers, dividers and other sequential systems.
• It should be noted that sequential circuits can be
formed by using combinational elements and
memory.
• However the use of sequential circuits results in a
great saving of components but they are slower in
operation since in combinational circuits the
operations do not have to be performed in a sequence.
TYPES OF BISTABLES
• There are various types of bistables; below are a few
• S-R (set-reset) bistable
• J-K bistable
• T bistable
• D bistable
• The full name of a bistable is bistable multi-vibrator
but it is also called a latch or in American terminology
a flip-flop.
SYMBOL OF A FLIP-FLOP
1 0 0 1 1 0 d 1
1 1 0 1
1 1 d 0
1 0 1 0
1 1 1 0
• The d is of course the don’t care term as before, but in
this case, there are four, one in each row, as opposed
to two in the S-R ff. the more don’t care terms we
have in a truth table for a ff, the more versatile it
becomes.
• Sometimes we wish to create a change of state of a ff
at specific times, and the J-k ff can easily be modified
to produce such a circuit.
• This is called the triggered or toggled ff. it is often
abbreviated to T type ff.
TRIGGERED OR TOGGLED (T) FLIP-FLOP
• This type of ff is constructed by merely connecting
the J and K inputs to logic 1 signal as shown in the
block diagram.
• Since J = K = 1 at the input to the ff, whenever a
clock pulse is applied, the ff must change its state.
• In our case we are assuming that it is the leading edge
of the clock pulse which initiates the triggering.
• It is seen that the first pulse leading edge at time t,
makes the ff change its state, i.e. from logic 0 to logic
1. the ff state remains at this level until the next pulse
leading edge arrives at time t. at this point the state of
the ff must change i.e from logic 1 to logic 0.
MASTER-SLAVE FLIP-FLOP
• In this type of ff, two bistables are connected by
synchronous operated switches s1 and s2 as shown in
the block diagram.
• It can be seen that it’s impossible for both switches to be closed or
open at the same time. To achieve this in practice, the clock pulses
are fed direct to the master ff and via the inverter to the slave ff.
• This type of ff can use S-R, J-K or any other form of ff as master
and slave bistables. When used with J-K ffs, false triggering due to
internal feedback loops, which occur from time to time in S-R and
D type ffs, are prevented.
• When a clock pulse comes along, s1 is closed and the master ff
state is determined by the input conditions. The slave is isolated
from the master ff because s2 is open.
• When the clock pulse is removed, i.e. s1 opens, s2
closes and the state of the slave ff is determined by
the output of the master.
• It can be seen that the actual changes of the state of
the master-slave ff only occur on the trailing edges of
the clock pulses. This mode of operation is called
edge triggering.
COUNTERS
• An extremely important and very widely used
application of bistables (flip-flops) is in counting.
• Counters are versatile devices which can be used for
frequency division, mathematical operations, as well
as for straight forward counting.
• They generally operate in either the synchronous or
asynchronous mode.
SYNCHRONOUS COUNTERS
• A synchronous or parallel clocked counter is one in which all bistable
stages are clocked simultaneously, all outputs change state
simultaneously.
• ASYNCHRONOUS (RIPPLE) COUNTERS
• In this design, the bistable stages are linked together in cascade, so that
the first stage triggers the second stage, and so on through the counter.
• This type of counter can handle a high rate of data at its input, but when
the input data comes to its end , time has to be allowed for the last bit of
information applied to the input to ripple through the counter to the last
stage.
• Counters are basically sequential devices that follow a predetermined
sequence of states in response to the number of input pulses applied.
• Because the number of flip-flops used is finite for a given type of
counter,, after the maximum count has been reached, the counter
resets or stops, and the sequence is repeated.
• The most popular counter is one which has 4 stages and has a
maximum count of 11112, i.e. it counts from 0 to 15 in decimal
numbers.
• Any type of bistable can be used to construct a counter provided it is
clocked, T, J-K and D type are frequently used.
Ripple counter block diagram.
Up-counter :- counts upward in binary.
The input clock pulse ripples through each FF. The advantage is
circuit simplicity ;& the disadvantage is low counting speed.
SIMPLE BINARY CODED DECIMAL (BCD) COUNTER
• The total number of different states that a counter has is called the
modulus of the counter. It is usually calculated from;
• = modulus. Where n is the number of stages. In our case we had 4 stages,
the modulus would be 16, while the maximum count would be; - 1 = -1
= 15. i.e. the count is 0 -15 in decimal numbers.
• It should be appreciated that it is a quite a simple task to design a counter
whose modulus is a power of 2 i.e. 2, 4, 8, 16 etc. however we clearly
need to have counters which can count to any chosen number. In this case
we make use of a logic gate which will feed back a signal to clear the
counter at the desired point.
A BCD counter
• Counts from 0 to 9 . It is also called decade counter or decimal counter , because
of the ten discreet states 0 through 9. It divides the input frequency by 10.
In logic diagram: 1 0 1 0 0 0
FF1 FF2 FF3 FF4 FF5 FF6
SHIFT RIGHT OPERATION
• Similarly, bits shifted from a higher order position to a lower
order position causes the binary number to divide by 2. (i.e. to
divide a binary number the bits must be shifted from left to
right). 11000 ---equals dec. 24
• E.g. ---equals dec. 12
01100
00110 ---equals dec. 6
In logic diagram: 0 0 0 1 1
FF1 FF2 FF3 FF4 FF5
• The storage capacity of a shift register equals the total number
of bits of digital data it can store, which in turn depends upon
the number of flip-flops used to construct the shift register.
• Since each flip-flop can store one bit of data, the storage
capacity of the shift register equals the number of Flip-flops
used.
• As an example, the internal architecture of an eight-bit shift
register will have a cascade arrangement of eight flip-flops.
SERIAL SHIFT REGISTERS
• The basic four-bit serial-in serial-out shift register implemented
using D flip-flops. The circuit functions as follows. A reset
applied to the CLEAR input of all the flip-flops resets their Q
outputs to 0s.
• The flip-flops shown respond to the low-to-high transition of
the clock pulses as indicated by their logic symbols.
• During the first clock transition, the QA output goes from logic
‘0’ to logic ‘1’. The outputs of the other three flip-flops remain
in the logic ‘0’ state as their d inputs were in the logic ‘0’ state
at the time of clock transition.
• During the second clock transition, the QA output goes from
logic ‘1’ to logic ‘0’ and the QB output goes from logic ‘0’ to
logic ‘1’, again in accordance with the logic status of the D
inputs at the time of relevant clock transition.
• Thus, we have seen that a logic ‘1’ that was present at the data
input prior to the occurrence of the first clock transition has
reached the QB output at the end of two clock transitions.
• This bit will reach the QD output at the end of four clock
transitions.
SERIAL-IN PARALLEL-OUT SHIFT REGISTER
• A serial-in parallel-out shift register is architecturally identical
to a serial-in serial-out shift register except that in the case of
the former all flip-flop outputs are also brought out on the IC
terminals.
• Figure below shows the logic diagram of a typical serial-in
parallel-out shift register.
• Logic HIGH at either of the inputs enables the other input,
which then determines the state of the first flip-flop.
• Data at the serial inputs may be changed while the
clock input is high or low, and the register responds to
low-to-high transition of the clock.
PARALLEL-IN SERIAL-OUT SHIFT REGISTER
• The parallel-in or serial-in modes are controlled by a shift/load
input. When the SHIFT/LOAD input is held in the logic HIGH
state, the serial data input AND gates are enabled and the circuit
behaves like a serial-in serial-out shift register.
• When the SHIFT/LOAD input is held in the logic LOW state,
parallel data input AND gates are enabled and data are loaded in
parallel, in synchronism with the next clock pulse.
PARALLEL-IN PARALLEL-OUT SHIFT REGISTER
• The hardware of a parallel-in parallel-out shift register is similar
to that of a parallel-in serial-out shift register.
• If in a parallel-in serial-out shift register the outputs of different
flip-flops are brought out, it becomes a parallel-in parallel-out
shift register.
• In fact, the logic diagram of a parallel-in parallel-out shift
register is similar to that of a parallel-in serial-out shift register,
except that in the case of the former the flip-flop outputs have
ANALOGUE TO DIGITAL CONVERSION
• The majority of aircraft systems and associated equipment
function on an analogue basis.
• E.g. the flight control facilities are involved with the
mechanical movement of control surfaces and the information
handled by the system concerns the factors of amplitude and
direction, which is analogue information.
• The same consideration would also apply to other systems e.g.
hydraulic, electronics, instrumentation etc.
• There is a rapidly increasing development of automatic and
built in test equipment and data recovery in modern aircraft.
• This results in a growing requirement to provide analogue
information in digital form for direct use in digital processing
systems, data transmission and telemetry.
• Analogue to digital conversion techniques must therefore be
used. There are several method available depending upon the
source of the primary information and the degree of accuracy
required.
• An analogue to digital converter (A/D) is one which changes
analogue quantities or measurements into digital numbers and
is usually called an encoder.
• The reverse process of changing digital numbers back into some
analogue form is called a decoder.
• These are generally at the input end of system to convert the
input signal into a binary code necessary for the operation of the
system.
• Encoding circuits may take many forms e.g. convert an
analogue signal to BCD or 4bit binary code; take in a binary
signal and convert it into another code to suit the system e.g.
OCTAL to BCD.
• It is an indispensable part of any digital communication system
where the analogue signal to be transmitted is digitized at the
sending end with the help of an A/D converter.
• It is invariably used in all digital read-out test and measuring
equipment. Be it a digital voltmeter or a laser power meter, or
even a ph. meter, an A/D converter is the heart of all of them.
• An A/D converter takes at its input an analogue voltage and after
a certain amount of time produces a digital output code
representing the analogue input.
• There are various techniques developed for the purpose of A/D
conversion, and these techniques have different advantages and
disadvantages with respect to one another.
• The drawing below shows a keyboard layout (decimal input) to
give a BCD output. By pressing any one key or switch (suitably
decimal numbered) the appropriate BCD code is given at the
output.
• Assume 4 is pressed then diode 5 will conduct through RC making the
output (C) go high, all the other inputs stay low, so the output is 0100
(decimal 4).
• This principle will be employed in inertial navigation systems (INS),
inertial reference systems (IRS), and flight management systems (FMS)
as all these have keyboards. So some form of encoding will convert the
input signals into the correct code for the system.
• In flight data recoding some of the input into the system are in analogue
form e.g. dc, ac or synchro signals. This means that they have to
encoded into digital for use by the central processing unit (CPU). This
is done by analogue to digital converter.