What do the insides of a computer “look like” ?
As users, we do not have to know the answer to this question,
We can run standard software packages without understanding exactly how they work.
We can program a computer in a high-level language without understanding how the machine executes the individual instructions.
We can create Web pages without understanding how the Web browser gets its pages from a Web server or how the Web server creates those pages.
We can purchase a computer system from a salesperson without understanding the specifications of the system
Understanding the computer system’s operations has an
immediate benefit:
it will allow you to use the machine it will allow you to use the machine more effectivelymore effectively.
Chapter 1 :
Computer Architecture refers to those attributes of a system visible to a programmer, or put another way, those attributes that have a direct impact on the logical execution of a program
The later definition (architecture) concerns more about the performance
Architecture concerns more about the basic instruction design, that may lead to better performance of the system
Example of architectural attributes include, instruction set, the number of bit used to represent various data type (number or characters),I/O mechanism and techniques for addressing memory
Computer organization refers to the operational units and their interconnections that realize the architectural specifications
Organizational, is the implementation of computer system, in terms of its interconnection of functional units : CPU, memory, bus and I/O devices
Organizational attributes include those hardware details transparent to the programmer, such as control signal, interface between computer and periperals and the memory technology used.
Example : IBM/S-370 family architecture. There are plenty of IBM products having the same architecture (S-370) but different organization, depending on its price/performance measures. Cost and performance differs the organizations
So, organization of a computer is the implementation of its architecture, but tailored to fit the intended price and performance measures.
The Reason : (Stalling’s arguments) Able to select “proper” computer systems
for a particular environment (cost and effectiveness)
Able to analyzed a processor “embedded” to an environment.
Able to analyzed the use of processor in automobile, able to use proper tools to analyzed
Able to choose proper software for a particular computer system
First Generation (1939 -1954) - vacuum tube Second Generation Computers (1954 -1959) -
transistor Third Generation Computers (1959 -1971) - IC
Fourth Generation (1971-Present) - microprocessor Fifth Generation (Present and Beyond)
A digital computer can be separated into 4 major parts:1. Central Processing Unit (CPU)2. Memory Unit3. Input/Output Unit (I/O)4. BUS interconnection
A digital computer can be separated into 4 major parts:1. Central Processing Unit (CPU)2. Memory Unit3. Input/Output Unit (I/O)4. BUS interconnection
I/O Unit
CPU(Memory
Unit)
Input Device
Output Device
Address Bus
Data Bus
Control Bus
Motherboard
The MotherboardMicroprocessor
Keyboard / Mouse Ports
Printer Port
Video Port
PCI Slots
Memory Slots
AGP Slot
Chipset
Is the brains of computer The place where all processing have to
be done Responsible to control computer
operation and execute data processing. Four main parts of CPU
1. ALU (arithmetic logic unit)2. CU (Control logic unit)3. ID (Instruction Decoder)4. Registers
ACCUMULATOR
INSTRUCTION REGISTER
(IR)
PROGRAMCOUNTER
(PC)
STATUS REGISTER
(SR)
INSTRUCTION DECODER
(ID)
CONTROL UNIT
REGISTERS
1
3
2
4
ARITHMATIC & LOGIC UNIT
(ALU)
1. Arithmetic-Logic unit› Performs arithmetic or logical operations
2. Control unit› Coordinates and controls all parts of the
computer system
4. Instruction decoder
3. Instruction Decoder› Decode the instruction
4. Registers› A(Accumulator) : Store data from memory
before and after process by CPU› PC(Program Counter) : Controls the
sequence in which the instruction in a program are performed. Normally, it indicates the location in memory from which the next byte of information is to be taken
4. Registers› SR(Status Register): It also refer to as the
flag register. Four of the flags are called conditional flag, meaning that they indicate some conditions that resulted after an instruction was executed (CY,AC,P and OV)
› IR(Instruction Register) : A temporary storage location . It holds an instruction while the instruction is being decoded.
› Manages four basic operations (Fetch, Decode, Execute, Store) Fetch : Gets next program instruction from
the computer’s memory Decode : Figure out what the program is
telling the computer to do Execute : Perform the requested action Store : Write (store) the results to a register
or to memory
Intel
Advanced Micro Devices (AMD)
Cyrix Motorola (Apple)
Pentium IV
Pentium MMX
Core 2 DuoPentium III
Also known as main storage, primer memory
As contemporary storage for processing and can directly accessed by CPU in high speed of light.
Use for holding both instruction and data
Also known as main storage, primer memory
As contemporary storage for processing and can directly accessed by CPU in high speed of light.
Use for holding both instruction and data
Volatile memory (Random Access Memory/RAM; Cache Memory; Virtual Memory)› Contents of memory are erased when
power supply is turned off. › Also called Temporary storage.
Nonvolatile memory (Read Only Memory/ROM; Flash Memory)› Contents of memory are not erased when
power is turned off. › Also called Permanent storage.
RAM is used in computer for the temporary storagetemporary storage of programs and data. The contents of many RAM address location will be read and written to as the computer executes a program.
This requires fast read and write cycle times for the RAM so as not to slow down the computer operation.
A major disadvantage of RAM is that it is volatile volatile and will lose all stored information if power is turned off.
WEB
KEYBOARD
CPU
RAM
MONITOR
CLICK TO BEGIN ANIMATION
HOW RAM WORKS
Rambus DRAM (RDRAM) Uses fast bus to send and receive data
within one clock cycle. Faster than SDRAM
Double Data Rate SDRAM (DDR SDRAM) A type of SDRAM that can send and
receive data within one clock cycle Dynamic RAM- A memory chip that
needs to be refreshed periodically or it loses its data
Synchronous DRAM (SDRAM)- Synchronized with the computer’s system clock
The purpose of cache memory is to speed up accesses by storing recently used data closer to the CPU, instead of storing it in main memory.
Although cache is much smaller than main memory, its access time is a fraction of that of main memory.
The purpose of cache memory is to speed up accesses by storing recently used data closer to the CPU, instead of storing it in main memory.
Although cache is much smaller than main memory, its access time is a fraction of that of main memory.
Primary cache (Level 1 or L1)› Located within the CPU chip, it is the memory
the microprocessor uses to store frequently used instructions and data
Secondary cache (Level 2 or L2; Backside Cache)› Located near the CPU, it is the memory
between the CPU and RAM Faster than RAM
Primary cache (Level 1 or L1)› Located within the CPU chip, it is the memory
the microprocessor uses to store frequently used instructions and data
Secondary cache (Level 2 or L2; Backside Cache)› Located near the CPU, it is the memory
between the CPU and RAM Faster than RAM
Part of the hard disk is reserved as RAM
When RAM modules become full the CPU accesses the hard disk to store and retrieve data
Slower than RAMFULL
Computers accept coded information by means of inputs units, which consist of devices capable of reading such data.› For example: keyboard, mouse
Output units is the counterpart of the input and its functions is to return the results to the output world› For example: monitor, printer
Pathways that enable the CPU to communicate with input/output devices
Typically the buses contain slots called expansion slots, in which expansion cards are inserted
Expansion slots
Expansion card
Industry Standard Architecture (ISA)-› Slowest type of bus
Personal Computer Interface (PCI)› Faster than ISA; supports plug and
play Accelerated Graphics Port (AGP)
› Designed for video adapters Universal Serial Bus (USB)
› Allows up to 127 devices to be connected to the computer at one time; supports plug and play
An important aspect of the computer architecture is the design of the instruction set of processor
The instruction set chosen for a particular computer determines the way that the machine language program are constructed
Early computers had small and simple instruction sets, forced mainly by the need to minimize the hardware used to implement them constructed.
A computer with a large number of instructions is classified as a Complex Instruction Set Computer (CISC).
A number of computer designers recommended that computers use fewer instructions with simple constructs so they can be executed much faster and this type of computer is classified as a Reduced Instruction Set Computer (RISC).
RISC CISC
Relatively few instructions to
perform task.
Large number of instructions to
perform any task.
Relatively few addressing modes. A larger variety of addressing
modes – typically from 5 to 20
different modes.
Memory access limited to LOAD
and STORE instructions only.
Some instructions that perform
specialized tasks are used
infrequently.
All operations are done within the
registers of the CPU.
Instructions that manipulate
operands in memory.
Fixed-length, easily decoded
instruction format.
Variable-length instruction format.
Hardwired control. Microprogrammed control
An assembly language is low-level programming language for computers, microprocessors, microcontroller and other programmable devices.
It implements a symbolic representation of the machine codes and other constant needed to a program a given CPU architecture
The format of assembly language consists of four field (column) as below:
LABEL› Label is used to represent the
location of an instruction or a value. › It has to begin no spacing. It can
form by using not more than 8 characters including numbers. But the first character must be an alphabet.
› Between the label instruction, there must be at least one. It always used for jump and loop instruction
OPCODE / MNEMONIC code› Stand for the word operational code
and known as MNEMONIC code. › Mnemonic code are commands that
tell the controller what to do. › Example of instructions are MOV,
CPL, RET and etc.
MOV A, #00000000B Told the 8051 to load data
00000000B in to Accumulator register
OPERAND› Data, address or register that the
opcode will operate on› This field is devided in two group
which is the source and the destination.
› For example,in the MCS51 format, the source is the operand in the right place and the destination is the operand in the left.
MOV A, #00000000B
Address part A memory address is an
identifier for a memory location. An absolute address,
(sometimes called an explicit address or
specific address), is a memory address
that uniquely identifies a location in memory Example: In 8051 microcontroller :
The Accumulator address is E0H
(or 1110 0000B in binary)
Contents of Accumulator› Accumulator is the most useful
register in the microprocessor. During arithmetic and logic operation it performs a dual function.
› Before the operation, it holds one of the operands. After the operations, it holds the result (sum, difference or logical answer)
Contents of Accumulator› Example : MOV A,#25H ADD A,#13H
Load Accumulator with data #25HAdd the data in the Accumulator
(#25H) with #13HSave the answer in the Accumulator
A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses.
Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor . The file that is created contains what are called the source statements .
The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be more portable across platforms.
Such languages hide the details of CPU operations such as memory access models and management of scope
Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic.
Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.
Java, Python, C++, Visual Basic .NET and Ruby are the most popular OOP languages today
Contrast the meaning of computer architecture and organization
The reason for studying computer architecture and computer organization
Describe the typical CPU, Memory, Inpu/Output
Mention CISC and SISC Differentiate operand, opcode Define compiler,high level and OOP
language