Computer Organization
(CE-313)
Lecture – 1
Instructors:
Ms.Raazia Saher
Mr. Marwan El-Haj
Ms. Madeeha Anjam
1
Introduction
Computer Organization
Computer Architecture
Logic Gates
Boolean Algebra
Boolean Function
Truth Table
Logic Design
The main purpose of Boolean Algebra
Boolean Expression Simplification
2
Syllabus
Check Syllabus on your Blackboard account
3
Syllabus
4
Recommended Text Books
Morris Mano, "Computer System Architecture", 3rd
Edition, 1992, Morgan Koufman, ISBN- 13: 978-
0123747501.
L. Null and J. Lobur, “Essentials of Computer
Organization and Architecture”, 4th Edition, 2015, Jones
& Bartlett Learning. ISBN-13: 978-1284074482
5
Additional References:
Additional References:
D. A. Patterson, J. L. Hennessy, “Computer Organization
and Design”, 4th Edition, 2009, Morgan Kaufmann, ISBN-
978-0123744937
William Stallings, "Computer Organization and Architecture:
Designing for performance", 9th Edition, 2012, Pearson
Education, ISBN-13: 978-0273769194.
6
Recommended Reference
Books
[1] V. Carl Hamacher, et al,
“Computer Organization”,
McGraw Hill, 2001, ISBN: 0071122184
[2] David A. Patterson, John L. Hennessy,
“Computer Organization & Design: The
Hardware-Software Interface”,
Morgan Kaufmann, 2004, ISBN 1558606041.
7
Grading Schema
Assessment Task Week Due Proportion of Final
Assessment
1 Theory Quizzes 4,7,11,14 10%
2 Home Works 3,6,10,13 4%
3 Project 16 6%
4 Theory Midterm Exam 8,9 or 10 20%
5 Lab Activity/Lab Work Every 10%
Week
6 Lab Mid Exam 8 or 9 5%
7 Lab Final 16 10%
8 Theory Final Exam 17 or 18 40%
Total 100%
Grading Scale: A+: 95–100; A: 90–94; B+: 85–89; B: 80–84; C+: 75–79; C:
70–74; D+: 65–69; D: 60–64; F: 0–59
8
Course Outcomes
After completing this course, the student will be able to:
1. Describe a simple computer by explaining its basic
organization
2. Explain the different instruction set architectures and
addressing modes
3. Explain memory hierarchy by defining different types of
memory
4. Discuss different Input / Output and storage systems
9
Additional Instructions
Quiz Policy: There will be four announced theoretical quizzes and it will be
closed book/notes. Depending on the class there might be few surprise
quizzes. Quizzes can be scheduled in different time so that classes will not be
affected.
Reading the Text: Power point slides and white board will be used to
deliver the lectures. It should be noted that the slides are primarily used to
help the instructor to deliver lectures. Students should not SOLELY depend
on those for preparing themselves for exams. They are highly encouraged
to take notes during lectures. Moreover, each student MUST read the
textbook in order to fully comprehend the materials and get good grades in
this course.
10
Additional Instructions
Plagiarism: Any students who are involved in any sort of copying during
quiz, midterm, or final exam will be given a zero in the respective exam.
Similar action will be taken in case of homework, lab assignments and
project. No student can carry any portable devices during exams such as
mobile phones, tablet, smart watches or any electronic device that can be
used for cheating.
11
Computer Organization
Computer Organization (Definition)
It is concerned with the way the
hardware components operate and the
way they are connected together to form
the computer system. A block diagram of
computer System is shown in Figure-1.
12
Computer Organization
Figure-1: Block Diagram of Computer System 13
Computer Architecture
Computer Architecture (Definition)
It is concerned with the structure and
behavior of the computer as seen by the
user.
14
Logic Gates
Basic Logic Gates:
AND, OR, NOT (Invereter), Buffer
Other Logic Gates:
NAND, NOR (Universal Gates)
XOR, XNOR
Boolean Algebra:
Boolean Function
Truth Table
Logic Diagram
15
Basic Logic Gates
16
Other Logic Gates
17
Boolean Algebra
Boolean Algebra (Definition): Boolean
algebra is an algebra that deals with
binary variables and logic operations. The
variables are designed by letters such as
A, B, x, y. The three basic logic
operations are AND, OR, and
Compliment.
18
Boolean Function
Boolean function: A Boolean function can
be expressed algebraically with binary
variables, the logic operation symbols,
parentheses, and equal sign. For a given
value of variables, the Boolean function
can be either 1 or 0. For example, the
following is Boolean function:
19
Truth Table
Truth Table: The relationship between a
function and its binary variables can be
represented in a truth table. To represent
a function in a truth table we need a list
of the 2n combinations of the n binary
variables. For example consider the Truth
Table shown in Figure-2:
20
Truth Table
21
Logic Design
22
Main purpose of Boolean
Algebra
The main purpose of Boolean algebra:
1.Express in Algebraic form a truth table
relationship between binary variables.
2.Express in algebraic form the input-output
relationship of logic diagrams.
3.Find simpler circuit for the same function.
23
Boolean Expression
Simplification
Boolean expression simplification:
A Boolean function specified by a truth table
can be expressed algebraically in many
different ways. By manipulating a Boolean
expression according to Boolean algebra
rules, one may obtain a simpler expression
that will require fewer gates. How we will do
that, let us see the Table 1-1
24
Boolean Expression
Simplification
25
Boolean Expression
Simplification
26
Boolean Expression
Simplification
27
Boolean Expression
Simplification
28
Two logic diagrams of same
Boolean Function
29
Computer Organization
(CE-313)
Lecture – 2
Instructors:
Ms.Raazia Saher
Mr. Marwan El-Haj
Ms. Madeeha Anjam
30
Combinational Circuits
Half Adder
Full Adder
Sequential Circuits
Flip Flops
SR Flip Flop
JK Flip Flop
D Flip Flop
T Flip Flop
Digital Components
31
Combinational Circuits
Combinational Circuits (Definition):
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 combination of the
inputs. A block diagram of a
combinational circuit is shown in Fig-2-1
32
Combinational Circuits
Figure 2-1: Block diagram of a Combinational Circuit
33
Design of Combinational
Circuit
Design of Combinational Circuit:
The design of Combinational circuit
starts from the verbal outline of the
problem and ends in a logic circuit
diagram. The procedure involves the
following steps:
1. The problem is stated.
2. The input and output variables are
assigned letter symbols. 34
Design of Combinational
Circuit
3. The truth table that defines the
relationship between inputs and
outputs is derived.
4. The simplified Boolean functions for
each output are obtained.
5. The logic diagram is drawn.
35
Half Adder
A combinational circuit that performs
the arithmetic addition of two bits is
called a half-adder.
The input variables of a half-adder are
called the augend and addend bits.
The output variables are called sum
and carry.
36
Half Adder
We assign symbols x and y to the two
input variables, and S (for Sum) and C
(for carry) to the two output variables.
37
Half Adder
38
Half Adder
39
Half Adder
40
Full Adder
A full-adder is a combinational circuit
that forms the arithmetic sum of three
input bits. It consists of three inputs
and two outputs.
41
Full Adder
42
Full Adder
43
Full Adder
44
Full Adder
The K-map simplification for full-adder
output functions is shown in Figure 2-3.
Why this
is so, here
is the
proof on
next slide
Figure 2-3: The logic diagram of Half Adder
45
Proof
46
Full Adder
47
Full Adder
48
Sequential Circuits
Sequential Circuits: The sequential
circuits consists of storage elements.
The most common type of sequential
circuit is the synchronous type.
Synchronous sequential circuits employ
signals that effect the storage elements
only at discrete instants of time.
49
Sequential Circuits
The storage elements employed in clock
sequential circuits are called flip-flop.
50
Flip-Flop
Flip-Flop: A flip flop is a binary cell
capable of storing one bit of information.
It has two outputs, one for the normal
value and one for the complement value
of the bit stored in it.
A flip flop maintains a binary state until
directed by clock pulse to switch states.
51
Flip-Flop
The difference among various types of
flip-flops is in the number of inputs they
possess and in the manner in which the
inputs affect the binary state. The most
common types of flip-flop are
SR flip flop (Set Reset Flip flop)
JK flip flop (Master Slave Flip flop)
D flip flop (Data Flip flop)
T flip flop (Toggle Flip flop)
52
SR Flip-Flop
The graphical symbol of SR flip-flop is
shown in Figure 2-6.
Figure 2-6: The Graphical Symbol of SR Flip-Flop
53
SR Flip-Flop
54
D Flip-Flop
The graphical symbol of D flip-flop is
shown in Figure 2-7.
Figure 2-7: The Graphical Symbol of D Flip-Flop
55
D Flip-Flop
The characteristic table of D flip-flop is
shown in Table 2-4
Table 2-4: The characteristic table of D Flip-Flop
56
JK Flip-Flop
The graphical symbol of JK flip-flop is
shown in Figure 2-8.
Figure 2-8: The Graphical Symbol of JK Flip-Flop
57
JK Flip-Flop
The characteristic table of JK flip-flop is
shown in Table 2-5
Table 2-5: The characteristic table of JK Flip-Flop
58
T Flip-Flop
The graphical symbol of T (toggle) flip-
flop is shown in Figure 2-9.
Figure 2-9: The Graphical Symbol of T Flip-Flop
59
T Flip-Flop
The characteristic table of T flip-flop is
shown in Table 2-6
Table 2-6: The characteristic table of T Flip-Flop
60
Digital Components
Decoder: a decoder is a combinational
circuit that converts binary information
from the n coded inputs to a maximum
of 2n unique outputs
n-to-m line decoder where m x 2n
Encoder: it performs the inverse
operation of a decoder
61
Digital Components
Multiplexer: a multiplexer is a
combinational circuit that receives
binary information from one of 2n input
data lines and directs it to a single
output line. The selection of input is
done by n select lines.
A 2n-to-1 multiplexer has 2n inputs, 1
output & n select lines.
62
Digital Components
De-multiplexer: It performs the inverse
operation of a Multiplexer:
63
Digital Components
Register: a group of flip flops with each
flip flop capable of storing one bit of
information. An n bit register has n flip
flops and can store n- bit information
registers with parallel load
Shift registers
64
Digital Components
Counter: a register that goes through a
predetermined sequence of states upon
the application of input pulses is called a
counter.
Synchronous counter: when each flip
flop is driven by the same clock
Asynchronous counter : when each flip
flop is driven by different clock
65
Digital Components
Memory Unit: a memory unit is a
collection of storage cells together with
associated circuits needed to transfer
information (data) in & out of storage.
Random Access Memory (RAM)
Read Only Memory ( ROM)
66
Digital Components
RAM n data input lines
k address lines
Memory Unit
Read 2k words
n bits per word
Write
n data output lines
67
Digital Components
ROM K address input lines
Memory Unit
2k words
n bits per word
n data output lines
68
Parallel Register
69
5-Bit Shift Register
70
Counter
A register whose value is easily incremented
by 1 modulo the capacity of the register
After the maximum value is achieved the next
increment sets the counter value to 0
An example of a counter in the CPU is the
program counter
Can be designated as:
Asynchronous
Relatively slow because the output of one flip-flop
triggers a change in the status of the next flip-flop
Synchronous
All of the flip-flops change state at the same time
Because it is faster it is the kind used in CPUs
71
Ripple Counter
72
Design of a
Synchronous Counter
73