EC 413 Computer Organization
|
|
- Myra Johns
- 6 years ago
- Views:
Transcription
1 EC 413 Computer Organization Review I Prof. Michel A. Kinsy
2 Computing: The Art of Abstraction Application Algorithm Programming Language Operating System/Virtual Machine Instruction Set Architecture (ISA) Microarchitecture Register-Transfer Level (RTL) Circuits Devices Physics
3 Bit & Byte A bit is the smallest unit of information It represents one 2-way decision or a 2-way choice yes / no, true / false, on / off... Abstraction of all of these is represented as 0 or 1 A single digit with one of two values Binary digit à bit All information in a computer is stored and processed as bits High voltage/low voltage, current flowing/not flowing A byte is 8 bits that are treated as a unit
4 Binary Number System Binary numbers are short-hands for sums of powers of = 1 x x x x x 1 = 1 x x x x x 2 0 Most of us count in "base 10", using powers of 10 Computer counts in "base 2", using power of 2
5 Binary arithmetic It works just like decimal arithmetic Addition = = = = 10 Small Problem We will see how to solve it later in the lecture Subtraction 0-0 = = = = 0
6 Converting binary to decimal Converting to decimal, so we can use polynomial evaluation =1x x x x x x x x2 0 = =
7 Converting decimal to binary Divide by target base (2 in this case) Remainders become digits in the new representation Digits produced in right to left order Quotient is used as next dividend Stop when the quotient becomes zero, but use the corresponding remainder
8 Converting decimal to binary 97 2 à quotient = 48, remainder = 1 (LSB) 48 2 à quotient = 24, remainder = à quotient = 12, remainder = à quotient = 6, remainder = à quotient = 3, remainder = à quotient = 1, remainder = à quotient = 0 (Stop) remainder = 1 (MSB) Answer =
9 Hexadecimal notation Binary number can be long and hard to read, so hexadecimal numbers were introduced It combines 4 bits into a single digit, written in base 16 A more compact and more readable representation of the same information Hexadecimal number system uses the symbols A, B, C, D, E, F for the digits 10, 11, 12, 13, 14, and 15, respectively
10 Numbers and Bases Decimal Base-10 Binary Base-2 Hexadecimal Base A B C D E F
11 Signed Integer Representation There are three ways in which signed binary numbers may be expressed: Signed magnitude One s complement Two s complement In an 8-bit binary number, signed magnitude representation places the absolute value of the number in the 7 bits to the right of the sign bit 4 = =
12 One s complement It amounts to little more than flipping the bits of a binary number In an 8-bit binary number using One s complement 4 = = In one s complement, as with signed magnitude, negative values are indicated by a 1 in the high order bit Complement systems are useful because they eliminate the need for subtraction
13 Two s complement To express a value in two s complement: If the number is positive, convert it to binary and it is done If the number is negative, find the one s complement of the number and then add 1 4 = =
14 Two s complement With Two s complement arithmetic Just add the two binary numbers Discard any carries emitting from the high order bit Sum of 48 and in binary is in one s complement is in two s complement is Answer is 29 =
15 Floating-Point Representation Computer systems use a form of scientific notation for floating-point representation Numbers written in scientific notation have three components: Sign Mantissa Exponent x 10-1 Computer representation of a floating-point number consists of three fixed-size fields: Sign Exponent Significand
16 Floating-Point Representation Sign Exponent Significand The one-bit sign field is the sign of the stored value The size of the exponent field, determines the range of values that can be represented The size of the significand determines the precision of the representation
17 Floating-Point Representation Sign Exponent Significand The significand of a floating-point number is always preceded by an implied binary point The significand always contains a fractional binary value The exponent indicates the power of 2 to which the significand is raised
18 Floating-Point Representation Express in the simplified 14-bit floatingpoint representation 32 = 2 5 = 1.0 x 2 5 = x 2 6 Exponent field = = 6 10 Significand field How do we express fractional numbers 0.5 =2-1?
19 Floating-Point Representation Sum of and using the 14-bit floatingpoint representation = x = x 2 1 = x 2 4 Thus, the sum is x 2 4
20 Memory Allocation There are two types of memory allocation Static memory allocation: Memory is allocated at the start of the program, and freed when program exits Done by the compiler automatically (implicitly) Global variables or objects Alive throughout program execution Can be access anywhere in the program Local variables (inside a function) Memory is allocated when the function starts and freed when the routine returns A local variable cannot be accessed from another function
21 Memory Allocation There are two types of memory allocation Dynamic memory allocation deals with objects whose size can be adjusted depending on needs Dynamic Done explicitly by programmer Programmer explicitly requests the system to allocate memory and return starting address of memory allocated This address can be used by the programmer to access the allocated memory When done using memory, it must be explicitly freed
22 Application Side Higher-level languages Allow the programmer to think in a more natural language and for their intended use Improve programmer productivity Improve program maintainability Allow programs to be independent of the computer on which they are developed Compilers and assemblers can translate high-level language programs to the binary instructions of any machine
23 Application Side Higher-level languages Allow the programmer to think in a more natural language and for their intended use Improve programmer productivity Improve program maintainability Allow programs to be independent of the computer on which they are developed Emergence of optimizing compilers that produce very efficient assembly code As a result, very little programming is done today at the assembler level
24 System Software Side 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 highlevel language (e.g., C, Java) into instructions that the hardware can execute
25 Application Compiling Process C Language Human Readable C program compiler assembly code assembler object code library rou4nes linker executable Machine Code loader memory
26 Assembly Code Three types of statements in assembly language Typically, one statement per a line 1. Executable assembly instructions Operations to be performed by the processor 2. Pseudo-Instructions and Macros Translated by the assembler into real assembly instructions Simplify the programmer task 3. Assembler Directives Provide information to the assembler while translating a program Used to define segments, allocate memory variables, etc.
27 Assembly Code There are 3 main types of assembly instructions Arithmetic - add, sub, mul, shifts, and, or, etc. Load/store Conditional - branches Assembly language instructions have the format: [label:] mnemonic [operands] [#comment] Label: (optional) Marks the address of a memory location Typically appear in data and text segments
28 Assembly Languages Assemblers: Convert mnemonic operation codes to their machine language equivalents Convert symbolic operands to their equivalent machine addresses Build the machine instructions in the proper format Convert the data constants to internal machine representations Write the object program and the assembly listing
29 System Calls Programs do input/output through system calls To obtain services from the operating system Using the syscall system services In MIPS: Load the service number in register $v0 Load argument values, if any, in registers $a0, $a1, etc. Issue the syscall instruction Retrieve return values, if any, from result registers
30 Big Endian Little Endian Processors can order bytes within a word in two ways Little Endian Least significant byte stored at lowest byte address Intel IA-32, Alpha, AMD MSB Byte 3 Byte 2 Big Endian Byte 1 32-bit Register LSB Byte 0 Most significant byte stored at lowest byte address SPARC, PA-RISC, IBM MSB Byte 3 Byte 2 Byte 1 32-bit Register LSB Byte 0 Memory address A A+1 A+2 A+3... Byte 0 Byte 1 Byte 2 Byte 3... Memory Memory address A A+1 A+2 A+3... Byte 3 Byte 2 Byte 1 Byte 0... Memory
31 Instruction Set Architecture (ISA) Instructions are the language the computer understand Instruction Set is the vocabulary of that language It serves as the hardware/software interface Defines data types byte, int, float, double, string, vector Defines set of programmer visible state Known as the programmer s model of the machine Defines instruction semantics (operations, sequencing) operand location: register, immediate, indirect,... add, sub, mul, move, compare,
32 Instruction Set Architecture (ISA) Instructions are the language the computer understand Instruction Set is the vocabulary of that language It serves as the hardware/software interface Defines instruction format (bit encoding) Number of explicit operands per instruction Operand location Number of bits per instruction Instruction length: fixed, short, long, or variable., Examples: MIPS, Alpha, x86, IBM 360, VAX, ARM, JVM
33 Instruction Set Architecture (ISA) Four principles are used in designing instruction set architecture: 1. Simplicity favors regularity Total number of instructions in the instruction set 2. Smaller is faster Number of addressable registers Large number of registers increases access time 3. Good design demands good compromise Computer designer must balance the programmer s desire for more registers with the need to minimize access time 4. Make the common case fast
34 Instruction Set Architecture (ISA) Instructions can be divided into 3 classes 1. Data movement instructions Move data from a memory location or register to another memory location or register without changing its form Load source is memory and destination is register Store source is register and destination is memory lw $a0, 0($t0) 2. Arithmetic and logic (ALU) instructions Change the form of one or more operands to produce a result stored in another location
35 Instruction Set Architecture (ISA) Instructions can be divided into 3 classes 1. Data movement instructions 2. Arithmetic and logic (ALU) instructions Change the form of one or more operands to produce a result stored in another location Add, Sub, Shift, etc. add $t3, $t4, $t5 3. Branch instructions (control flow instructions)
36 Instruction Set Architecture (ISA) Instructions can be divided into 3 classes 1. Data movement instructions 2. Arithmetic and logic (ALU) instructions 3. Branch instructions (control flow instructions) Alter the normal flow of control from executing the next instruction in sequence bgez $t8, else
37 ISA and Performance Instructions per program depends on source code, compiler technology and ISA Cycles per instructions (CPI) depends upon the ISA and the microarchitecture Time per cycle depends upon the microarchitecture and the base technology Time = Instruc@ons Cycles Time Program Program * Instruc@on * Cycle
38 Reduced Instruction Set Computer Relatively few number of instructions (~50) Basic instructions Relatively few different addressing modes Fixed length instruction format Only load/store instructions can access memory Large number of registers Hardwired rather than micro-program control
39 Reduced Instruction Set Computer Simpler to design Higher Performance Smaller die size Lower power consumption Easier to develop compilers to take advantage of all features Simple code generation Regularity in CPI
40 Reduced Instruction Set Computer RISC ISA is extensively used for desktop, server, and embedded: MIPS, PowerPC, UltraSPARC, ARM, MIPS16, Thumb Apple ipods (custom ARM7TDMI SoC) Apple iphone (Samsung ARM1176JZF) Palm and PocketPC PDAs and smartphones (Intel XScale family, Samsung SC ARM9) Nintendo Game Boy Advance (ARM7) Nintendo DS (ARM7, ARM9)
41 Reduced Instruction Set Computer Disadvantages Higher instruction counts Lower instruction density Put a greater burden on the software or system programmer
42 Complex Instruction Set Computer Large number of instructions (~ instructions) Specialized complex instructions Many different addressing modes Variable length instruction format Examples : 68000, 80x86, VAX, PDP-11
43 Complex Instruction Set Computer Large number of instructions (~ instructions) Specialized complex instructions Many different addressing modes Variable length instruction format General advantages Each instruction is more capable Fewer instructions needed to implement a given task More efficient use of slow main memory
44 Complex Instruction Set Computer Disadvantages Backward compatibility means with each new generation of computers instruction set and hardware become more and more complex Individual instructions could be of almost any length Different instructions will take different amounts of clock time to execute Slows down the overall performance of the machine Many specialized instructions are not used frequently enough to justify their existence
45 Complex Instruction Set Computer Disadvantages Many specialized instructions are not used frequently enough to justify their existence Approximately 20% of the available instructions are used in a typical program CISC instructions typically set the condition codes as a side effect of the instruction Setting the condition codes take time Programmers must remember to examine the condition code bits before a subsequent instruction changes them
46 RISC: MIPS MIPS: Microprocessor without Interlocked Pipeline Stages There 3 types of instruction in MIPS 1. R-Type op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits op: Basic operation of the instruction, typically called the opcode rs: The first register source operand rt: The second register source operand
47 MIPS: Microprocessor without Interlocked Pipeline Stages There 3 types of instruction in MIPS 1. R-Type RISC: MIPS op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits rd: The register destination operand, it gets the result of the operation shamt: Shift amount (0 if not shift instruction)
48 MIPS: Microprocessor without Interlocked Pipeline Stages There 3 types of instruction in MIPS 1. R-Type RISC: MIPS op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits funct: Function. This field selects the specific variant of the operation in the op field, and is sometimes called the function code For R-Type op = 0
49 RISC: MIPS MIPS: Microprocessor without Interlocked Pipeline Stages There 3 types of instruction in MIPS 1. R-Type add $t0, $s1, $s
50 RISC: MIPS MIPS: Microprocessor without Interlocked Pipeline Stages There 3 types of instruction in MIPS 2. I-Type Register immediate op rs rt Immediate lw $t0, 8($t3) Branch displacement op rs rt/funct Displacement
51 RISC: MIPS Function call 1. Caller places parameters in a place where the procedure can access them 2. Transfer control to the procedure 3. Acquire storage resources required by the procedure 4. Execute the statements in the procedure 5. Called function places the result in a place where the caller can access it 6. Return control to the statement next to the procedure call
52 Function call Argument Passing RISC: MIPS Arguments to a function passed through $a0-$a3 Functions with more than 4 arguments First four arguments are put in $a0-$a3 Remaining arguments are put on stack by the caller Return Values Return values from a function passed through $v0-$v1 Functions with more than 2 return values
53 Function call Argument Passing RISC: MIPS Arguments to a function passed through $a0-$a3 Functions with more than 4 arguments Return Values Return values from a function passed through $v0-$v1 Functions with more than 2 return values First two return values put in $v0-$v1 Remaining return values put on stack by the function The remaining return values are popped from the stack by the caller
54 RISC: MIPS Case study Assume that A is an array of 64 words and the compiler has associated registers $s1 and $s2 with the variables x and y. Also assume that the starting address, or base address is contained in register $s3. Determine the MIPS instructions associated with the following C statement: x = y + A[4]; // adds 4th element in array A to y and stores result in x
55 RISC: MIPS Case study Assume that A is an array of 64 words and the compiler has associated registers $s1 and $s2 with the variables x and y. Also assume that the starting address, or base address is contained in register $s3. x = y + A[4]; // adds 4th element in array A to y and stores result in x Solution: lw $t0, 16($s3) # $s3 contains the base address of array and # 16 is the offset address of the 4th element add $s1, $s2, $t0 # performs addition
56 Assembly Programs If (condition) then do this else do that if ( i == j && i == k ) i++ ; else j++; j = i + k ; Assuming $s1 stores i, $s2 stores j, and s3 stores k: bne $s1, $s2, ELSE # cond1: branch if!( i == j ) bne $s1, $s3, ELSE # cond2: branch if!( i == k ) addi $s1, $s1, 1 # if-body: i++ j NEXT # jump over else ELSE: addi $s2, $s2, 1 # else-body: j++ NEXT: add $s2, $s1, $s3 # j = i + k
57 Assembly Programs While (condition) then keep doing this while ( i < j ) { k = k * 2; i++; } Assuming $s1 stores i, $s2 stores j, and s3 stores k: Loop: bge $s1, $s2, DONE # branch if! ( i < j ) add $s3, $s3, $s3 # k = k * 2 addi $s1, $s1, 1 # i++ j Loop # jump back to top of loop DONE:
58 Assembly Programs For (these many times) do this for (i = 0; i < j; i++) { k = k * 2; } Assuming $s1 stores i, $s2 stores j, and s3 stores k: addi $s1, $0, 0 # i = 0 Loop: bge $s1, $s2, DONE # branch if! ( i < j ) add $s3, $s3, $s3 # k = k * 2 addi $s1, $s1, 1 # i++ j Loop # jump back to top of loop DONE:
59 Short program Assembly Programs move $t0,$zero # i = 0 clear(int array[], int size) { int i; for (i = 0; i < size; i += 1) array[i] = 0; } Loop: sll $t1,$t0,2 # $t1 = i * 4 add $t2,$a0,$t1 # $t2 = # &array[i] sw $zero, 0($t2) # array[i] = 0 addi $t0,$t0,1 # i = i + 1 slt $t3,$t0,$a1 # $t3 = # (i < size) bne $t3,$zero,loop # if ( ) # goto loop1
60 Next Class Exam
Chapter 2A Instructions: Language of the Computer
Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction
More informationLecture 4: Instruction Set Architecture
Lecture 4: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation Reading: Textbook (5 th edition) Appendix A Appendix B (4 th edition)
More informationInstructions: Language of the Computer
CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1 The Language a Computer Understands Word a computer understands: instruction
More informationECE 486/586. Computer Architecture. Lecture # 7
ECE 486/586 Computer Architecture Lecture # 7 Spring 2015 Portland State University Lecture Topics Instruction Set Principles Instruction Encoding Role of Compilers The MIPS Architecture Reference: Appendix
More informationCSCI 402: Computer Architectures. Instructions: Language of the Computer (4) Fengguang Song Department of Computer & Information Science IUPUI
CSCI 402: Computer Architectures Instructions: Language of the Computer (4) Fengguang Song Department of Computer & Information Science IUPUI op Instruction address 6 bits 26 bits Jump Addressing J-type
More informationCSEE 3827: Fundamentals of Computer Systems
CSEE 3827: Fundamentals of Computer Systems Lecture 15 April 1, 2009 martha@cs.columbia.edu and the rest of the semester Source code (e.g., *.java, *.c) (software) Compiler MIPS instruction set architecture
More informationMachine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine
Machine Language Instructions Introduction Instructions Words of a language understood by machine Instruction set Vocabulary of the machine Current goal: to relate a high level language to instruction
More informationEC 413 Computer Organization
EC 413 Computer Organization Program Compilation Process Prof. Michel A. Kinsy The Full View System Applica2ons So)ware Hardware Systems So)ware The Full View System Processor Applica2ons Compiler Firmware
More informationCSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements
CSE141: Introduction to Computer Architecture CSE 141 Computer Architecture Spring 2005 Lecture 3 Instruction Set Architecute Pramod V. Argade April 4, 2005 Instructor: TAs: Pramod V. Argade (p2argade@cs.ucsd.edu)
More informationIntroduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University
Introduction to the MIPS Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Introduction to the MIPS The Microprocessor without Interlocked Pipeline Stages
More informationCENG3420 Lecture 03 Review
CENG3420 Lecture 03 Review Bei Yu byu@cse.cuhk.edu.hk 2017 Spring 1 / 38 CISC vs. RISC Complex Instruction Set Computer (CISC) Lots of instructions of variable size, very memory optimal, typically less
More informationLecture 4: MIPS Instruction Set
Lecture 4: MIPS Instruction Set No class on Tuesday Today s topic: MIPS instructions Code examples 1 Instruction Set Understanding the language of the hardware is key to understanding the hardware/software
More informationComputer Architecture
CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,
More informationENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design
ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 Sources: Computer
More informationUnsigned Binary Integers
Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0
More informationUnsigned Binary Integers
Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0
More informationCS3350B Computer Architecture MIPS Instruction Representation
CS3350B Computer Architecture MIPS Instruction Representation Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada
More informationComputer Organization MIPS ISA
CPE 335 Computer Organization MIPS ISA Dr. Iyad Jafar Adapted from Dr. Gheith Abandah Slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE 232 MIPS ISA 1 (vonneumann) Processor Organization
More informationChapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes
Chapter 2 Instructions: Language of the Computer Adapted by Paulo Lopes Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects
More informationMath 230 Assembly Programming (AKA Computer Organization) Spring 2008
Math 230 Assembly Programming (AKA Computer Organization) Spring 2008 MIPS Intro II Lect 10 Feb 15, 2008 Adapted from slides developed for: Mary J. Irwin PSU CSE331 Dave Patterson s UCB CS152 M230 L10.1
More informationThomas Polzer Institut für Technische Informatik
Thomas Polzer tpolzer@ecs.tuwien.ac.at Institut für Technische Informatik Branch to a labeled instruction if a condition is true Otherwise, continue sequentially beq rs, rt, L1 if (rs == rt) branch to
More informationInstruction Set Architecture. "Speaking with the computer"
Instruction Set Architecture "Speaking with the computer" The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture Digital Design
More informationChapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week.
Chapter 2 Instructions: Language of the Computer HW#1: 1.3 all, 1.4 all, 1.6.1, 1.14.4, 1.14.5, 1.14.6, 1.15.1, and 1.15.4 Due date: one week. Practice: 1.5 all, 1.6 all, 1.10 all, 1.11 all, 1.14 all,
More informationAnnouncements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls
Announcements HW1 is due on this Friday (Sept 12 th ) Appendix A is very helpful to HW1. Check out system calls on Page A-48. Ask TA (Liquan chen: liquan@ece.rutgers.edu) about homework related questions.
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN 5 th The Hardware/Software Interface Edition Chapter 2 Instructions: Language of the Computer 2.1 Introduction Instruction Set The repertoire of instructions of a computer
More informationOverview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)
Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into
More informationCOMPSCI 313 S Computer Organization. 7 MIPS Instruction Set
COMPSCI 313 S2 2018 Computer Organization 7 MIPS Instruction Set Agenda & Reading MIPS instruction set MIPS I-format instructions MIPS R-format instructions 2 7.1 MIPS Instruction Set MIPS Instruction
More informationEN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design
EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown
More informationECE369. Chapter 2 ECE369
Chapter 2 1 Instruction Set Architecture A very important abstraction interface between hardware and low-level software standardizes instructions, machine language bit patterns, etc. advantage: different
More informationStored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands
Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch
More informationChapter 2: Instructions:
Chapter 2: Instructions: Language of the Computer Computer Architecture CS-3511-2 1 Instructions: To command a computer s hardware you must speak it s language The computer s language is called instruction
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying
More informationMIPS Assembly Programming
COMP 212 Computer Organization & Architecture COMP 212 Fall 2008 Lecture 8 Cache & Disk System Review MIPS Assembly Programming Comp 212 Computer Org & Arch 1 Z. Li, 2008 Comp 212 Computer Org & Arch 2
More informationCENG3420 L03: Instruction Set Architecture
CENG3420 L03: Instruction Set Architecture Bei Yu byu@cse.cuhk.edu.hk (Latest update: January 31, 2018) Spring 2018 1 / 49 Overview Introduction Arithmetic & Logical Instructions Data Transfer Instructions
More informationISA and RISCV. CASS 2018 Lavanya Ramapantulu
ISA and RISCV CASS 2018 Lavanya Ramapantulu Program Program =?? Algorithm + Data Structures Niklaus Wirth Program (Abstraction) of processor/hardware that executes 3-Jul-18 CASS18 - ISA and RISCV 2 Program
More informationEC-801 Advanced Computer Architecture
EC-801 Advanced Computer Architecture Lecture 5 Instruction Set Architecture I Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC University Taxila!1 Instruction Set Architecture
More informationArchitecture I. Computer Systems Laboratory Sungkyunkwan University
MIPS Instruction ti Set Architecture I Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Architecture (1) the attributes of a system as seen by the
More informationChapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance
Chapter 1 Computer Abstractions and Technology Lesson 3: Understanding Performance Manufacturing ICs 1.7 Real Stuff: The AMD Opteron X4 Yield: proportion of working dies per wafer Chapter 1 Computer Abstractions
More informationInstructions: Language of the Computer
CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1 The Language a Computer Understands Word a computer understands: instruction
More informationInstruction Set Architecture (ISA)
Instruction Set Architecture (ISA)... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data
More informationForecast. Instructions (354 Review) Basics. Basics. Instruction set architecture (ISA) is its vocabulary. Instructions are the words of a computer
Instructions (354 Review) Forecast Instructions are the words of a computer Instruction set architecture (ISA) is its vocabulary With a few other things, this defines the interface of computers But implementations
More informationInstructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1
Instructions: MIPS ISA Chapter 2 Instructions: Language of the Computer 1 PH Chapter 2 Pt A Instructions: MIPS ISA Based on Text: Patterson Henessey Publisher: Morgan Kaufmann Edited by Y.K. Malaiya for
More informationMath 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro
Math 230 Assembly Programming (AKA Computer Organization) Spring 2008 MIPS Intro Adapted from slides developed for: Mary J. Irwin PSU CSE331 Dave Patterson s UCB CS152 M230 L09.1 Smith Spring 2008 MIPS
More informationECE331: Hardware Organization and Design
ECE331: Hardware Organization and Design Lecture 15: Midterm 1 Review Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Basics Midterm to cover Book Sections (inclusive) 1.1 1.5
More informationReduced Instruction Set Computer (RISC)
Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the machine. Reduced number of cycles needed per instruction.
More informationMIPS Instruction Set Architecture (1)
MIPS Instruction Set Architecture (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu
More informationELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)
ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department
More informationInstruction Set Architecture
Computer Architecture Instruction Set Architecture Lynn Choi Korea University Machine Language Programming language High-level programming languages Procedural languages: C, PASCAL, FORTRAN Object-oriented
More informationCS3350B Computer Architecture MIPS Introduction
CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January
More informationLecture 4: Instruction Set Design/Pipelining
Lecture 4: Instruction Set Design/Pipelining Instruction set design (Sections 2.9-2.12) control instructions instruction encoding Basic pipelining implementation (Section A.1) 1 Control Transfer Instructions
More informationToday s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.
Today s topics CS/COE1541: Introduction to Computer Architecture MIPS operations and operands MIPS registers Memory view Instruction encoding A Review of MIPS ISA Sangyeun Cho Arithmetic operations Logic
More informationOperations, Operands, and Instructions
Operations, Operands, and Instructions Tom Kelliher, CS 220 Sept. 12, 2011 1 Administrivia Announcements Assignment Read 2.6 2.7. From Last Time Macro-architectural trends; IC fab. Outline 1. Introduction.
More informationReminder: tutorials start next week!
Previous lecture recap! Metrics of computer architecture! Fundamental ways of improving performance: parallelism, locality, focus on the common case! Amdahl s Law: speedup proportional only to the affected
More informationEN164: Design of Computing Systems Lecture 09: Processor / ISA 2
EN164: Design of Computing Systems Lecture 09: Processor / ISA 2 Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown University
More informationChapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1
Chapter 2 1 MIPS Instructions Instruction Meaning add $s1,$s2,$s3 $s1 = $s2 + $s3 sub $s1,$s2,$s3 $s1 = $s2 $s3 addi $s1,$s2,4 $s1 = $s2 + 4 ori $s1,$s2,4 $s2 = $s2 4 lw $s1,100($s2) $s1 = Memory[$s2+100]
More informationComputer Architecture
Computer Architecture Chapter 2 Instructions: Language of the Computer Fall 2005 Department of Computer Science Kent State University Assembly Language Encodes machine instructions using symbols and numbers
More informationChapter 2. Instructions: Language of the Computer
Chapter 2 Instructions: Language of the Computer Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects in common Early computers
More informationReview of instruction set architectures
Review of instruction set architectures Outline ISA and Assembly Language RISC vs. CISC Instruction Set Definition (MIPS) 2 ISA and assembly language Assembly language ISA Machine language 3 Assembly language
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA
CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationEEC 581 Computer Architecture Lecture 1 Review MIPS
EEC 581 Computer Architecture Lecture 1 Review MIPS 1 Supercomputing: Suddenly Fancy 2 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control
More informationInstructions: Language of the Computer
Instructions: Language of the Computer Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class
More informationSystems Architecture I
Systems Architecture I Topics Assemblers, Linkers, and Loaders * Alternative Instruction Sets ** *This lecture was derived from material in the text (sec. 3.8-3.9). **This lecture was derived from material
More informationCISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization
CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationComputer Organization and Structure. Bing-Yu Chen National Taiwan University
Computer Organization and Structure Bing-Yu Chen National Taiwan University Instructions: Language of the Computer Operations and Operands of the Computer Hardware Signed and Unsigned Numbers Representing
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 2: Hardware/Software Interface Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview Basic computer components How does a microprocessor
More informationCS222: MIPS Instruction Set
CS222: MIPS Instruction Set Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati 1 Outline Previous Introduction to MIPS Instruction Set MIPS Arithmetic's Register Vs Memory, Registers
More informationMIPS R-format Instructions. Representing Instructions. Hexadecimal. R-format Example. MIPS I-format Example. MIPS I-format Instructions
Representing Instructions Instructions are encoded in binary Called machine code MIPS instructions Encoded as 32-bit instruction words Small number of formats encoding operation code (opcode), register
More informationMIPS Instruction Set Architecture (2)
MIPS Instruction Set Architecture (2) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu
More informationComputer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:
Computer Science and Engineering 331 Midterm Examination #1 Fall 2000 Name: Solutions S.S.#: 1 41 2 13 3 18 4 28 Total 100 Instructions: This exam contains 4 questions. It is closed book and notes. Calculators
More informationComputer Architecture. MIPS Instruction Set Architecture
Computer Architecture MIPS Instruction Set Architecture Instruction Set Architecture An Abstract Data Type Objects Registers & Memory Operations Instructions Goal of Instruction Set Architecture Design
More informationECE 486/586. Computer Architecture. Lecture # 8
ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Lecture Topics Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls
More informationECE/CS 552: Introduction To Computer Architecture 1. Instructor:Mikko H. Lipasti. University of Wisconsin-Madison. Basics Registers and ALU ops
ECE/CS 552: Instruction Sets Instructor:Mikko H. Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes partially based on set created by Mark Hill. Instructions (354 Review) Instructions are
More informationChapter 2. Instruction Set Architecture (ISA)
Chapter 2 Instruction Set Architecture (ISA) MIPS arithmetic Design Principle: simplicity favors regularity. Why? Of course this complicates some things... C code: A = B + C + D; E = F - A; MIPS code:
More informationComputer Architecture. Lecture 2 : Instructions
Computer Architecture Lecture 2 : Instructions 1 Components of a Computer Hierarchical Layers of Program Code 3 Instruction Set The repertoire of instructions of a computer 2.1 Intr roduction Different
More informationLecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)
Lecture Topics Today: The MIPS ISA (P&H 2.1-2.14) Next: continued 1 Announcements Milestone #1 (due 1/26) Milestone #2 (due 2/2) Milestone #3 (due 2/9) 2 1 Evolution of Computing Machinery To understand
More informationLecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.
ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls Reference:
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:
More informationComputer Organization and Components
2 Course Structure Computer Organization and Components Module 4: Memory Hierarchy Module 1: Logic Design IS1500, fall 2014 Lecture 4: and F1 DC Ö1 F2 DC Ö2 F7b Lab: dicom F8 Module 2: C and Associate
More informationLECTURE 2: INSTRUCTIONS
LECTURE 2: INSTRUCTIONS Abridged version of Patterson & Hennessy (2013):Ch.2 Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many
More informationArchitecture II. Computer Systems Laboratory Sungkyunkwan University
MIPS Instruction ti Set Architecture II Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Making Decisions (1) Conditional operations Branch to a
More informationCSE 533: Advanced Computer Architectures Instructor: Gürhan Küçük. Instructions. Instructions cont d. Forecast. Basics. Basics
CSE 533: Advanced Computer Architectures Instructor: Gürhan Küçük Yeditepe University Lecture notes created by Mark D. Hill Updated by T.N. Vijaykumar and Mikko Lipasti Instructions Instructions are the
More informationISA: The Hardware Software Interface
ISA: The Hardware Software Interface Instruction Set Architecture (ISA) is where software meets hardware In embedded systems, this boundary is often flexible Understanding of ISA design is therefore important
More informationLecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook)
Lecture 2 Instructions: Language of the Computer (Chapter 2 of the textbook) Instructions: tell computers what to do Chapter 2 Instructions: Language of the Computer 2 Introduction Chapter 2.1 Chapter
More informationCS4617 Computer Architecture
1/27 CS4617 Computer Architecture Lecture 7: Instruction Set Architectures Dr J Vaughan October 1, 2014 2/27 ISA Classification Stack architecture: operands on top of stack Accumulator architecture: 1
More informationRechnerstrukturen. Chapter 2. Instructions: Language of the Computer
182.690 Rechnerstrukturen Chapter 2 Instructions: Language of the Computer Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many
More informationChapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1
Chapter 3 MIPS Assembly Language Ó1998 Morgan Kaufmann Publishers 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive
More informationLevels of Programming. Registers
Levels of Programming COSC 2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 3: MIPS Instruction Set I Topics: 1. Arithmetic Instructions 2.
More informationPage 1. Structure of von Nuemann machine. Instruction Set - the type of Instructions
Structure of von Nuemann machine Arithmetic and Logic Unit Input Output Equipment Main Memory Program Control Unit 1 1 Instruction Set - the type of Instructions Arithmetic + Logical (ADD, SUB, MULT, DIV,
More informationInstruction Set Principles and Examples. Appendix B
Instruction Set Principles and Examples Appendix B Outline What is Instruction Set Architecture? Classifying ISA Elements of ISA Programming Registers Type and Size of Operands Addressing Modes Types of
More informationInstructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:
Instructions: Chapter 3 : MIPS Downloaded from: http://www.cs.umr.edu/~bsiever/cs234/ Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive
More informationCourse Administration
Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu
More informationCS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014
B CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014 DUE : March 3, 2014 READ : - Related sections of Chapter 2 - Related sections of Chapter 3 - Related sections of Appendix A - Related sections
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:
More informationMACHINE LANGUAGE. To work with the machine, we need a translator.
LECTURE 2 Assembly MACHINE LANGUAGE As humans, communicating with a machine is a tedious task. We can t, for example, just say add this number and that number and store the result here. Computers have
More information1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer
1 5. Addressing Modes MIPS Addressing Modes 2 Addressing takes care of where to find data instruction We have seen, so far three addressing modes of MIPS (to find data): 1. Immediate addressing: provides
More informationTopic Notes: MIPS Instruction Set Architecture
Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.
More informationRui Wang, Assistant professor Dept. of Information and Communication Tongji University.
Instructions: ti Language of the Computer Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Computer Hierarchy Levels Language understood
More informationChapter 2. Instructions: Language of the Computer
Chapter 2 Instructions: Language of the Computer Instruction Set The range of instructions of a computer Different computers have different instruction sets But with many aspects in common Early computers
More informationCS/COE1541: Introduction to Computer Architecture
CS/COE1541: Introduction to Computer Architecture Dept. of Computer Science University of Pittsburgh http://www.cs.pitt.edu/~melhem/courses/1541p/index.html 1 Computer Architecture? Application pull Operating
More informationMIPS Memory Access Instructions
MIPS Memory Access Instructions MIPS has two basic data transfer instructions for accessing memory lw $t0, 4($s3) #load word from memory sw $t0, 8($s3) #store word to memory The data is loaded into (lw)
More information