CSA Notes(architecture of Computer systems)
CSA Notes(architecture of Computer systems)
Computer is an electronic machine that makes performing any task very easy. In
computer, the CPU executes each instruction provided to it, in a series of steps,
this series of steps is called Machine Cycle, and is repeated for each
instruction. One machine cycle involves fetching of instruction, decoding the
instruction, transferring the data, executing the instruction.
Computer system has five basic units that help the computer to perform
operations, which are given below:
1. Input Unit
2. Output Unit
3. Storage Unit
4. Arithmetic Logic Unit
5. Control Unit
Input Unit
Input unit connects the external environment with internal computer system. It
provides data and instructions to the computer system. Commonly used input
devices are keyboard, mouse, magnetic tape etc.
Input unit performs following tasks:
Accept the data and instructions from the outside environment.
Output Unit
This unit holds the data and instructions. It also stores the intermediate results
before these are sent to the output devices. It also stores the data for later use.
The storage unit of a computer system can be divided into two categories:
Primary Storage: This memory is used to store the data which is being
currently executed. It is used for temporary storage of data. The data is
lost, when the computer is switched off. RAM is used as primary storage
memory.
Secondary Storage: The secondary memory is slower and cheaper than
primary memory. It is used for permanent storage of data. Commonly
used secondary memory devices are hard disk, CD etc.
All the calculations are performed in ALU of the computer system. The ALU
can perform basic operations such as addition, subtraction, division,
multiplication etc. Whenever calculations are required, the control unit transfers
the data from storage unit to ALU. When the operations are done, the result is
transferred back to the storage unit.
Control Unit
It controls all other units of the computer. It controls the flow of data and
instructions to and from the storage unit to ALU. Thus it is also known as
central nervous system of the computer.
CPU
It is Central Processing Unit of the computer. The control unit and ALU are
together known as CPU. CPU is the brain of computer system. It performs
following tasks:
It performs all operations.
Logic gates
Logic gates are the basic building blocks of any digital system. It is an
electronic circuit having one or more than one input and only one output. The
relationship between the input and the output is based on a certain logic.
OR
o The logic gates are the main structural part of a digital system.
o Logic Gates are a block of hardware that produces signals of binary 1 or 0
when input logic requirements are satisfied.
o Each gate has a distinct graphic symbol, and its operation can be
described by means of algebraic expressions.
o The seven basic logic gates includes: AND, OR, XOR, NOT, NAND,
NOR, and XNOR.
o The relationship between the input-output binary variables for each gate
can be represented in tabular form by a truth table.
oEach gate has one or two binary input variables designated by A and B
and one binary output variable designated by x
Types of Logic Gate
Basically, there are three types of logic gates based on their applications:
AND Gate
It is the two input and one output logic gate in which the output is high(1) only
when both the inputs are high(1). AND Gate is represented by the following
symbol, truth table, and Logical Expression:
Truth Table
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate
It is the two input and one output logic gate in which the output is high(1) when
either one or both inputs are high(1). OR Gate is represented by the following
symbol, truth table, and Logical Expression:
Truth Table
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate
It is the single input and single output logic gate which complements the input.
NOT Gate is represented by the following symbol, truth table, and Logical
Expression:
Truth Table
A Y
0 1
1 0
Truth Table
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
It is the two input and one output logic gate in which the output is high(1) when
both inputs are high(1). NOR Gate is represented by the following symbol, truth
table, and Logical Expression:
Truth Table
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
Truth Table
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
Truth Table
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
Applications of logic Gates
The range of usage of logic gates is quite extensive, however
some of its distinct applications are as follows:
1. In manufacturing more complex devices e.g. binary
counters etc.
2. In decision–making regarding automatic control of
machines and different industrial processes
3. In calculators and computers
4. In digital measuring techniques
5. In digital processing of communications
6. In musical instruments, games and different domestic
appliances
Variable used can have only two values. Binary 1 for HIGH and Binary 0 for
LOW.
The complement of a variable is represented by an overbar.
OR-ing of the variables is represented by a plus (+) sign between them. For
example, the OR-ing of A, B, and C is represented as A + B + C.
Logical AND-ing of the two or more variables is represented by writing a dot
between them, such as A.B.C. Sometimes, the dot may be omitted like ABC
Commutative law
Associative law
Distributive law
AND law
OR law
Inversion law
Commutative Law
Any binary operation which satisfies the following expression is referred to
as a commutative operation. Commutative law states that changing the
sequence of the variables does not have any effect on the output of a
logic circuit.
A. B = B. A
A+B=B+A
Associative Law
It states that the order in which the logic operations are performed is
irrelevant as their effect is the same.
( A. B ). C = A . ( B . C )
( A + B ) + C = A + ( B + C)
Distributive Law
Distributive law states the following conditions:
A. ( B + C) = (A. B) + (A. C)
A + (B. C) = (A + B) . ( A + C)
AND Law
These laws use the AND operation. Therefore they are called AND laws.
A .0 = 0
A.1=A
A. A = A
OR Law
These laws use the OR operation. Therefore they are called OR laws.
A +0=A
A+1=1
A+A=A
Inversion Law
In Boolean algebra, the inversion law states that double inversion of
variable results in the original variable itself.
In our minterm and maxterm section, we learned about how we can form the
maxterm from the variable's value. A column will be added for the maxterm in
the above table. The complement of the variables is taken whose value is 0, and
the variables whose value is 1 will remain the same.
Now, we will multiply all the minterms for which the output is false to find
the desired canonical POS(Product of sum) expression.
F=(X'+Y').(X+Y)
We can now draw up the truth table for the above expression to
show a list of all the possible input combinations
for A, B and C which will result in an output “0”.
Product-of-Sum Example
The following Boolean Algebra expression is given as:
Q = (A + B + C)(A + B + C)(A + B + C)(A + B + C)
1. Use a truth table to show all the possible combinations of input
conditions that will produces a “0” output.
2. Draw a logic gate diagram for the POS expression.
1. Truth Table
1. Converting Boolean Expression to Logic
Circuit
The simplest way to convert a Boolean expression into a logical
circuit is to follow the reverse approach in which we start from the
output of the Boolean expression and reach towards the input.
Example 1
Realize the Boolean Expression BC + A + (A + C) using AOI logic
Solution
To realize this using the AOI logic gates, we will use the reverse
approach.
Step 1:
Our expression BC + A + (A+C) is the summation of three terms BC,
A and, (A+C), thus a 3-input OR Gate must have been used to obtain
the expression as given :0
Step 2:
Now, BC and (A + C) both are inverted in nature, so they must have
been inverted using a NOT Gate earlier. BC must have been
obtained by inverting the input BC and (A + C) must have been
obtained by inverting the input (A + C) both using the NOT Gate.
Step 3:
Moving further, in the reverse direction we see, BC must have been
an output of 2-input AND Gate with inputs as B and C. Likewise, (A +
C) must have been obtained as the output of 2-input OR gate with A
and C as the inputs.
So, Final Logic Diagram for above given Boolean expression can be
drawn as,
3-variable K-map
The 3-variable K-map is represented as an array of eight cells. In this
case, we used A, B, and C for the variable. We can use any letter for the
names of the variables. The binary values of variables A and B are along
the left side, and the values of C are across the top. The value of the given
cell is the binary values of A and B at left side in the same row combined
with the value of C at the top in the same column. For example, the cell in
the upper left corner has a binary value of 000, and the cell in the lower
right corner has a binary value of 101.
The 4-Variable Karnaugh Map
The 4-variable K-map is represented as an array of 16 cells. Binary values
of A and B are along the left side, and the values of C and D are across the
top. The value of the given cell is the binary values of A and B at left side
in the same row combined with the binary values of C and D at the top in
the same column. For example, the cell in the upper right corner has a
binary value of 0010, and the cell in the lower right corner has a binary
value of 1010