100% found this document useful (6 votes)
3K views31 pages

BCA 2nd Computer System Architecture

This document contains notes for a Computer System Architecture course for BCA 2nd semester students. It covers the following topics over 4 units: Unit I discusses logic gates like AND, OR, NOT etc. and Boolean algebra concepts like theorems, simplification using K-maps. Unit II covers combinational logic circuits like adders, multiplexers, encoders. Unit III is about sequential logic circuits including various types of flip-flops, race conditions and their removal. Unit IV introduces computer organization concepts like CPU, memory, instruction types, and common bus systems. The notes provide detailed explanations, diagrams, truth tables for concepts in a clear manner according to the university syll

Uploaded by

Taha Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (6 votes)
3K views31 pages

BCA 2nd Computer System Architecture

This document contains notes for a Computer System Architecture course for BCA 2nd semester students. It covers the following topics over 4 units: Unit I discusses logic gates like AND, OR, NOT etc. and Boolean algebra concepts like theorems, simplification using K-maps. Unit II covers combinational logic circuits like adders, multiplexers, encoders. Unit III is about sequential logic circuits including various types of flip-flops, race conditions and their removal. Unit IV introduces computer organization concepts like CPU, memory, instruction types, and common bus systems. The notes provide detailed explanations, diagrams, truth tables for concepts in a clear manner according to the university syll

Uploaded by

Taha Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

BCA 2nd (CSA)

CLASS:BCA 2ndSem
Batch: 2020-2023

Computer System Architecture

Notes as per IKGPTU Syllabus

Name of Faculty: Mr/Ms<<<<<Sushma>>>


Faculty of Computer Applictions,SBS College. Ludhiana

1
BCA 2nd (CSA)

Contents Detail Page No.

Unit-I
Logic Gates: AND, OR, NOT, NAND, NOR, XOR, XNOR, NAND & NOR as
Universal Gates, Logic Gates Applications.

Boolean Algebra: Introduction, Theorems, Simplification of Boolean Expression


using Boolean Algebra, SOP & POS Forms, Realization of Boolean Expression
using Gates, K-Maps, Simplification of Boolean Expression using K-Maps.

Unit-II
Combinational Logic Circuits: Half Adder & Half Subtractor, Full Adder & Full
Subtractor, Parallel Binary Adder, Binary Adder/Subtractor.

Combinational Logic Circuits: Multiplexers & Demultiplexers, Implementation of


Boolean equations using Multiplexer and Demultiplexer, Encoders & Decoders.

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.

 NAND gate( )- The NAND gate (negated AND) gives an output of 0 if


both inputs are 1, it gives 1 otherwise.
 NOR gate( )- The NOR gate (negated OR) gives an output of 1 if both
inputs are 0, it gives 0 otherwise.
 XNOR gate( )- The XNOR gate (negated XOR) gives an output of 1 both
inputs are same and 0 if both are different.

AND Gate

A circuit which performs an AND operation is shown in figure. It has n input (n


>= 2) and one output.

5
BCA 2nd (CSA)

Logic diagram

Truth Table

OR Gate

A circuit which performs an OR operation is shown in figure. It has n input (n >=


2) and one output.

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

A NOT-AND operation is known as NAND operation. It has n input (n >= 2) and


one output.

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.

Logic Gates Applications

 NAND Gates are used in Burglar alarms and buzzers.


 They are basically used in circuits involving computation and processing.
 They are also used in push button switches. E.g. Door Bell.
 They are used in the functioning of street lights.
 AND Gates are used to enable/inhibit the data transfer function.
 They are also used in TTL (Transistor Transistor Logic) and CMOS circuitry.

10
BCA 2nd (CSA)

BOOLEAN ALGEBRA

• We can interpret high or low voltage as representing true or false.

• A variable whose value can be either 1 or 0 is called a Boolean

variable.

• AND, OR, and NOT are the basic Boolean operations.

• We can express Boolean functions with either an expression or a

truth table.

• Every Boolean expression can be converted to a circuit.

• Now, we’ll look at how Boolean algebra can help simplify expressions,
which in turn will lead to simpler circuits.

• Recall that the two binary values have different names:

– True/False

– On/Off

– Yes/No

– 1/0

• We use 1 and 0 to denote the two values.

• The three basic logical operations are:

– AND

– OR

– NOT

• AND is denoted by a dot (·).

• OR is denoted by a plus (+).

11
BCA 2nd (CSA)

• NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~)


before the variable

Examples:

is read “Y is equal to A AND B.”

is read “z is equal to x OR y.”

is read “X is equal to NOT A.”

Tabular listing of the values of a function for all possible

Combinations of values on its arguments

Example: Truth tables for the basic logic operations

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

Boolean Operator Precedence

 The order of evaluation is:

1. Parentheses

2. NOT

3. AND

13
BCA 2nd (CSA)

4. OR

 Consequence: Parentheses appear around OR expressions

 Example: F = A(B + C)(C + D)

Boolean Algebra Postulates

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

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 :

DE Morgan’s Theorem represents two of the most important rules of boolean


algebra.
(i). (A . B)' = A' + B'
Thus, the complement of the product of variables is equal to the sum of their
individual complements.

(ii). (A + B)' = A' . B'


14
BCA 2nd (CSA)

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

(A1 + A2 + ... + An)' = A1' . A2' . A3' ... An'


2. Transposition Theorem:
It states that:
AB + A'C = (A + C) (A' + B)
Proof:
RHS
= (A + C) (A' + B)
= AA' + A'C + AB + CB
= 0 + A'C + AB + BC
= A'C + AB + BC (A + A')
= AB + ABC + A'C + A'BC
= AB + A'C
= LHS
3. Redundancy Theorem :
This theorem is used to eliminate the redundant terms. A variable is associated
with some variable and its complement is associated with some other variable and
the next term is formed by the left over variables, then the term becomes
redundant.
Example:
AB + BC' + AC = AC + BC'
15
BCA 2nd (CSA)

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)

Simplification of Boolean Expression using Boolean Algebra

Minimize the following Boolean expression using Boolean identities −

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)

Or, F(A,B,C)=A.A+A.C+B.A+B.CF(A,B,C)=A.A+A.C+B.A+B.C [Applying


distributive Rule]

Or, F(A,B,C)=A+A.C+B.A+B.CF(A,B,C)=A+A.C+B.A+B.C [Applying


Idempotent Law]

Or, F(A,B,C)=A(1+C)+B.A+B.CF(A,B,C)=A(1+C)+B.A+B.C [Applying


distributive Law]

Or, F(A,B,C)=A+B.A+B.CF(A,B,C)=A+B.A+B.C [Applying dominance Law]

Or, F(A,B,C)=(A+1).A+B.CF(A,B,C)=(A+1).A+B.C [Applying distributive Law]

Or, F(A,B,C)=1.A+B.CF(A,B,C)=1.A+B.C [Applying dominance Law]

Or, F(A,B,C)=A+B.CF(A,B,C)=A+B.C [Applying dominance Law]

So, F(A,B,C)=A+BCF(A,B,C)=A+BC is the minimized form.

SOP & POS Terms

Sum of Product (SOP)

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

F= A.B.C +A .B. C + A. B. C + A. B. C + A .B. C + A .B. C + A. B .C +


A.B.C

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)

F=(1, 2, 3,4 5,6,7)

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.

Max terms for 3 input variables are given below.

Introduction of K-Map (Karnaugh Map)

19
BCA 2nd (CSA)

In 1953, the American physicist Maurice Karnaugh (pronounced “car-no”, 1924-)


invented a form of logic diagram called a Karnaugh map

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:

1. First, we find the K-map as per the number of variables.

2. Find the maxterm and minterm in the given expression.

3. Fill cells of K-map for SOP with 0 respective to the minterms.

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.

o The possible combinations of grouping 2 adjacent minterms are {(m0, m1),


(m2, m3), (m0, m2) and (m1, m3)}.

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)

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

22
BCA 2nd (CSA)

Simplification of Boolean Expression using K-Maps.

Minterm Solution of K Map

There are the following steps to find the minterm solution or K-map:

Step 1:

Pause

Unmute

Loaded: 27.54%

Fullscreen

Firstly, we define the given expression in its canonical form.

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)

Next, we form the groups by considering each one in the K-map.

Notice that each group should have the largest number of 'ones'. A group cannot
contain an empty cell or cell that contains 0.

In a group, there is a total of 2n number of ones. Here, n=0, 1, 2, …n.

Example: 20=1, 21=2, 22=4, 23=8, or 24=16.

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)

In horizontally or vertically manner, the groups of ones are formed in shape of


rectangle and square. We cannot perform the diagonal grouping in K-map.

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'

Let's take some examples of 2-variable, 3-variable, 4-variable, and 5-variable K-


map examples.

Example 1: Y=A'B' + A'B+AB

Simplified expression: Y=A'+B

27
BCA 2nd (CSA)

Example 2: Y=A'B'C'+A' BC'+AB' C'+AB' C+ABC'+ABC

Simplified expression: Y=A+C'

Example 3: Y=A'B'C' D'+A' B' CD'+A' BCD'+A' BCD+AB' C' D'+ABCD'+ABCD

Simplified expression: Y=BD+B'D'

Maxterm Solution of K-Map

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:

1. We will populate the K-map by entering the value of 0 to each sum-term


into the K-map cell and fill the remaining cells with one's.

2. We will make the groups of 'zeros' not for 'ones'.

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)

Simplified expression: A'B

Example 2: Y=(A + B + C') + (A + B' + C') + (A' + B' + C) + (A' + B' + C')

29
BCA 2nd (CSA)

Simplified expression: Y=(A + C') .(A' + B')

Example 3: F(A,B,C,D)=π(3,5,7,8,10,11,12,13)

Simplified expression: Y=(A + C') .(A' + B')

30
BCA 2nd (CSA)

31

You might also like