Princess Sumaya Univ. Computer Engineering Dept. Chapter 2:

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

Princess Sumaya University
Goal: Write Programs in Assembly
INSTRUCTION SET ARCHITECTURES
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
Systems Architecture Lecture 5: MIPS Instruction Set
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
CS2422 Assembly Language & System Programming September 19, 2006.
Princess Sumaya University
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
What is an instruction set?
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4:
Machine Instruction Characteristics
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
CSCI 136 Lab 1: 135 Review.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Computer Architecture and Organization
1 ICS 51 Introductory Computer Organization Fall 2009.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
IFT 201: Unit 1 Lecture 1.3: Processor Architecture-3
Computer Architecture EKT 422
Assembly Language. Symbol Table Variables.DATA var DW 0 sum DD 0 array TIMES 10 DW 0 message DB ’ Welcome ’,0 char1 DB ? Symbol Table Name Offset var.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
What is a program? A sequence of steps
Group # 3 Jorge Chavez Henry Diaz Janty Ghazi German Montenegro.
Page 1 Computer Architecture and Organization 55:035 Midterm Exam Review Spring 2011.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
Chapter Overview General Concepts IA-32 Processor Architecture
CS2100 Computer Organisation
Assembly language programming
Assembly language.
Assembly Language Assembly Language
Microprocessor Systems Design I
BIC 10503: COMPUTER ARCHITECTURE
Lecture 4: MIPS Instruction Set
Computer Organization and ASSEMBLY LANGUAGE
CSCI206 - Computer Organization & Programming
Systems Architecture Lecture 5: MIPS Instruction Set
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
Computer Architecture
ECEG-3202 Computer Architecture and Organization
The ARM Instruction Set
MIPS Assembly.
Other Processors Having learnt MIPS, we can learn other major processors. Not going to be able to cover everything; will pick on the interesting aspects.
CSC 497/583 Advanced Topics in Computer Security
CS501 Advanced Computer Architecture
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Princess Sumaya Univ. Computer Engineering Dept. Chapter 2:

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 1 / 18 Basic Computer Organization  The 5 Classic Components of a Computer  The Basic Hardware/Software Interface  The Stored-Program Concept

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 2 / 18 Instructions  Assembly Language Instruction: Perform:a = b + c ADDa, b, c; a  b + c What are ‘a’, ‘b’ and ‘c’? ●The storage concept: ♦ Registers (R1, R2 …) ♦ Memory  Sequence of Instructions: Perform: a = (b + c) – (d + e)

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 3 / 18 Memory Operands  Data Transfer Instructions ●Memory Address (Location) ●Slower than registers ●Lower bandwidth than registers  Load and Store Instructions Memory

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 4 / 18 Constant Operands  Memory Operand Perform a = b + 4  Immediate Operand Memory b

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 5 / 18 Memory Access  Height and Width 1 KB 4 KB  Address & Data 16 Locations  1 K Locations  1 M Locations   Read & Write Memory bit 1 KB

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 6 / 18 Stored Program Architecture Instructions (Program) Operands (Data) Memory 1024 x 32 OpcodeOperands Binary Operand

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 7 / 18 Memory Organization  Byte Access  Word Access 20 Byte 21 Byte 20 Byte Byte Byte Byte 24 Byte Byte Byte Byte 20 Byte Byte 22 Byte Byte

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 8 / 18 Memory Organization  Mixed Access ●Little Endian ●Odd/Even Alignment 20 Byte Byte 22 Byte Byte DATABUS MSB LSB

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 9 / 18 Memory Organization  Mixed Access ●Alignment! 20 Byte Byte Byte Byte 24 Byte Byte Byte Byte DATABUS MSB LSB

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 10 / 18 Instruction Representation  Instruction Format  Machine Language & Machine Code Sequence of instructions OpcodeOperands ADD R1, R2, F F Assembly Language Machine Language

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 11 / 18 Operations (Opcodes)  Arithmetic ●Add, Sub, Mul, Div, Inc, Dec …  Logic ●Shift ♦ Logical & Arithmetic ♦ Right & Left ●Bitwise AND, OR, XOR ●Complement (NOT)

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 12 / 18 Operations (Opcodes)  Shift Operation for Multiplication ●Multiply by 2 ♦ Shift Left 1 bit ♦ Unsigned Binary ♦ 2’s Complement ●Multiply by 10 ♦ BCD ♦ Shift Left 4 bits

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 13 / 18 Control Instructions  Making Decisions (Conditional Branches) Perform if (i == j) then a = b + c else a = b – c i == j ? a = b + ca = b – c

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 14 / 18 Control Instructions  Transferring Execution ●Unconditional Branch or Jump ●Call Subroutine ●Software Interrupt

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 15 / 18 RISC & CISC  Reduced Instruction Set Computer ●32-Bit Storage: ♦ Registers (R1, R2 … R31) ♦ Memory ●Arithmetic operations: ♦ Simple ♦ Limited to registers  Complicated Instruction Set Computer ●IA-32

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 16 / 18 EAX Intel Architecture IA-32  General-Purpose Registers (GPRs)  Segment Registers Segmented Memory Addressing (Real Mode) ALAX EAX AXAL EBX BXBL ECX CXCL EDX DXDL ESISI EDIDI “Base” “Count” CS SS DS “Division” “String Source” “String Destination” Also: “Accumulator”

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 17 / 18 Intel Architecture IA-32  Variable Length Instruction Format

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. 18 / 18 Intel Architecture IA-32 YearMicroprocessorAddress BitsData BitsTransistors , , /829, /8134, /16/8275, /16/81,200, Pentium3232/16/83,100, Pentium Pro3232/16/85,500, Pentium II3232/16/87,500, Pentium III3232/16/89,500, Pentium 43232/16/842,000, Pentium 4 EM64T6432/16/8125,000, Core 2 Quad6432/16/8820,000,000

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. Chapter 2

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. Chapter 2 Exercise 1  Write an assembly language program to perform a+2b where ‘a’ and ‘b’ are stored in R1 and R2.  Write an assembly language program to swap two locations at memory addresses 10 and 20.  Rewrite the following program to run faster: SUB R1, R1, R1 INC R1 ADD R2, R3, R1  A memory has 4 bits of address and 4 bits of data. Determine the total number of bits inside it.

Princess Sumaya University – Computer Arch. & Org. (1) Computer Engineering Dept. Chapter 2 Exercise 2  Determine the value of R1: LD R1, M [ 43 ]  Write the assembly instruction at 44.  Assuming 8-bit registers, determine the value of R1: Load Immediate R1, Binary ‘ ’ Arith Shift Right R1  Assuming i and j are integers, R1= i and R2 = j, write the C- language statement for: Compare R1, R2 Jump Equal Label_1 Clear R1 Label_1: Clear R Opcode Operand 1 Operand 2 Operand 3 Add (= B1)Reg (5 bits) Add (= B2)Reg (5 bits) Constant