0% found this document useful (0 votes)
17 views

CO- Lecture 1

Uploaded by

mr.breefcos2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

CO- Lecture 1

Uploaded by

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

Computer

Organization
2016 - 2015
Instructors
• Course By:
• Lecturer: Shimaa Ibrahim Hassan
• TA: Eng: Moufeda Hussien
• Lecture: Wednesday @ 9:45
• Email Address: [email protected]
• Alt. Email: [email protected]
Course Objectives
Describe the general organization and architecture of computers.
 Identify computers’ major components and study their functions.
Introduce hardware design issues of modern computer
architectures.
Learn assembly language programming.
 Build the required skills to read and research the current
literature in computer architecture.
Text Books
• “Computer Organization and Design”, 4th Edition, Patterson
& Hennessy, © 2008

• “Computer Organization,” by Carl Hamacher, Zvonko


Vranesic and Safwat Zaky. Fifth Edition McGraw-Hill, 2002.

• “SPARC Architecture, Assembly Language Programming and


C,” Richard P. Paul, Prentice Hall, 2000.
Grading System
• Final exam .................................... 75 degrees
• Mid-term .................................... 20 degrees
• Sec. Work ................................... 20 degrees
• Quizies .......................................... 10 degrees
Important Prerequisite
Material
• Digital Logic Course is fundamental to the Computer
Organization Course.

• Review issues in:


- Basic computer organization: CPU, Memory, I/O,
Registers.
- Simple ALU, simple register design.
Under the Covers
• Five classic components of
a computer: input, output,
memory, datapath, and
control
• datapath + control =
processor (CPU) (it
manipulates instructions
and data)
?What is a Computer
• a computer is a sophisticated electronic calculating
machine that:
• Accepting information to be processed as input.
• Storing a list of instructions to process the information.
• Processing the information according to the list of
instructions.
• Providing the results of the processing as output.
Functional Units of a
Computer
Input unit accepts Arithmetic and logic unit(ALU):
information: •Performs the desired
•Human operators, operations on the input
•Electromechanical devices (keyboard) information as determined
•Other computers by instructions in the memory

Memory
Arithmetic
Input
Instr1 & Logic
Instr2
Instr3
Data1
Output Data2 Control

I/O Processor
Stores Control unit coordinates
Output unit sends information: various actions
results of processing: •Instructions, •Input,
•To a monitor display, •Data •Output
•To a printer •Processing

9
Input Unit
• Tasks are performed by the input unit:
- Interfaces with input devices.
- Accepts binary information from the input devices.
- Presents this binary information in a format expected by the
computer.
- Transfers this information to the memory or processor.
Memory Unit
• Memory unit stores instructions and data as a series of bits.

• Processor reads instructions and reads/writes data from/to the memory


during the execution of a program.
• In theory, instructions and data could be fetched one bit at a time.
• In practice, a group of bits is fetched at a time.
• Group of bits stored or retrieved at a time is termed as “word”
• Number of bits in a word is termed as the “word length” of a
computer.
Memory Unit (cont.)

• Processor reads/writes to and from memory based on the memory address:


• Access any word location in a short and fixed amount of time based on
the address.
• Random Access Memory (RAM) provides fixed access time independent
of the location of the word.
• Access time is known as “Memory Access Time”.
• Memory and processor have to “communicate” with each other in order to
read/write information.
• In order to reduce “communication time”, a small amount of RAM
(known as Cache) is tightly coupled with the processor.
Memory Unit: Primary Storage
• Primary storage of the computer consists of RAM units.
• Fastest, smallest unit is Cache.
• Slowest, largest unit is Main Memory.
• Primary storage is insufficient to store large amounts of data and
programs.
• Primary storage can be added, but it is expensive.
Memory Unit: Secondary Storage
• Store large amounts of data on secondary storage devices:
• Magnetic disks and tapes,
• Optical disks (CD-ROMS).
• Access to the data stored in secondary storage in slower, but take
advantage of the fact that some information may be accessed
infrequently.
• Cost of a memory unit depends on its access time, lesser access time
implies higher cost.
Instructions
• Instructions specify commands to:
• Transfer information within a computer (e.g., from memory to
ALU)
• Transfer of information between the computer and I/O
devices (e.g., from keyboard to computer, or computer to
printer)
• Perform arithmetic and logic operations (e.g., Add two
numbers, Perform a logical AND).
Instructions (cont.)

• A sequence of instructions to perform a task is called a


program, which is stored in the memory.
• Processor fetches instructions that make up a program
from the memory and performs the operations stated in
those instructions.
• Instruction Example:
add a,b,c
Data
• Data are the “operands” upon which instructions operate.
• Data could be:
• Numbers,
• Encoded characters.
• Data, in a broad sense means any digital information.
• Computers use data that is encoded as a string of binary
digits called bits.
Arithmetic and Logic Unit
(ALU)
• Operations are executed in the Arithmetic and Logic Unit (ALU).
• Arithmetic operations such as addition, subtraction.
• Logic operations such as comparison of numbers.
• In order to execute an instruction, operands need to be brought into the
ALU from the memory.
• Operands are stored in general purpose registers available in the ALU.
• Access times of general purpose registers are faster than the cache.
• Results of the operations are stored back in the memory or retained in
the processor for immediate use.
Registers
• Register is a very fast computer memory used to speed the
execution of computer programs
• Registers are the top of the memory hierarchy, and are the
fastest way for the system to manipulate data.
• They are normally measured by the number of bits they
can hold, for example, an “8-bit register” or a “32-bit
register”, actually according to the memory word size
Registers (cont.)

• There are several other classes of registers:


(a) General Purpose Registers: General purpose registers are used
to store data and intermediate results during program
execution. Its contents can be accessed through assembly
programming (R1, R2, R3,…….)
(b) Special Purpose Registers: Users do not access these registers.
These are used by computer system at the time of program
execution.
Special Purpose Registers
• Some types of special purpose registers are given below:
Memory Address Register (MAR): It stores address of data or
instructions to be fetched from memory
Instruction Register (IR): stores the instruction currently being
executed . When one instruction is completed, next instruction is
fetched in memory for processing.
Program Counter (PC): holds the address of the instruction that
should be executed next
Output Unit
• Computers represent information in a specific binary form.
Output units:
- Interfaces with output devices.
- Accepts processed results provided by the computer in
specific binary form.
- Converts the information in binary form to a form
understood by an
output device.
Control unit
• Operation of a computer can be summarized as:
• Accepts information from the input units (Input unit).
• Stores the information (Memory).
• Processes the information (ALU).
• Provides processed results through the output units (Output
unit).
Control unit (cont.)

• Operations of Input unit, Memory, ALU and Output unit are


coordinated by Control unit.
• Instructions control “what” operations take place (e.g. data
transfer, processing).
• Control unit generates timing signals which determines “when” a
particular operation takes place.
Input Output Memory Processor

Buses Bus

• For a computer to achieve its operation, the functional units


need to communicate with each other.
• Functional units may be connected by a group of parallel
wires.
• The group of parallel wires is called a bus.
• Each wire in a bus can transfer one bit of information.
• The number of parallel wires in a bus is equal to the word
length of a computer
Below the Program

Applications software
Systems software

Hardware
Below the Program (cont.)

• System software
• Operating system – supervising program that interfaces the
user’s program with the hardware (e.g., Linux, MacOS, Windows)
• Handles basic input and output operations
• Allocates storage and memory
• Provides for protected sharing among multiple applications
• Compiler – translate programs written in a high-level language
(e.g., C, Java) into instructions that the hardware can execute
From a High-Level Language to
the Hardware Language
• A high-level programming language is composed of words
and algebraic notation that can be translated by a compiler
into assembly language
• Assembly language symbolically represents machine
instructions
• An assembler translates a symbolic version of a machine
instruction into its binary version
From a High-Level Language to
the Hardware Language (cont.)
• Machine language is the binary representation of machine
instructions
• Instructions and data are just collection of binary digits
(bits)
• Instructions are individual commands that computers
understand and obey
• Hardware executes machine instructions (extremely simple
low-level instructions)
From a High-Level Language to
the Hardware Language (cont.)
• High-level language program (in C)
swap (int v[], int k)
( int temp;
temp = v[k]; C compiler
v[k] = v[k+1];
v[k+1] = temp;
)
• Assembly language program (for MIPS)
swap: sll $2, $5, 2
add $2, $4, $2
.
. assembler
jr $31
• Machine (object, binary) code (for MIPS)
000000 00000 00101 0001000010000000
000000 00100 00010 0001000000100000
. . .
Content Coverage

You might also like