BCA 2nd Computer System Architecture
BCA 2nd Computer System Architecture
CLASS:BCA 2ndSem
Batch: 2020-2023
1
BCA 2nd (CSA)
Unit-I
Logic Gates: AND, OR, NOT, NAND, NOR, XOR, XNOR, NAND & NOR as
Universal Gates, Logic Gates Applications.
Unit-II
Combinational Logic Circuits: Half Adder & Half Subtractor, Full Adder & Full
Subtractor, Parallel Binary Adder, Binary Adder/Subtractor.
Unit-III
Sequential Logic Circuits: Latch, Flip Flops- R-S Flip-Flop, J-K Flip-Flop, Race
Around Condition, Removing Race Around Condition, Master-Slave JK Flip-Flop,
D Flip-Flop, T Flip-Flop, Applications of Flip-Flops.
Unit-IV
Introduction to Computer Organization: Introduction to Computer and CPU
(Computer Organization, Computer Design and Computer Architecture), Stored
Program Concept- Von Neumann Architecture, Harvard Architecture, RISC and
CISC Architecture.
Register Transfer and Micro operations- Introduction to Registers, Instruction
Format, Types of Instructions- Memory Reference Instructions, Register Reference
Instructions and Input-Output Instructions.
Common Bus System: Introduction to Common Bus System, Types of Buses (Data
Bus, Control Bus, Address Bus), 16-bit Common Bus System--Data Movement
among registers using Bus
2
BCA 2nd (CSA)
3
BCA 2nd (CSA)
UNIT –I
4
BCA 2nd (CSA)
Logic Gates
In Boolean Algebra, there are three basic operations, which are analogous to
disjunction, conjunction, and negation in propositional logic. Each of these
operations has a corresponding logic gate. Apart from these there are a few other
logic gates as well.
Logic Gates –
AND gate(.) – The AND gate gives an output of 1 if both the two inputs
are 1, it gives 0 otherwise.
OR gate(+) – The OR gate gives an output of 1 if either of the two inputs
are 1, it gives 0 otherwise.
NOT gate(‘) – The NOT gate gives an output of 1 input is 0 and vice-
versa.
XOR gate( ) – The XOR gate gives an output of 1 if either both inputs
are different, it gives 0 if they are same.
Three more logic gates are obtained if the output of above-mentioned gates
is negated.
AND Gate
5
BCA 2nd (CSA)
Logic diagram
Truth Table
OR Gate
Logic diagram
Truth Table
NOT Gate
6
BCA 2nd (CSA)
NOT gate is also known as Inverter. It has one input A and one output Y.
Logic diagram
Truth Table
NAND Gate
Logic diagram
Truth Table
7
BCA 2nd (CSA)
NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one
output.
Logic diagram
Truth Table
XOR Gate
XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full
adder and subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or
sometime as X-OR gate. It has n input (n >= 2) and one output.
Logic diagram
8
BCA 2nd (CSA)
Truth Table
XNOR Gate
XNOR gate is a special type of gate. It can be used in the half adder, full adder
and subtractor. The exclusive-NOR gate is abbreviated as EX-NOR gate or
sometime as X-NOR gate. It has n input (n >= 2) and one output.
Logic diagram
Truth Table
Universal Gates
9
BCA 2nd (CSA)
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.
The symbol is an OR gate with a small circle on the output. The small circle
represents inversion.
10
BCA 2nd (CSA)
BOOLEAN ALGEBRA
variable.
truth table.
• Now, we’ll look at how Boolean algebra can help simplify expressions,
which in turn will lead to simpler circuits.
– True/False
– On/Off
– Yes/No
– 1/0
– AND
– OR
– NOT
11
BCA 2nd (CSA)
Examples:
AND
Y Z = X·Y
X
0 0 0
0 1 0
1 0 0
1 1 1
12
BCA 2nd (CSA)
OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT
X Z= X
0 1
1 0
1. Parentheses
2. NOT
3. AND
13
BCA 2nd (CSA)
4. OR
Commutative Law
x•y=y•x x+y=y+x
Identity Element
x•1=x x+0=x
x’+ 0 = x’
x’·1 = x’
Complement
x • x’ = 0 x + x’ = 1
Boolean algebraic theorems are the theorems that are used to change the form of a
boolean expression. Sometimes these theorems are used to minimize the terms of
the expression, and sometimes they are used just to transfer the expression from
one form to another.
There are boolean algebraic theorems in digital logic:
1. De Morgan’s Theorem :
Thus, the complement of the sum of variables is equal to the product of their
individual complements.
he above two laws can be extended for n variables as
(A1 . A2 . A3 ... An)' = A1' + A2' + ... + An'
And
Proof:
LHS
= AB + BC' + AC
= AB(C + C') + BC'(A + A') + AC(B + B')
= ABC + ABC' + ABC' + A'BC' + ABC + AB'c
= ABC + ABC' + A'BC' + AB'C
= AC(B + B') + BC'(A + A')
= AC + BC'
= RHS
4. Duality Theorem :
Dual expression is equivalent to write a negative logic of the given boolean
relation. For this,
1. Change each OR sign by and AND sign and vice-versa.
2. Complement any 0 or 1 appearing in the expression.
3. Keep literals as it is.
Example:
Dual of A(B+C) = A+(B.C) = (A+B)(A+C)
5. Complementary Theorem:
For obtaining complement expression,
1. Change each OR sign by AND sign and vice-versa.
2. Complement any 0 or 1 appearing in the expression.
3. Complement the individual literals.
Example:
Complement of A(B+C) = A'+(B'.C') = (A'+B')(A'+C')
16
BCA 2nd (CSA)
F(A,B,C)=(A+B)(A+C)F(A,B,C)=(A+B)(A+C)
Solution
Given, F(A,B,C)=(A+B)(A+C)F(A,B,C)=(A+B)(A+C)
Sum of Product is the abbreviated form of SOP. Sum of product form is a form of
expression in Boolean algebra in which different product terms of inputs are being
summed together. This product is not arithmetical multiply but it is Boolean logical
AND and the Sum is Boolean logical OR.
To understand better about SOP, we need to know about min term.
Min Term
17
BCA 2nd (CSA)
Minterm means the term that is true for a minimum number of combinations of
inputs. That is true for only one combination of inputs.
Since AND gate also gives True only when all of its inputs are true so we can say
min terms are AND of input combinations like in the table given below.
2n = n is variables
23= 2*2*2=8
M0 0 0 0 0
M1 0 0 1 1
M2 0 1 0 1
M3 0 1 1 1
M4 1 0 0 1
M5 1 0 1 1
M6 1 1 0 1
M7 1 1 1 1
F=( A .B. C + A. B. C + A. B. C + A .B. C + A .B. C + A. B .C + A.B.C )
18
BCA 2nd (CSA)
Product of Sum
Product of Sum abbreviated for POS.
The product of Sum form is a form in which products of different sum terms of
inputs are taken. These are not arithmetic product and sum but they are logical
Boolean AND and OR respectively.
To better understand about Product of Sum, we need to know about Max term.
Max Term
Maxterm means the term or expression that is true for a maximum number of input
combinations or that is false for only one combination of inputs.
Since OR gate also gives false for only one input combination. So Maxterm is OR
of either complemented or non-complemented inputs.
19
BCA 2nd (CSA)
The K-map is a systematic way of simplifying Boolean expressions. With the help
of the K-map method, we can find the simplest POS and SOP expression, which is
known as the minimum expression. The K-map provides a cookbook for
simplification.
Just like the truth table, a K-map contains all the possible values of input variables
and their corresponding output values. However, in K-map, the values are stored in
cells of the array. In each cell, a binary value of each input variable is stored.
The K-map method is used for expressions containing 2, 3, 4, and 5 variables. For
a higher number of variables, there is another method used for simplification called
the Quine-McClusky method. In K-map, the number of cells is similar to the total
number of variable input combinations. For example, if the number of variables is
three, the number of cells is 23=8, and if the number of variables is four, the
number of cells is 24. The K-map takes the SOP and POS forms. The K-map grid is
filled using 0's and 1's. The K-map is solved by making groups. There are the
following steps used to solve the expressions using K-map:
4. Fill cells of the block for POS with 1 respective to the maxterm.
5. Next, we create rectangular groups that contain total terms in the power of
two like 2, 4, 8, … and try to cover as many elements as we can in one
group.
6. With the help of these groups, we find the product terms and sum them up
for the SOP form.
2 Variable K-map
20
BCA 2nd (CSA)
There is a total of 4 variables in a 2-variable K-map. There are two variables in the
2-variable K-map. The following figure shows the structure of the 2-variable K-
map:
o In the above figure, there is only one possibility of grouping four adjacent
minterms.
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.
21
BCA 2nd (CSA)
22
BCA 2nd (CSA)
There are the following steps to find the minterm solution or K-map:
Step 1:
Pause
Unmute
Loaded: 27.54%
Fullscreen
Step 2:
Next, we create the K-map by entering 1 to each product-term into the K-map cell
and fill the remaining cells with zeros.
Step 3:
23
BCA 2nd (CSA)
Notice that each group should have the largest number of 'ones'. A group cannot
contain an empty cell or cell that contains 0.
We group the number of ones in the decreasing order. First, we have to try to make
the group of eight, then for four, after that two and lastly for 1.
24
BCA 2nd (CSA)
The elements in one group can also be used in different groups only when the size
of the group is increased.
The elements located at the edges of the table are considered to be adjacent. So, we
can group these elements.
25
BCA 2nd (CSA)
We can consider the 'don't care condition' only when they aid in increasing the
group-size. Otherwise, 'don't care' elements are discarded.
Step 4:
In the next step, we find the boolean expression for each group. By looking at the
common variables in cell-labeling, we define the groups in terms of input
variables. In the below example, there is a total of two groups, i.e., group 1 and
group 2, with two and one number of 'ones'.
In the first group, the ones are present in the row for which the value of A is 0.
Thus, they contain the complement of variable A. Remaining two 'ones' are present
in adjacent columns. In these columns, only B term in common is the product term
corresponding to the group as A'B. Just like group 1, in group 2, the one's are
present in a row for which the value of A is 1. So, the corresponding variables of
this column are B'C'. The overall product term of this group is AB'C'.
26
BCA 2nd (CSA)
Step 5:
Lastly, we find the boolean expression for the Output. To find the simplified
boolean expression in the SOP form, we combine the product-terms of all
individual groups. So the simplified expression of the above k-map is as follows:
A'+AB'C'
27
BCA 2nd (CSA)
28
BCA 2nd (CSA)
To find the simplified maxterm solution using K-map is the same as to find for the
minterm solution. There are some minor changes in the maxterm solution, which
are as follows:
3. Now, we will define the boolean expressions for each group as sum-terms.
4. At last, to find the simplified boolean expression in the POS form, we will
combine the sum-terms of all individual groups.
Let's take some example of 2-variable, 3-variable, 4-variable and 5-variable K-map
examples
Example 1: Y=(A'+B')+(A'+B)+(A+B)
Example 2: Y=(A + B + C') + (A + B' + C') + (A' + B' + C) + (A' + B' + C')
29
BCA 2nd (CSA)
Example 3: F(A,B,C,D)=π(3,5,7,8,10,11,12,13)
30
BCA 2nd (CSA)
31