Unit 1
Unit 1
Unit 1
Input Output
Devices Input-Output Processor Devices
The hardware of the computer is usually divided into three major parts.
The Central processing Unit (CPU) contains an arithmetic and logic unit for
manipulating data, a number of registers for storing data and control circuits for
fetching and executing instructions.
The memory of a computer contains storage for instructions and data, it is called a
Random Access Memory (RAM) because the CPU can access any location in memory
at random and retrieve the binary information within a fixed interval of time.
The input and output processor contains electronic circuit for communication and
controlling the transfer of information between the computer and the outside world.
The input and output device connected to the computer include keyboards, printers,
terminals, magnetic disk drives and other communication devices.
What is Gates? Explain the Logic Gates in brief.
LOGICAL GATES
Basic Gates
AND Gate:
In this type of gate output is high only when all its inputs are high.
If any single input is law then the output will remain low.
So it is said that in AND gate the output is only high when the input is also high.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate:
In this type of gate if any input signal is high then the output will be high.
The output is only low only when all the inputs are low
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate:
This type of gate is also known as “Inverter”.
It is a gate that contains only one input and only one output.
The output is always opposite than the input signals.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A NOT A
(A’)
0 1
1 0
Universal Gates
NAND and NOR gates are known as universal gates because we can construct any gate using
NAND & NOR gate.
NOR Gate:
The NOR gate is the complement of the OR gate.
As shown in the truth table that the output of NOR gate is exactly opposite than the
output of OR gate.
This means that the output will be high when all the input is low.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
NAND Gate:
The NAND gate is an AND gate followed by NOT gate.
As shown in the truth table that the output of NAND gate is exactly opposite than the
output of AND gate.
This means that the output will be high when all the input is high.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
Exclusive Gates
EX-OR Gate:
This gate is produces high output whenever the two inputs are at opposite level.
The EX-OR gate is the gate that produces high output for Odd number of high inputs.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A EX-OR B
0 0 0
0 1 1
1 0 1
1 1 0
EX-NOR Gate:
This gate is produces high output whenever the two inputs are at same level.
The EX-OR gate is the gate that produces high output for Even number of high inputs.
The truth table shows that output of this gate is exactly opposite of EX-OR gate.
SYMBOL:
TRUTH-TABLE:
INPUT OUTPUT
A B A EX-NOR B
0 0 1
0 1 0
1 0 0
1 1 1
a. Truth tables
b. Logic diagrams
c. Algebraic expression
x Y z F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Boolean Operations
F =xy’ + x’y
RULES FOR K- MAP:
Each cell with 1 must be included in at list 1 group.
Try to form the largest possible groups.
Try to end up with as few groups as possible.
Groups may be in sizes that are powered of 2.
Groups may be square or rectangular only.
Groups may be horizontal or vertical but not diagonal.
Groups may wrap around the table.
Groups may overleap.
The larger a group is, the more redundant inputs there are:
o Group of 1 has no redundant input.
o Group of 2 known as pair has 1 redundant input.
o Group of 4 known as quad has 2 redundant input.
o Group of 8 known as octet has 3 redundant input.
Sum-of-Products Simplification
A Boolean function represented by a truth table is plotted into the map by inserting 1's
into those squares where the function is 1.
Boolean functions can then be simplified by identifying adjacent squares in the
Karnaugh map that contain a 1.
A square is considered adjacent to another square if it is next to, above, or below it. In
addition, squares at the extreme ends of the same horizontal row are also considered
adjacent. The same applies to the top and bottom squares of a column. The objective
to identify adjacent squares containing 1's and group them together.
Groups must contain a number of squares that is an integral power of 2.
Groups of combined adjacent squares may share one or more squares with one or
more groups.
Each group of squares represents an algebraic term, and the OR of those terms gives
the simplified algebraic expression for the function.
To find the most simplified algebraic expression, the goal of map simplification is to
identify the least number of groups with the largest number of members.
The three variable maps for this function is shown in the figure 2.4
There are four squares marked with 1’s, one for each minterm that produces 1 for the
function. These squares belong to minterm 3,4,6,7 and are recognized from the figure
b.
Two adjacent squares are combined in the third column. This column belongs to both
B and C produces the term BC.
The remaining two squares with 1’s in the two corner of the second row are adjacent
and belong to row columns of C’, so they produce the term AC’.
The simplified expression for the function is the or of the two terms:
F = BC + AC’
The area in the map covered by this four variable consists of the squares marked with
1’s in fig 1.10. The function contains 1’s in the four corners that when taken as groups
give the term B’D’. This is possible because these four squares are adjacent when the
map is considered with the top and bottom or left and right edges touching.
The two 1’s on the bottom row are combined with the two 1’s on the left of the
bottom row to give the term B’C’.
The remaining 1 in the square of minterm 6 is combined with the minterm 2 to give the
term A’CD’.
Product-of-Sums Simplification
Another method for simplifying Boolean expressions can be to represent the function
as a product of sums.
This approach is similar to the Sum-of-Products simplification, but identifying adjacent
squares containing 0’s instead of 1’s forms the groups of adjacent squares.
Then, instead of representing the function as a sum of products, the function is
represented as a product of sums.
Examples
F(A,B,C,D) = (0,1,2,5,8,9,10)
The 1’s marked in the map of figure 2.7 represents the minterms that produces a 1 for
the function.
The squares marked with 0’s represent the minterm not included in F and therefore
denote the complement of F.
Combining the squares with 1’s gives the simplified function in sum-of-products form:
F = B’D +B’C’+A’C’D
If the squares marked with 0’s are combined as shown in the diagram, we obtain the
simplified complement function:
F’=(A’+B’)(C’D’)(B’+D)
The logic diagram of the two simplified expression are shown in fig 2.8
The sum of product expression us implemented in fig 2.8(a) with a group of of AND
gates, one for each AND term.
The output of the AND gates are connected to the inputs of a single OR gate. The
same function is implemented in fig 2.8(b) in product of sum form with a group of OR
gates, one for each OR term, the outputs of the OR gates are connected to the inputs
of a single And gate.
In each case it is assumed that the input variable are directly available in their
complement, so inverter are not included.
A combinational circuit is the circuit where more than 1 circuit is designed into single
component.
It has N no of inputs and M no of outputs.
It is basically used to design digital applications and it transforms the data into the
digital manner.
A combinational circuit is a connected arrangement of logic gates with a set of inputs
and outputs.
At any given time, the binary values of the outputs are a function of the binary values
of the inputs.
The design of a combinational circuit starts from a verbal outline of the problem and
ends in a logic circuit diagram. The procedure involves the following steps:
Arithmatic circuits:
It is made of different arithmetic operators. There will be addition, substraction,
division, modules and any other arithmetic operations.
Half-Adder
Full-Adder
It is a digital logic circuit whose output It is a digital logic circuit whose output
depends on the present inputs. depends on the present inputs as well as
previous inputs.
It can describe by the output values. It can describe by the output values as well
as state values.
Examples of combinational circuit are half Examples of sequential circuit are flip-flops
adder and full adder. like RS, Clocked RS, D and JK.
At any given time, the binary values of the Hence, a sequential circuit is an
outputs are a function of the binary values interconnection of flip-flops and gates.
of the inputs.
What is Flip-flops
SR Flip-Flop
Figure SR Flip-Flop
Inputs:
S (for set)
R (for reset)
C (for clock)
Outputs:
Q
Q'
If there is no signal at the clock input C, the output of the circuit cannot change
irrespective of the values at inputs S and R.
Only when the clock signals changes from 0 to 1 can the output be affected according
to the values in inputs S and R
If S =1 and R = 0 when C changes when C changes from 0 to 1 output Q is set to 1. If S =
0 and R =1 when C changes from 0 to 1.
If both S and R are 0 during the clock transition, output does not change.
When both S and R are equal to 1, the output is unpredictable and may go to either 0
or 1, depending on internal timing that occur within the circuit.
D Flip-Flop
D Flip-flop
Inputs:
D (for data)
C (for clock)
Outputs:
Q
Q'
The operation of the D flip-flop is as follow.
JK Flip-Flop
Jk Flip-Flop
Inputs:
J
K
C (for clock)
Outputs:
Q
Q'
T Flip-Flop
T Flip-Flop
Inputs:
T (for toggle)
C (for clock)
Outputs:
Q
Q'
Most flip-flops are edge-triggered flip-flops, which means that the transition occurs at
a specific level of the clock pulse.
A positive-edge transition occurs on the rising edge of the clock signal.
A negative-edge transition occurs on the falling edge of the clock signal.
Another type of flip-flop is called a master-slave flip-flop that is basically two flip-flops
in series.
Flip-flops can also include special input terminals for setting or clearing the flip-flop
asynchronously. These inputs are usually called preset and clear and are useful for
initialing the flip-flops before clocked operations are initiated.
Flip-Flop Excitation Tables
During the design of sequential circuits, the required transition from present state to
next state is known.
What the designer needs to know is what input conditions must exist to implement
the required transition.
This requires the use of flip-flop excitation tables.
Excitation Tables
1 0 0 1
1 1 X 0
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
T Flip-Flop Excitation Table
Q(t) Q(t+1) T
0 0 0
0 1 1
1 0 1
1 1 0
Sequential Circuits
Design Procedure
For m flip-flops and n inputs, the state table will consist of m columns for the present
state, n columns for the inputs, and m columns for the next state. The number of rows
in the table will be up to 2m+n, one row for each binary combination of present state
and inputs.
** Each flip-flop input equation specifies a logic diagram whose output must be
connected to one of the flip-flop inputs.