SlideShare ist ein Scribd-Unternehmen logo
1 von 8
COMPUTER ARCHITECTURE : 3068
MODULE I
1 Basic Structure of Computers, Machine Instructions and Programs
1.1 Discuss the different Computer Types
Computer is a fast electronic calculating machine which accepts digital input, processes it
according to the internally stored instructions (Programs) and produces the result on the output
device.
The computers can be classified into various categoriesas given below:
• Micro Computer
• Laptop Computer
• Work Station
• Super Computer
• Main Frame
• Hand Held
• Multi core
Micro Computer: A personal computer; designed to meet the computer needs of an individual.
It provides access to a wide variety of computing applications, such as word processing, photo
editing, e-mail, and internet.
Laptop Computer: A portable, compact computer that can run on power supply or a battery
unit. All components are integrated as one compact unit. It is generally more expensive than a
comparable desktop. It is also called a Notebook.
Work Station: Powerful desktop computer designed for specialized tasks. Generally used for
tasks that requires a lot of processing speed. Can also be an ordinary personal computer attached
to a LAN (local area network).
Super Computer: A computer that is considered to be fastest in the world. It is used to execute
tasks that would take lot of time for other computers. For Ex: Modeling weather systems, genome
sequence, etc
Main Frame: Large expensive computer capable of simultaneously processing data for hundreds
or thousands of users. Used to store, manage, and process large amounts of data that need to be
reliable, secure, and centralized.
Hand Held: It is also called a PDA (Personal Digital Assistant). A computer that fits into a pocket,
runs on batteries, and is used while holding the unit in your hand. Typically used as an
appointment book, address book, calculator and notepad.
Multi Core: Have Multiple Cores – parallel computing platforms. It has many Cores or computing
elements in a single chip. Typical Examples: Sony Play station, Core 2 Duo, i3, i7 etc.
1.2 Explain the Functional Units of Computer
A computer in its simplest form comprises five functional units namely input unit, output unit
memory unit, arithmetic & logic unit and control unit. Figure 2 depicts the functional units of a
computer system
1. Input Unit: Computer accepts encoded information through input unit. The standard input
device is a keyboard. Whenever a key is pressed, keyboard controller sends the code to
CPU/Memory. Examples include Mouse, Joystick, Tracker ball, Light pen, Digitizer, Scanner
etc.
2. Memory Unit: Memory unit stores the program instructions (Code), data and results of
computations etc. Memory unit is classified as:
• Primary /Main Memory
• Secondary /Auxiliary Memory
Primary memory is a semiconductor memory that provides access at high speed. Run time
program instructions and operands are stored in the main memory. Main memory is classified
again as ROM and RAM. ROM holds system programs and firmware routines such as BIOS, POST,
I/O Drivers that are essential to manage the hardware of a computer. RAM is termed as
Read/Write memory or user memory that holds run time program instruction and data. While
primary storage is essential, it is volatile in nature and expensive. Additional requirement of
memory could be supplied as auxiliary memory at cheaper cost.
3. Arithmetic and logic unit: ALU consist of necessary logic circuits like adder, comparator
etc., to perform operations of addition, multiplication, comparison of two numbers etc.
4. Output Unit: Computer after computation returns the computed results, error messages, etc.
via output unit. The standard output device is a video monitor, LCD/TFT monitor. Other output
devices are printers, plotters etc.
5. Control Unit: Control unit co-ordinates activities of all units by issuing control signals. Control
signals issued by control unit govern the data transfers and then appropriate operations take
place. Control unit interprets or decides the operation/action to be performed.
The operations of a computer can be summarized as follows:
1. A set of instructions called a program reside in the main memory of computer.
2. The CPU fetches those instructions sequentially one-by-one from the main memory, decodes
them and performs the specified operation on associated data operands in ALU. 3. Processed data
and results will be displayed on an output unit.
4. All activities pertaining to processing and data movement inside the computer machine are
governed by control unit.
1.3 Explain the Basic Operational Concepts of Computers
An Instruction consists of two parts, an Operation code and operand/s as shown below:
Let us see a typical instruction ADD LOCA, R0
This instruction is an addition operation. The following are the steps to execute the instruction:
Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into the processor
Step 3: Add the memory operand (i.e. fetched contents of LOCA) to the contents of register R0
Step 4: Store the result (sum) in R0.
The same instruction can be realized using two instructions as
Load LOCA, R1
Add R1, R0
The steps to execute the instructions can be enumerated as below:
Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into the processor Register R1
Step 3: Add the content of Register R1 and the contents of register R0
Step 4: Store the result (sum) in R0
Figure below shows how the memory and the processor are connected. As shown in the diagram,
in addition to the ALU and the control circuitry, the processor contains a number of registers used
for several different purposes. The instruction register holds the instruction that is currently being
executed. The program counter keeps track of the execution of the program. It contains the
memory address of the next instruction to be fetched and executed. There are n general purpose
registers R0 to Rn-1 which can be used by the programmers during writing programs.
1.4 Introduce the Bus Structures
Group of lines that serve as connecting path for several devices is called a bus (one bit per line).
Individual parts must communicate over a communication line or path for exchanging data,
address and control information as shown in the diagram below. Printer example – processor to
printer. A common approach is to use the concept of buffer registers to hold the content during
the transfer.
1.5 Evaluate the Performance of Computers
1.5.1 Processor Clock
1.5.2 Basic Performance Equation
The total time required to execute a program is the most important measure of performance for a
computer. (t0-t5 of earlier example). Compiler, instruction set and hardware architecture,
program all have impact on performance.
Basic Performance Equation: The basic performance equation is given by T = (N * S) / R
where T=execution time, N=number of instructions, S=average cycles per nstruction, R=clock
rate in cycles per second
PERFORMANCE MEASUREMENT
Benchmark refers to standard task used to measure how well a processor operates. To evaluate
the performance of Computers, a non-profit organization known as SPEC-System Performance
Evaluation Corporation employs agreed-upon application programs of real world for benchmarks.
Accordingly, it gives performance measure for a computer as the time required to execute a given
benchmark program. The SPEC rating is computed as follows
1.5.3 Pipelining and Superscalar Operation
Pipelining: Like a production line, instruction execution overlapped so greater parallelism is
achieved. Superscalar operation: Execute several instructions simultaneously using multiple
ALU’s.
1.5.4 Clock Rate
Processor circuits are controlled by a timing signal called a clock. The clock defines regular time
intervals called clock cycles. The machine instructions are divided into a sequence of basic steps
and each step is completed in one clock cycle. Clock rate R=1/P, where P is the length of one
clock cycle. R is measured in cycles per second (herts-Hz).
1.5.5 Instruction set: CISC and RISC
Reduced instruction set computer
– Large N, small S
Complex instruction set computer
– Small N, large S
• Multiple length instructions are difficult to implement with high clock rate
• Complex instruction set computers (CISC) have complex instruction encodings like this (e.g.IA-
32)
• Reduced instruction set computers (RISC) only allow simple 32-bit formats, few addressing
modes and all data to be manipulated must be in registers
e.g. Add (R3),R2 is not allowed, instead use Move (R3),R1 followed by Add R1,R2 (e.g. ARM)
RISC machines often are 3-address machines as the addressing mode field is either not necessary
or simplified e.g. Add R1, R2, R3
CISC machines usually require less instructions but have a lower clock rate, RISC require more
instructions but have a higher clock rate
1 Examples of CISC processors are the System/360(excluding the 'scientific' Model 44),
2 VAX,
3 PDP‐11,
4 Motorola 68000 family
5 Intel x86 architecture based processors.
6
7
8 RISC Examples
9 •Apple iPods (custom ARM7TDMI SoC)
10 •Apple iPhone (Samsung ARM1176JZF)
11 •Palm and PocketPC PDAs and smartphones (Intel XScale family)
12 •Nintendo Game Boy Advance (ARM7)
13 •Nintendo DS (ARM7, ARM9)
14 •Sony Network Walkman (Sony in‐house ARM based chip)
15 •Some Nokia and Sony Ericsson mobile phones
16
The CISC approach attempts to minimize the number of instructions per program, sacrificing the
number of cycles per instruction. RISC does the opposite, reducing the cycles per instruction at
the cost of the number of instructions per program.
17
18 Characteristics of RISC Vs CISC processors
No RISC CISC
1 Simple instructions taking one cycle Complex instructions taking multiple
cycles
2 Instructions are executed by hardwired
control unit
Instructions are executed by
microprogramed control unit
3 Few instructions Many instructions
4 Fixed format instructions Variable format instructions
5 Few addressing mode, and most instructions
have register to register addressing mode
Many addressing modes
6 Multiple register set Single register set
7 Highly pipelined Not pipelined or less pipelined
1.5.6 Compiler - Translates high level language such as C, C++ and Java to machine
instructions. Aim is to reduce N×S. To reduce N, we need a suitable instruction set and and a
good compiler. NxS is the total clock cycle needed to execute a program.
1.6 Introduce to Multiprocessors and Multicomputers
Large computer systems contain a number of processor units and called multiprocessor
systems. They execute different applications in parallel or subtasks in parallel. All
processors can access all of the memory in the system (shared memory multiprocessor
systems).
The interconnected group of computers can be used to achieve high total computational
power. The computers have access to only their own memory. When executing the data
transferred as messages between the computers.(message passing multicomputers).
1.7 Understand the Memory Operations
• The program & data are in memory
• Instructions and operands are to be transferred from memory
• Result has to be stored into memory
• The basic operations are LOAD and STORE
• LOAD copies contents of memory to processor. Processor send the address and gives
request for reading
• STORE transfers data from processor to specific memory location. Processor send the
address and gives request for writing
1.8 Understand Instructions and Instruction Sequencing
A computer must have instruction capable of performing the following operations. They are:
• Data transfer between memory and processor register.
• Arithmetic and logical operations on data.
• Program sequencing and control.
• I/O transfer.
1.8.1 Introduce to Instruction Execution and Straight Line Sequencing
Instruction Execution: There are 2 phases for executing an instruction. They are,
• Instruction Fetch
• Instruction Execution
Instruction Fetch:The instruction is fetched from the memory location whose address is in PC.
This is then placed in IR.
Instruction Execution: Instruction in IR is examined and decoded to determine which operation
is to be performed.
Program execution Steps:
To begin executing a program, the address of first instruction must be placed in PC. The
processor control circuits use the information in the PC to fetch & execute instructions one at a
time in the order of increasing order. This is called Straight line sequencing. During the execution
of each instruction, the PC is incremented by 4 to point to the address of next instruction.
Straight line sequencing: If fetching and executing of instructions is carried out one by one from
successive addresses of memory, it is called straight line sequencing.
1.8.2 Introduce to Branching
The Address of the memory locations containing the n numbers are symbolically given as NUM1,
NUM2…..NUMn. Separate Add instruction is used to add each number to the contents of register
R0. After all the numbers have been added, the result is placed in memory location SUM.
Branch instructions are those which change the normal sequence of execution. Sequence can be
changed either conditionally or unconditionally. Accordingly we have conditional branch
instructions and unconditional branch instruction. Conditional branch instruction changes the
sequence only when certain conditions are met. Unconditional branch instruction changes the
sequence of execution irrespective of condition of the results.
1.8.3 Introduce to Condition Codes
Conditional Codes: In order to do conditional branches and other instructions, operations
implicitly set flags. Four commonly used (1-bit) flags
• N (negative) 1 if result –ve else 0
• Z (zero) 1 if result 0 else 0
• V (overflow) 1 if arithmetic overflow occurs else 0
• C (carry) 1 if carry out occurs –ve else 0
1.9 Familiarize Assembly Languages
Machine instructions are represented by patterns of 0s and 1s. To make it easy for handling, we
use symbol names to represent these patterns. Eg MOV, ADD, INC etc. Such words are called
mnemonics. A complete set of such symbolic names & rules make the programming language
called assembly language. The list rules is called syntax of the language.
The programs written in assembly language are translated into machine instructions by a
program called assembler. The source program in assembly language is called source program
and the assembled machine language program is called object program.
- We use capital letters to denote names and labels.
- The neumonic code in the instruction is called op-code.
- The values given with the op-code is called operands
The different ways in which the location of an operand is specified in an instruction is called as
Addressing mode.
Generic Addressing Modes:
• Immediate mode
• Register mode
• Absolute mode
• Indirect mode
• Index mode
• Base with index
• Base with index and offset
• Relative mode
• Auto-increment mode
• Auto-decrement mode
We generally use symbolic names to write a program. A complete set of such symbolic names
and rules for their use constitute a programming language, is referred to as assembly language.
LOAD - To load operand from memory
STORE - To store operand to memory
MOVE - To transfer data from one location to another location/Register
1.9.1 Introduce to Assembler Directives
Assembler Directives: Directives are the assembler commands to the assembler concerning the
program being assembled. These commands are neither translated into machine opcode nor
assigned any memory location in the object program.
S EQU 150
EQU directs the assembler that the symbolic name S must be replaced with memory location
address 150,
ORIGIN 201
Instruct assembler to initiate data block at main memory locations starting from 201
N DATAWORD 40 Inform the assembler that value of N i.e. data value 40 is to be placed in the
memory location 201.
ORIGIN 100
States that assembler directive must load machine instructions of the object program in the main
memory starting from location 100.
END START
End of the program and the label of where program starts
N1 RESERVE 400
Reserve memory block of 400 bytes
1.9.2 Understand Assembly and Execution of Programs
1.9.3 Introduce to Number Notation
1.10 Study the Basic Input/Output Operations
I/O is the means by which data are transferred between the processor and the outside world.
Devices operate at different speeds to the processor so handshaking is required.
Keyboard/display Example: The keyboard and display are coordinated via software
• Register (on device) assigned to the keyboard hardware
– DATAIN contains ASCII of last typed character
– SIN is the status control flag, normally 0. When a character typed, becomes 1. After the
processor reads DATAIN, it is automatically set back to 0
• Register (on device) assigned to the display hardware
– DATAOUT receives a character code
– SOUT is the status control flag. It is 1 when ready to receive a character, set to 0 when
the character is being transferred
• These registers form the respective device interface

Weitere ähnliche Inhalte

Was ist angesagt?

Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unitrishi ram khanal
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9myrajendra
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computersBảo Hoang
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGgarishma bhatia
 
Data communication lab manual
Data communication lab manualData communication lab manual
Data communication lab manualNafe Singh Yadav
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture NotesFellowBuddy.com
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organizationTushar B Kute
 
Advanced computer architecture
Advanced computer architectureAdvanced computer architecture
Advanced computer architectureAjithaSomasundaram
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
computer organization and assembly language Lec 01 coal_introduction
computer organization and assembly language  Lec 01 coal_introductioncomputer organization and assembly language  Lec 01 coal_introduction
computer organization and assembly language Lec 01 coal_introductionZia3130
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computingVajira Thambawita
 
Von Neumann Architecture
Von Neumann Architecture   Von Neumann Architecture
Von Neumann Architecture Lor Ham
 

Was ist angesagt? (20)

Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
 
operating system lecture notes
operating system lecture notesoperating system lecture notes
operating system lecture notes
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
mano.ppt
mano.pptmano.ppt
mano.ppt
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
 
Data communication lab manual
Data communication lab manualData communication lab manual
Data communication lab manual
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organization
 
Advanced computer architecture
Advanced computer architectureAdvanced computer architecture
Advanced computer architecture
 
TCP IP Model | Computer Science
TCP IP Model | Computer ScienceTCP IP Model | Computer Science
TCP IP Model | Computer Science
 
register
registerregister
register
 
Computer system bus
Computer system busComputer system bus
Computer system bus
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Subnetting
SubnettingSubnetting
Subnetting
 
computer organization and assembly language Lec 01 coal_introduction
computer organization and assembly language  Lec 01 coal_introductioncomputer organization and assembly language  Lec 01 coal_introduction
computer organization and assembly language Lec 01 coal_introduction
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Von Neumann Architecture
Von Neumann Architecture   Von Neumann Architecture
Von Neumann Architecture
 

Andere mochten auch

Lesson 4 data processing
Lesson 4   data processingLesson 4   data processing
Lesson 4 data processingguevarra_2000
 
Sequential logics
Sequential logicsSequential logics
Sequential logicsfaiqikhan
 
Chapter4 Data Processing
Chapter4 Data ProcessingChapter4 Data Processing
Chapter4 Data ProcessingMuhammad Waqas
 
Computer Data Processing And Representation 4
Computer Data Processing And Representation   4Computer Data Processing And Representation   4
Computer Data Processing And Representation 4Amit Chandra
 
Computer Data Processing And Representation 4
Computer Data Processing And Representation   4Computer Data Processing And Representation   4
Computer Data Processing And Representation 4guestb912a3d
 
Truth tables presentation
Truth tables presentationTruth tables presentation
Truth tables presentationMujtaBa Khan
 
OCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth TablesOCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth Tablesnorthernkiwi
 
Truth tables
Truth tablesTruth tables
Truth tableswalkerlj
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setaviban
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-busAnuj Modi
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kVijay Kumar
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMAAJAL A J
 
Computer architecture
Computer architectureComputer architecture
Computer architectureSanjeev Patel
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessorGeorge Thomas
 
BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE Himanshu Sharma
 

Andere mochten auch (20)

Lesson 4 data processing
Lesson 4   data processingLesson 4   data processing
Lesson 4 data processing
 
Sequential logics
Sequential logicsSequential logics
Sequential logics
 
Chapter4 Data Processing
Chapter4 Data ProcessingChapter4 Data Processing
Chapter4 Data Processing
 
Number Systems
Number  SystemsNumber  Systems
Number Systems
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
Computer Data Processing And Representation 4
Computer Data Processing And Representation   4Computer Data Processing And Representation   4
Computer Data Processing And Representation 4
 
Computer Data Processing And Representation 4
Computer Data Processing And Representation   4Computer Data Processing And Representation   4
Computer Data Processing And Representation 4
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
DATA PROCESSING
DATA PROCESSINGDATA PROCESSING
DATA PROCESSING
 
Truth tables presentation
Truth tables presentationTruth tables presentation
Truth tables presentation
 
OCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth TablesOCR GCSE Computing - Binary logic and Truth Tables
OCR GCSE Computing - Binary logic and Truth Tables
 
Truth tables
Truth tablesTruth tables
Truth tables
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction set
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-bus
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMA
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE BASIC COMPUTER ARCHITECTURE
BASIC COMPUTER ARCHITECTURE
 

Ähnlich wie module 1 computer architecture diploma

COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESDr.MAYA NAYAK
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptRuhul Amin
 
Ise iv-computer organization [10 cs46]-notes new
Ise iv-computer  organization [10 cs46]-notes newIse iv-computer  organization [10 cs46]-notes new
Ise iv-computer organization [10 cs46]-notes newdilshad begum
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.pptSoulReaper21
 
Introduction to Computer System
Introduction to Computer System Introduction to Computer System
Introduction to Computer System sonykhan3
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basicsLucky Sithole
 
comp. org Chapter 1
comp. org Chapter 1comp. org Chapter 1
comp. org Chapter 1Rajat Sharma
 
CS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdfCS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdfAsst.prof M.Gokilavani
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Hardware and software of computer
Hardware and software of computerHardware and software of computer
Hardware and software of computerSurath Khadka
 
Lesson 1 anatomy of a digital computer (230 kb)
Lesson 1  anatomy of a digital computer (230 kb)Lesson 1  anatomy of a digital computer (230 kb)
Lesson 1 anatomy of a digital computer (230 kb)IMRAN KHAN
 
chapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxchapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxjanani603976
 
Computer Fundamental.pdf
Computer Fundamental.pdfComputer Fundamental.pdf
Computer Fundamental.pdfDagneDegefu
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaaarshadahmedkkp
 
Chapter1 introduction to computer systems
Chapter1 introduction to computer systemsChapter1 introduction to computer systems
Chapter1 introduction to computer systemsMuhammad Waqas
 

Ähnlich wie module 1 computer architecture diploma (20)

unit-i.pdf
unit-i.pdfunit-i.pdf
unit-i.pdf
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTES
 
COA-Unit-1-Basics.ppt
COA-Unit-1-Basics.pptCOA-Unit-1-Basics.ppt
COA-Unit-1-Basics.ppt
 
Ise iv-computer organization [10 cs46]-notes new
Ise iv-computer  organization [10 cs46]-notes newIse iv-computer  organization [10 cs46]-notes new
Ise iv-computer organization [10 cs46]-notes new
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
 
Introduction to Computer System
Introduction to Computer System Introduction to Computer System
Introduction to Computer System
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basics
 
comp. org Chapter 1
comp. org Chapter 1comp. org Chapter 1
comp. org Chapter 1
 
DLD1.pdf
DLD1.pdfDLD1.pdf
DLD1.pdf
 
CS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdfCS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdf
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
lecture 1(1).ppt
lecture 1(1).pptlecture 1(1).ppt
lecture 1(1).ppt
 
Hardware and software of computer
Hardware and software of computerHardware and software of computer
Hardware and software of computer
 
Lesson 1 anatomy of a digital computer (230 kb)
Lesson 1  anatomy of a digital computer (230 kb)Lesson 1  anatomy of a digital computer (230 kb)
Lesson 1 anatomy of a digital computer (230 kb)
 
chapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptxchapter 1 -Basic Structure of Computers.pptx
chapter 1 -Basic Structure of Computers.pptx
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
BASIC STRUCTURE OF COMPUTERS.pptx
BASIC STRUCTURE OF COMPUTERS.pptxBASIC STRUCTURE OF COMPUTERS.pptx
BASIC STRUCTURE OF COMPUTERS.pptx
 
Computer Fundamental.pdf
Computer Fundamental.pdfComputer Fundamental.pdf
Computer Fundamental.pdf
 
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaabms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
 
Chapter1 introduction to computer systems
Chapter1 introduction to computer systemsChapter1 introduction to computer systems
Chapter1 introduction to computer systems
 

Kürzlich hochgeladen

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Kürzlich hochgeladen (20)

(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

module 1 computer architecture diploma

  • 1. COMPUTER ARCHITECTURE : 3068 MODULE I 1 Basic Structure of Computers, Machine Instructions and Programs 1.1 Discuss the different Computer Types Computer is a fast electronic calculating machine which accepts digital input, processes it according to the internally stored instructions (Programs) and produces the result on the output device. The computers can be classified into various categoriesas given below: • Micro Computer • Laptop Computer • Work Station • Super Computer • Main Frame • Hand Held • Multi core Micro Computer: A personal computer; designed to meet the computer needs of an individual. It provides access to a wide variety of computing applications, such as word processing, photo editing, e-mail, and internet. Laptop Computer: A portable, compact computer that can run on power supply or a battery unit. All components are integrated as one compact unit. It is generally more expensive than a comparable desktop. It is also called a Notebook. Work Station: Powerful desktop computer designed for specialized tasks. Generally used for tasks that requires a lot of processing speed. Can also be an ordinary personal computer attached to a LAN (local area network). Super Computer: A computer that is considered to be fastest in the world. It is used to execute tasks that would take lot of time for other computers. For Ex: Modeling weather systems, genome sequence, etc Main Frame: Large expensive computer capable of simultaneously processing data for hundreds or thousands of users. Used to store, manage, and process large amounts of data that need to be reliable, secure, and centralized. Hand Held: It is also called a PDA (Personal Digital Assistant). A computer that fits into a pocket, runs on batteries, and is used while holding the unit in your hand. Typically used as an appointment book, address book, calculator and notepad. Multi Core: Have Multiple Cores – parallel computing platforms. It has many Cores or computing elements in a single chip. Typical Examples: Sony Play station, Core 2 Duo, i3, i7 etc. 1.2 Explain the Functional Units of Computer A computer in its simplest form comprises five functional units namely input unit, output unit memory unit, arithmetic & logic unit and control unit. Figure 2 depicts the functional units of a computer system
  • 2. 1. Input Unit: Computer accepts encoded information through input unit. The standard input device is a keyboard. Whenever a key is pressed, keyboard controller sends the code to CPU/Memory. Examples include Mouse, Joystick, Tracker ball, Light pen, Digitizer, Scanner etc. 2. Memory Unit: Memory unit stores the program instructions (Code), data and results of computations etc. Memory unit is classified as: • Primary /Main Memory • Secondary /Auxiliary Memory Primary memory is a semiconductor memory that provides access at high speed. Run time program instructions and operands are stored in the main memory. Main memory is classified again as ROM and RAM. ROM holds system programs and firmware routines such as BIOS, POST, I/O Drivers that are essential to manage the hardware of a computer. RAM is termed as Read/Write memory or user memory that holds run time program instruction and data. While primary storage is essential, it is volatile in nature and expensive. Additional requirement of memory could be supplied as auxiliary memory at cheaper cost. 3. Arithmetic and logic unit: ALU consist of necessary logic circuits like adder, comparator etc., to perform operations of addition, multiplication, comparison of two numbers etc. 4. Output Unit: Computer after computation returns the computed results, error messages, etc. via output unit. The standard output device is a video monitor, LCD/TFT monitor. Other output devices are printers, plotters etc. 5. Control Unit: Control unit co-ordinates activities of all units by issuing control signals. Control signals issued by control unit govern the data transfers and then appropriate operations take place. Control unit interprets or decides the operation/action to be performed. The operations of a computer can be summarized as follows: 1. A set of instructions called a program reside in the main memory of computer. 2. The CPU fetches those instructions sequentially one-by-one from the main memory, decodes them and performs the specified operation on associated data operands in ALU. 3. Processed data and results will be displayed on an output unit. 4. All activities pertaining to processing and data movement inside the computer machine are governed by control unit. 1.3 Explain the Basic Operational Concepts of Computers An Instruction consists of two parts, an Operation code and operand/s as shown below: Let us see a typical instruction ADD LOCA, R0 This instruction is an addition operation. The following are the steps to execute the instruction: Step 1: Fetch the instruction from main memory into the processor
  • 3. Step 2: Fetch the operand at location LOCA from main memory into the processor Step 3: Add the memory operand (i.e. fetched contents of LOCA) to the contents of register R0 Step 4: Store the result (sum) in R0. The same instruction can be realized using two instructions as Load LOCA, R1 Add R1, R0 The steps to execute the instructions can be enumerated as below: Step 1: Fetch the instruction from main memory into the processor Step 2: Fetch the operand at location LOCA from main memory into the processor Register R1 Step 3: Add the content of Register R1 and the contents of register R0 Step 4: Store the result (sum) in R0 Figure below shows how the memory and the processor are connected. As shown in the diagram, in addition to the ALU and the control circuitry, the processor contains a number of registers used for several different purposes. The instruction register holds the instruction that is currently being executed. The program counter keeps track of the execution of the program. It contains the memory address of the next instruction to be fetched and executed. There are n general purpose registers R0 to Rn-1 which can be used by the programmers during writing programs. 1.4 Introduce the Bus Structures Group of lines that serve as connecting path for several devices is called a bus (one bit per line). Individual parts must communicate over a communication line or path for exchanging data, address and control information as shown in the diagram below. Printer example – processor to printer. A common approach is to use the concept of buffer registers to hold the content during the transfer. 1.5 Evaluate the Performance of Computers 1.5.1 Processor Clock 1.5.2 Basic Performance Equation
  • 4. The total time required to execute a program is the most important measure of performance for a computer. (t0-t5 of earlier example). Compiler, instruction set and hardware architecture, program all have impact on performance. Basic Performance Equation: The basic performance equation is given by T = (N * S) / R where T=execution time, N=number of instructions, S=average cycles per nstruction, R=clock rate in cycles per second PERFORMANCE MEASUREMENT Benchmark refers to standard task used to measure how well a processor operates. To evaluate the performance of Computers, a non-profit organization known as SPEC-System Performance Evaluation Corporation employs agreed-upon application programs of real world for benchmarks. Accordingly, it gives performance measure for a computer as the time required to execute a given benchmark program. The SPEC rating is computed as follows 1.5.3 Pipelining and Superscalar Operation Pipelining: Like a production line, instruction execution overlapped so greater parallelism is achieved. Superscalar operation: Execute several instructions simultaneously using multiple ALU’s. 1.5.4 Clock Rate Processor circuits are controlled by a timing signal called a clock. The clock defines regular time intervals called clock cycles. The machine instructions are divided into a sequence of basic steps and each step is completed in one clock cycle. Clock rate R=1/P, where P is the length of one clock cycle. R is measured in cycles per second (herts-Hz). 1.5.5 Instruction set: CISC and RISC Reduced instruction set computer – Large N, small S Complex instruction set computer – Small N, large S • Multiple length instructions are difficult to implement with high clock rate • Complex instruction set computers (CISC) have complex instruction encodings like this (e.g.IA- 32) • Reduced instruction set computers (RISC) only allow simple 32-bit formats, few addressing modes and all data to be manipulated must be in registers e.g. Add (R3),R2 is not allowed, instead use Move (R3),R1 followed by Add R1,R2 (e.g. ARM) RISC machines often are 3-address machines as the addressing mode field is either not necessary or simplified e.g. Add R1, R2, R3 CISC machines usually require less instructions but have a lower clock rate, RISC require more instructions but have a higher clock rate 1 Examples of CISC processors are the System/360(excluding the 'scientific' Model 44), 2 VAX, 3 PDP‐11, 4 Motorola 68000 family 5 Intel x86 architecture based processors. 6 7 8 RISC Examples 9 •Apple iPods (custom ARM7TDMI SoC)
  • 5. 10 •Apple iPhone (Samsung ARM1176JZF) 11 •Palm and PocketPC PDAs and smartphones (Intel XScale family) 12 •Nintendo Game Boy Advance (ARM7) 13 •Nintendo DS (ARM7, ARM9) 14 •Sony Network Walkman (Sony in‐house ARM based chip) 15 •Some Nokia and Sony Ericsson mobile phones 16 The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program. 17 18 Characteristics of RISC Vs CISC processors No RISC CISC 1 Simple instructions taking one cycle Complex instructions taking multiple cycles 2 Instructions are executed by hardwired control unit Instructions are executed by microprogramed control unit 3 Few instructions Many instructions 4 Fixed format instructions Variable format instructions 5 Few addressing mode, and most instructions have register to register addressing mode Many addressing modes 6 Multiple register set Single register set 7 Highly pipelined Not pipelined or less pipelined 1.5.6 Compiler - Translates high level language such as C, C++ and Java to machine instructions. Aim is to reduce N×S. To reduce N, we need a suitable instruction set and and a good compiler. NxS is the total clock cycle needed to execute a program. 1.6 Introduce to Multiprocessors and Multicomputers Large computer systems contain a number of processor units and called multiprocessor systems. They execute different applications in parallel or subtasks in parallel. All processors can access all of the memory in the system (shared memory multiprocessor systems). The interconnected group of computers can be used to achieve high total computational power. The computers have access to only their own memory. When executing the data transferred as messages between the computers.(message passing multicomputers). 1.7 Understand the Memory Operations • The program & data are in memory • Instructions and operands are to be transferred from memory • Result has to be stored into memory • The basic operations are LOAD and STORE • LOAD copies contents of memory to processor. Processor send the address and gives request for reading • STORE transfers data from processor to specific memory location. Processor send the address and gives request for writing 1.8 Understand Instructions and Instruction Sequencing A computer must have instruction capable of performing the following operations. They are: • Data transfer between memory and processor register. • Arithmetic and logical operations on data. • Program sequencing and control. • I/O transfer.
  • 6. 1.8.1 Introduce to Instruction Execution and Straight Line Sequencing Instruction Execution: There are 2 phases for executing an instruction. They are, • Instruction Fetch • Instruction Execution Instruction Fetch:The instruction is fetched from the memory location whose address is in PC. This is then placed in IR. Instruction Execution: Instruction in IR is examined and decoded to determine which operation is to be performed. Program execution Steps: To begin executing a program, the address of first instruction must be placed in PC. The processor control circuits use the information in the PC to fetch & execute instructions one at a time in the order of increasing order. This is called Straight line sequencing. During the execution of each instruction, the PC is incremented by 4 to point to the address of next instruction. Straight line sequencing: If fetching and executing of instructions is carried out one by one from successive addresses of memory, it is called straight line sequencing. 1.8.2 Introduce to Branching The Address of the memory locations containing the n numbers are symbolically given as NUM1, NUM2…..NUMn. Separate Add instruction is used to add each number to the contents of register R0. After all the numbers have been added, the result is placed in memory location SUM.
  • 7. Branch instructions are those which change the normal sequence of execution. Sequence can be changed either conditionally or unconditionally. Accordingly we have conditional branch instructions and unconditional branch instruction. Conditional branch instruction changes the sequence only when certain conditions are met. Unconditional branch instruction changes the sequence of execution irrespective of condition of the results. 1.8.3 Introduce to Condition Codes Conditional Codes: In order to do conditional branches and other instructions, operations implicitly set flags. Four commonly used (1-bit) flags • N (negative) 1 if result –ve else 0 • Z (zero) 1 if result 0 else 0 • V (overflow) 1 if arithmetic overflow occurs else 0 • C (carry) 1 if carry out occurs –ve else 0 1.9 Familiarize Assembly Languages Machine instructions are represented by patterns of 0s and 1s. To make it easy for handling, we use symbol names to represent these patterns. Eg MOV, ADD, INC etc. Such words are called mnemonics. A complete set of such symbolic names & rules make the programming language called assembly language. The list rules is called syntax of the language. The programs written in assembly language are translated into machine instructions by a program called assembler. The source program in assembly language is called source program and the assembled machine language program is called object program. - We use capital letters to denote names and labels. - The neumonic code in the instruction is called op-code. - The values given with the op-code is called operands The different ways in which the location of an operand is specified in an instruction is called as Addressing mode. Generic Addressing Modes: • Immediate mode • Register mode • Absolute mode • Indirect mode • Index mode • Base with index • Base with index and offset • Relative mode • Auto-increment mode • Auto-decrement mode We generally use symbolic names to write a program. A complete set of such symbolic names and rules for their use constitute a programming language, is referred to as assembly language. LOAD - To load operand from memory STORE - To store operand to memory MOVE - To transfer data from one location to another location/Register 1.9.1 Introduce to Assembler Directives Assembler Directives: Directives are the assembler commands to the assembler concerning the program being assembled. These commands are neither translated into machine opcode nor assigned any memory location in the object program. S EQU 150 EQU directs the assembler that the symbolic name S must be replaced with memory location address 150, ORIGIN 201 Instruct assembler to initiate data block at main memory locations starting from 201
  • 8. N DATAWORD 40 Inform the assembler that value of N i.e. data value 40 is to be placed in the memory location 201. ORIGIN 100 States that assembler directive must load machine instructions of the object program in the main memory starting from location 100. END START End of the program and the label of where program starts N1 RESERVE 400 Reserve memory block of 400 bytes 1.9.2 Understand Assembly and Execution of Programs 1.9.3 Introduce to Number Notation 1.10 Study the Basic Input/Output Operations I/O is the means by which data are transferred between the processor and the outside world. Devices operate at different speeds to the processor so handshaking is required. Keyboard/display Example: The keyboard and display are coordinated via software • Register (on device) assigned to the keyboard hardware – DATAIN contains ASCII of last typed character – SIN is the status control flag, normally 0. When a character typed, becomes 1. After the processor reads DATAIN, it is automatically set back to 0 • Register (on device) assigned to the display hardware – DATAOUT receives a character code – SOUT is the status control flag. It is 1 when ready to receive a character, set to 0 when the character is being transferred • These registers form the respective device interface