Lecture Slides Week1
Lecture Slides Week1
2
Course Learning Outcomes
1. CLO1: Define concepts in the design of micro processor as state machine and
designing its data path and its controller. [C1- Remembering]
2. CLO2: Describe how the basic units of the Intel 8088 architecture work
together to represent Integer Numbers, Floating Numbers and register
representation inside the microprocessor. [C2- Understanding]
3. CLO3: Implement assembly programs of intermediate complexity using the
intel 8088 architecture. The student should also be able to convert
intermediate complexity program in high level language into assembly code.
[C3- Applying]
3
Instructor
• Dr. Umair Rafique (S3)
• Education
• PhD, Artificial Intelligence (2013), Nanyang Technological University, Singapore.
• BS, Information Technology (2005), National University of Sciences and Technology,
NUST, Pakistan.
• Work Experience
• 2012 to 2014. Air University Islamabad, Pakistan
• 2014 to 2022. Northern Border University, Saudi Arabia
• 2022 to Date. Capital University of Science and Technology, Islamabad, Pakistan
• Office
• Block M, 1st Floor, CS Faculty Offices
• Other Instructors
• Ms. Tayyaba Zaheer
• Mr. Adnan Jelani
4
Schedule
• Monday 3:20 PM to 5:10 PM (2 Lectures). M3.
• Wednesday 4:20 PM to 5:10 PM (1 Lecture). M3.
• Office Hours
• Monday 11:00 AM to 12:50 PM
• Wednesday 11:00 AM to 12:50 PM
5
Text/Reference Books
1.Computer Organization and Architecture. 11th edition.
(William Stallings)
2.Assembly Language Programming Lecture Notes. Virtual
University of Pakistan. (Belal Hashmi, Junaid Haroon)
6
Required Software
• NASM (Assembler)
• DOSBox (DOS emulator)
7
Marks Distribution
• Assignments: 20% (4 Assignments)
• Quiz: 20% (4 Quizzes)
• Midterm Exam: 20%
• Final Exam: 40%
8
Some Basic Rules
• General Discipline
• DONOT use mobile phone during the lecture
• Be on time. Attendance will be taken at the beginning of the lecture
• Portal is your reference for this course
• All the information and course material will be available there.
• Send me email if you need to ask anything
• [email protected]
• Plagiarism in homework
• Submit your own work
• Plagiarized work would not be accepted at all.
• Zero tolerance policy
• Minimum 75% attendance required to appear in the final exam
9
Week 1: Introduction to computer
organization and architecture
Computer Organization and Architecture, Stallings
Chapter 1.1, 1.2, 1.3, 1.4, 1.5
Computer Architecture
• Computer architecture refers to those attributes of
a system visible to a programmer
• A term that is often used interchangeably with
computer architecture is instruction set
architecture.
• instruction formats, instruction opcodes, registers,
instruction and data memory; the effect of executed
instructions on the registers and memory; and an
algorithm for controlling instruction execution.
11
Computer Organization
• Computer organization refers to the operational
units and their interconnections that realize the
architectural specifications.
12
Example
• It is an architectural design issue whether a
computer will have a multiply instruction.
• It is an organizational issue whether that instruction
will be implemented by a special multiply unit or by a
mechanism that makes repeated use of the add unit
of the system.
• The organizational decision may be based on the
anticipated frequency of use of the multiply
instruction, the relative speed of the two
approaches, and the cost and physical size of a
special multiply unit.
13
Functions of a Computer
• In general terms, there are only four basic functions that a computer must
perform
• Data processing: Data may take a wide variety of forms, however there are
only a few fundamental methods or types of data processing.
• Data storage: A computer must temporarily store at least those pieces of data
that are being worked on at any given moment. short- term data storage
function.
• The computer also performs a long- term data storage function. Files of data
are stored on the computer for subsequent retrieval and update.
• Data movement: When data are received from or delivered to a device that is
directly connected to the computer, the process is known as input– output
(I/O), and the device is referred to as a peripheral.
• Control: Within the computer, a control unit manages the computer’s
resources and orchestrates the performance of its functional parts in response
to instructions.
14
Structure of a Computer
• There are four main structural components:
• Central processing unit (CPU): Controls the operation of the
computer and performs its data processing functions; often
simply referred to as processor.
• Main memory: Stores data.
• I/O: Moves data between the computer and its external
environment.
• System interconnection: Some mechanism that provides for
communication among CPU, main memory, and I/O. A
common example of system interconnection is by means of a
system bus, consisting of a number of conducting wires to
which all the other components attach.
15
Structural Components of a CPU
• Control unit: Controls the operation of the CPU and
hence the computer.
• Arithmetic and logic unit (ALU): Performs the
computer’s data processing functions.
• Registers: Provides storage internal to the CPU.
• CPU interconnection: Some mechanism that
provides for communication among the control
unit, ALU, and registers.
16
17
Little Man Computer
• The Little Man Computer (LMC) is an instructional model of a computer, created
by Dr. Stuart Madnick in 1965. It models the architecture of a simple computer and
has all the basic features.
• The original concept was that inside the CPU is a tiny man who runs around
executing instructions encoded in a list.
• Inside the CPU there are:
• 100 Memory locations (numbered 0 to 99).
• An Arithmetic Unit to do calculations.
• An Accumulator to store the result of the last operation or calculation.
• A Program Counter to store the address (in memory) of the next instruction to do.
• An Instruction Register to hold the top digit of the instruction read from memory.
• An Address Register to hold the bottom two digits of the instruction read from memory.
• An Input tray into which a number can be typed when needed.
• An Output area where any numbers output are printed.
• http://www.peterhigginson.co.uk/lmc/
• http://www.peterhigginson.co.uk/lmc/help.html
18
IAS Computer
• In 1946, von Neumann and his colleagues began
the design of a new stored-program computer,
referred to as the IAS computer, at the Princeton
Institute for Advanced Studies.
• The IAS computer, although not completed until
1952, is the prototype of all subsequent general-
purpose computers
• With rare exceptions, all of today’s computers have
this same general structure and function and are
thus referred to as von Neumann machines.
19
IAS Computer’s Structure
• A main memory, which stores both data and instructions
• Stored Program Concept
• The term “instruction” refers to a machine instruction that is
directly interpreted and executed by the processor
• This is in contrast to a statement in a high- level language, such
as C++, which must first be compiled into a series of machine
instructions before being executed.
• An arithmetic and logic unit (ALU) capable of operating on
binary data
• A control unit, which interprets the instructions in memory
and causes them to be executed
• Input– output (I/O) equipment operated by the control unit
20
21
22
IAS Memory
• 4,096 storage locations, called words, of 40 binary digits
(bits) each. Both data and instructions are stored there.
• Numbers are represented in binary form, and each
instruction is a binary code.
• Each number is represented by a sign bit and a 39-bit
value.
• A word may alternatively contain two 20-bit
instructions, with each instruction consisting of
• an 8-bit operation code (opcode) specifying the operation to
be performed and
• a 12-bit address designating one of the words in memory
23
24
25
26
Evolution of Intel
Microprocessors
27
28
29
Gates and Memory Cells
• A gate is a device that implements a simple Boolean or
logical function.
• The memory cell is a device that can store one bit of data.
• By interconnecting large numbers of these fundamental
devices, we can construct a computer.
• Data storage: Provided by memory cells.
• Data processing: Provided by gates.
• When the control signal is ON, the gate performs its function and
produces a data output.
• When the control signal is OFF, the output line is null.
30
Transistor
• The fundamental building block of digital circuits used
to construct processors, memories, and other digital
logic devices is the transistor.
• The active part of the transistor is made of silicon or
some other semiconductor material that can change
its electrical state when pulsed.
• In its normal state, the material may be
nonconductive or conductive, either impeding or
allowing current flow.
• When voltage is applied to the gate, the transistor
changes its state.
31
Microelectronic Chips
• Microelectronics means, literally, “small electronics.”
• There has been a consistent trend toward the reduction in size of
digital electronic circuits.
• The integrated circuit exploits the fact that transistors, resistors,
and conductors can be fabricated from a semiconductor such as
silicon.
• Fabricate an entire circuit in a tiny piece of silicon rather than
assemble discrete components made from separate pieces of
silicon into the same circuit.
• Many transistors can be produced at the same time on a single
wafer of silicon.
• Equally important, these transistors can be connected with a
process of metallization to form circuits.
32
33
34
Moore’s Law
• Initially, only a few gates or memory cells could be
reliably manufactured and packaged together.
• As time went on, it became possible to pack more
and more components on the same chip.
• Gordon Moore (cofounder of Intel) in 1965
observed that the number of transistors that could
be put on a single chip was doubling every year
• The pace slowed to a doubling every 18 months in
the 1970s, but has sustained that rate ever since.
35
36
Consequences of Moore’s Law
37