Computer Systems. Fifth edition Documentation for Exam Handouts. J. Stanley Warford
|
|
- Mildred Christal Cobb
- 6 years ago
- Views:
Transcription
1 Computer Systems Fifth edition Documentation for Exam Handouts J. Stanley Warford March 22, 2016
2 Instruction set Instruction Mnemonic Instruction ddressing Status Specifier Mode Bits STOP Stop execution U RET Return from CLL U RETTR Return from trap U MOVSP Move SP to U MOVFLG Move NZVC flags to U MOVFLG Move to NZVC flags U r NOTr Bitwise invert r U NZ r NEGr Negate r U NZV r SLr rithmetic shift left r U NZVC r SRr rithmetic shift right r U NZC r ROLr Rotate left r U C r RORr Rotate right r U C a BR Branch unconditional i, x a BRLE Branch if less than or equal to i, x a BRLT Branch if less than i, x a BREQ Branch if equal to i, x a BRNE Branch if not equal to i, x a BRGE Branch if greater than or equal to i, x a BRGT Branch if greater than i, x a BRV Branch if V i, x a BRC Branch if C i, x a CLL Call subroutine i, x n NOPn Unary no operation trap U aaa NOP Nonunary no operation trap i aaa DECI Decimal input trap d, n, s, sf, x, sx, sfx NZV aaa DECO Decimal output trap i, d, n, s, sf, x, sx, sfx aaa HEXO Hexadecimal output trap i, d, n, s, sf, x, sx, sfx aaa STRO String output trap d, n, sf, x aaa DDSP dd to stack pointer (SP) i, d, n, s, sf, x, sx, sfx NZVC aaa SUBSP Subtract from stack pointer (SP) i, d, n, s, sf, x, sx, sfx NZVC 0110 raaa DDr dd to r i, d, n, s, sf, x, sx, sfx NZVC 0111 raaa SUBr Subtract from r i, d, n, s, sf, x, sx, sfx NZVC 1000 raaa NDr Bitwise ND to r i, d, n, s, sf, x, sx, sfx NZ 1001 raaa ORr Bitwise OR to r i, d, n, s, sf, x, sx, sfx NZ 1010 raaa CPWr Compare word to r i, d, n, s, sf, x, sx, sfx NZVC 1011 raaa CPBr Compare byte to r 8..1 i, d, n, s, sf, x, sx, sfx NZVC 1100 raaa LDWr Load word r from memory i, d, n, s, sf, x, sx, sfx NZ 1101 raaa LDBr Load byte r 8..1 from memory i, d, n, s, sf, x, sx, sfx NZ 1110 raaa STWr Store word r to memory d, n, s, sf, x, sx, sfx 1111 raaa STBr Store byte r 8..1 to memory d, n, s, sf, x, sx, sfx 1
3 RTL specification of the instruction set Instruction Register transfer language specification STOP Stop execution RET PC Mem[SP] ; SP SP + 2 RETTR NZVC Mem[SP] 4..7 ; Mem[SP + 1] ; X Mem[SP + 3] ; PC Mem[SP + ] ; SP Mem[SP + 7] MOVSP SP MOVFLG , NZVC MOVFLG NZVC NOTr r r ; N r < 0, Z r = 0 NEGr r r ; N r < 0, Z r = 0, V {overflow} SLr C r 0, r r 1..1, r 1 0 ; N r < 0, Z r = 0, V {overflow} SRr C r 1, r 1..1 r ; N r < 0, Z r = 0 ROLr C r 0, r r 1..1, r 1 C RORr C r 1, r 1..1 r 0..14, r 0 C BR BRLE BRLT BREQ BRNE BRGE BRGT BRV BRC CLL NOPn NOP DECI DECO HEXO STRO DDSP SUBSP PC Oprnd N = 1 Z = 1 PC Oprnd N = 1 PC Oprnd Z = 1 PC Oprnd Z = 0 PC Oprnd N = 0 PC Oprnd N = 0 Z = 0 PC Oprnd V = 1 PC Oprnd C = 1 PC Oprnd SP SP 2 ; Mem[SP] PC ; PC Oprnd Trap: Unary no operation Trap: Nonunary no operation Trap: Oprnd {decimal input} Trap: {decimal output} Oprnd Trap: {hexadecimal output} Oprnd Trap: {string output} Oprnd SP SP + Oprnd SP SP Oprnd DDr r r + Oprnd ; N r < 0, Z r = 0, V {overflow}, C {carry} SUBr r r Oprnd ; N r < 0, Z r = 0, V {overflow}, C {carry} NDr r r Oprnd ; N r < 0, Z r = 0 ORr r r Oprnd ; N r < 0, Z r = 0 CPWr T r Oprnd ; N T < 0, Z T = 0, V {overflow}, C {carry} ; N N V CPBr T r 8..1 byte Oprnd ; N T < 0, Z T = 0, V 0, C 0 LDWr r Oprnd ; N r < 0, Z r = 0 LDBr r 8..1 byte Oprnd ; N 0, Z r 8..1 = 0 STWr Oprnd r STBr byte Oprnd r 8..1 Trap T Mem[FFF6] ; Mem[T 1] IR 0..7 ; Mem[T 3] SP ; Mem[T ] PC ; Mem[T 7] X ; Mem[T 9] ; Mem[T 10] 4..7 NZVC ; SP T 10 ; PC Mem[FFFE] 2
4 SCII chart Char Bin Hex Char Bin Hex Char Bin Hex Char Bin Hex NUL SP SOH ! a STX " B b ETX # C c EOT $ D d ENQ % E e CK & F f BEL ' G g BS ( H h HT ) I i LF * J j VT B B K B k B FF C, C L C l C CR D D M D m D SO E E N E n E SI F / F O F o F DLE P p DC Q q DC R r DC S s DC T t NK U u SYN V v ETB W w CN X x EM Y y SUB : Z z ESC B ; B [ B { B FS C < C \ C C GS D = D ] D } D RS E > E ˆ E ~ E US F? F _ F DEL F bbreviations for Control Characters NUL SOH STX ETX EOT ENQ CK BEL BS HT LF VT null, or all zeros start of heading start of text end of text end of transmission enquiry acknowledge bell backspace horizontal tabulation line feed vertical tabulation FF form feed CR carriage return SO shift out SI shift in DLE data link escape DC1 device control 1 DC2 device control 2 DC3 device control 3 DC4 device control 4 NK negative acknowledge SYN synchronous idle ETB end of transmission block CN EM SUB ESC FS GS RS US SP DEL cancel end of medium substitute escape file separator group separator record separator unit separator space delete 3
5 ddressing modes Central processing unit (CPU) Status bits (NZVC) ccumulator () Index register (X) Program counter (PC) Stack pointer (SP) Instruction register (IR) N Z V C Instruction specifier Operand specifier (a) The two parts of a nonunary instruction. Instruction specifier (b) unary instruction. aaa ddressing Mode a ddressing Mode r Register 000 Immediate 001 Direct 010 Indirect 011 Stack-relative 100 Stack-relative deferred 101 Indexed 110 Stack-indexed 111 Stack-deferred indexed (a) The addressing-aaa field. 0 Immediate 1 Indexed (b) The addressing-a field. 0 ccumulator, 1 Index register, X (c) The register-r field. ddressing Mode aaa Letters Operand Immediate 000 i OprndSpec Direct 001 d Mem[OprndSpec] Indirect 010 n Mem[Mem[OprndSpec]] Stack-relative 011 s Mem[SP + OprndSpec] Stack-relative deferred 100 sf Mem[Mem[SP + OprndSpec]] Indexed 101 x Mem[OprndSpec + X] Stack-indexed 110 sx Mem[SP + OprndSpec + X] Stack-deferred indexed 111 sfx Mem[Mem[SP + OprndSpec] + X] 4
6 Memory map The shaded portion is ROM Mem Globals FB8F FC0F FC1 FC16 FC17 FC2 pplication program Heap Run-time stack System stack System globals Input port Output port Loader Trap handler Operating system pplication FFF4 FFF6 FFF8 FFF FFFC FFFE FB8F FC0F FC1 FC16 FC17 FC2
7 rithmetic Logic Unit B 4 Cin Result Cout V Zout N Control Status Bits (bin) (dec) Result N Zout V Cout N Z plus B N Z V C plus B plus Cin N Z V C plus B plus 1 N Z V C plus B plus Cin N Z V C 0101 B N Z B N Z B N Z B N Z B N Z N Z SL N Z V C ROL N Z V C SR N Z 0 C ROR N Z 0 C <4> <> <6> <7> 6
8 CPU data section X 4 SP 6 7 PC CPU registers 8 IR T T2 T3 T4 T T M1 0x00 24 M2 0x02 26 M3 0x04 28 M4 0xF0 30 M 0xFE 23 0x01 2 0x x xF6 31 0xFF LoadCk C B System Bus MRB CBus Bus BBus MRCk MR MDRCk MDR MDRMux Mux Mux MDRMux CMux Cin 4 CMux CSMux CSMux Mem Cout S C SCk CCk ddr V VCk Data Zout ndz Z ndz ZCk N NCk MemWrite MemRead 7
9 CPU data section with two-byte data bus X 4 SP 6 7 PC CPU registers 8 IR T T2 T3 T4 T T M1 0x00 24 M2 0x02 26 M3 0x04 28 M4 0xF0 30 M 0xFE 23 0x01 2 0x x xF6 31 0xFF LoadCk C B System Bus MRB CBus Bus BBus MRMux MRMux MRCk MR MDROCk MDROdd MDROMux MDROMux MDREven MDREMux EOMux MDRECk MDREMux EOMux Mux Mux Mem ddr ddr CMux Cin CSMux 4 CMux CSMux Data Data Cout S C SCk CCk V VCk Zout ndz Z ndz ZCk N NCk MemWrite MemRead 8
10 System bus protocols The memory read bus protocol The bus protocol for a memory read over the Pep/9 system bus requires three consecutive cycles, with MemRead asserted on each cycle. The read operation must adhere to the following specification: You must clock the address into the MR before the first MemRead cycle. You must clock the data into the MDR from the system bus on or before the third MemRead cycle. On the third MemRead cycle, you cannot clock a new value into MR in anticipation of a following memory operation. The memory write bus protocol The bus protocol for a memory write requires three consecutive cycles, with MemWrite asserted on each cycle. The write operation must adhere to the following specification: You must clock the address into the MR before the first MemWrite cycle. On the first or second MemWrite cycle, you can clock the data to be written into the MDR. On the third MemWrite cycle, you can clock a new data value into the MDR in anticipation of a following memory write. However, you cannot clock a new address value into the MR in anticipation of a following memory operation. 9
11 MIPS Registers (a) MIPS registers. (b) Pep/9 registers. 0 0x $zero $at $v0 $v1 $a0 $a1 $a2 $a3 $t0 $t1 $t2 $t3 $t4 $t $t6 $t7 32 X PC SP $s0 $s1 $s2 $s3 $s4 $s $s6 $s7 $t8 $t9 $k1 $k0 $gp $sp $fp $ra 10
12 MIPS ddressing modes ddressing Instruction Operands Mode Type Destination Source Source Immediate I-type Reg[rt] Reg[rs] SE(im) Register R-type Reg[rd] Reg[rs] Reg[rt] Base with load I-type Reg[rt] Mem[Reg[rb] + SE(im)] Base with store I-type Mem[Reg[rb] + SE(im)] Reg[rt] PC-relative I-type PC PC + 4 SE(im 4) Pseudodirect J-type PC (PC + 4) 0..3 : (ta 4) op Opcode rs Source register rt Dest register immediate Immediate (a) Immediate addressing with the I-type instruction. 6 6 op Opcode rs Source register rt Source register (b) Register addressing with the R-type instruction. rd Dest register shamt Shift amount funct Function field 6 16 op Opcode rs Base register rt Target register immediate ddress displacement (c) Base addressing with the I-type instruction op Opcode rs Source register rt Branch cond immediate Branch displacement (d) PC-relative addressing with the I-type instruction. 6 op Opcode 26 target Target address (e) Pseudodirect addressing with the J-type instruction. 11
13 MIPS Instruction set Mnemonic Meaning Binary Instruction Encoding add dd ss ssst tttt dddd d addi dd immediate ss sssd dddd iiii iiii iiii iiii sub Subtract ss ssst tttt dddd d and Bitwise ND ss ssst tttt dddd d andi Bitwise ND immediate ss sssd dddd iiii iiii iiii iiii or Bitwise OR ss ssst tttt dddd d ori Bitwise OR immediate ss sssd dddd iiii iiii iiii iiii sll Shift left logical t tttt dddd dhhh hh sra Shift right arithmetic t tttt dddd dhhh hh srl Shift right logical t tttt dddd dhhh hh lb Load byte bb bbbd dddd aaaa aaaa aaaa aaaa lw Load word bb bbbd dddd aaaa aaaa aaaa aaaa lui Load upper immediate d dddd iiii iiii iiii iiii sb Store byte bb bbbt tttt aaaa aaaa aaaa aaaa sw Store word bb bbbt tttt aaaa aaaa aaaa aaaa beq Branch if equal to ss ssst tttt aaaa aaaa aaaa aaaa bgez bgtz blez bltz bne Branch if greater than or equal to zero ss sss aaaa aaaa aaaa aaaa Branch if greater than zero ss sss aaaa aaaa aaaa aaaa Branch if less than or equal to zero ss sss aaaa aaaa aaaa aaaa Branch if less than zero ss sss aaaa aaaa aaaa aaaa Branch if not equal to ss ssst tttt aaaa aaaa aaaa aaaa j Jump aa aaaa aaaa aaaa aaaa aaaa aaaa jr Jump register bb bbb
14 MIPS CPU data section PC JMux 32 PCMux L1 instruction cache ddress Instruction address SL2 4 Plus4 IF Instruction fetch C Decode instruction Register bank B address 16 Sign extend ID Instruction decode/register file read CBus Bus BBus 32 Mux SL2 Ex Execute/address calculation dder Data in ddress Data out L1 data cache Mem Memory access CMux WB Write back 13
15 MIPS CPU control signals PC PCCk JMux PCMux L1 instruction cache ddress Instruction Decode instruction C B Register bank LoadCk CBus Bus BBus Mux Data in ddress L1 data cache Data out DCCk CMux 14
16 MIPS CPU pipelining PC JMux PCMux L1 instruction cache ddress Instruction Plus4 IF Instruction fetch address SL2 IF/ID registers address C Decode instruction Register bank B Sign extend ID Instruction decode/register file read CBus Bus BBus ID/Ex registers Mux SL2 dder Ex Execute/address calculation Ex/Mem registers Data in ddress L1 data cache Mem Memory access Data out Mem/WB registers CMux WB Write back 1
n NOPn Unary no operation trap U aaa NOP Nonunary no operation trap i
Instruction set Instruction Mnemonic Instruction Addressing Status Specifier Mode Bits 0000 0000 STOP Stop execution U 0000 0001 RET Return from CALL U 0000 0010 RETTR Return from trap U 0000 0011 MOVSPA
More informationChapter 12. Computer Organization
Chapter 12 Computer Organization Microcode APPLICATION LEVEL HIGH-ORDER LANGUAGE LEVEL ASSEMBLY LEVEL OPERATING SYSTEM LEVEL INSTRUCTION SET ARCHITECTURE LEVEL MICROCODE LEVEL 2 LOGIC GATE LEVEL Central
More informationChapter. Computer Architecture
Chapter 4 Computer Architecture Figure 4.1 Input device Central processing unit Main memory Output device Bus Data flow Control Figure 4.2 Central processing unit () Status bits ( ) Accumulator ( ) Index
More informationChapter 3. Information Representation
Chapter 3 Information Representation Instruction Set Architecture APPLICATION LEVEL HIGH-ORDER LANGUAGE LEVEL ASSEMBLY LEVEL OPERATING SYSTEM LEVEL INSTRUCTION SET ARCHITECTURE LEVEL 3 MICROCODE LEVEL
More informationF. Appendix 6 MIPS Instruction Reference
F. Appendix 6 MIPS Instruction Reference Note: ALL immediate values should be sign extended. Exception: For logical operations immediate values should be zero extended. After extensions, you treat them
More informationMIPS Instruction Reference
Page 1 of 9 MIPS Instruction Reference This is a description of the MIPS instruction set, their meanings, syntax, semantics, and bit encodings. The syntax given for each instruction refers to the assembly
More informationCS 351 Exam 2 Mon. 11/2/2015
CS 351 Exam 2 Mon. 11/2/2015 Name: Rules and Hints The MIPS cheat sheet and datapath diagram are attached at the end of this exam for your reference. You may use one handwritten 8.5 11 cheat sheet (front
More informationCSc 256 Midterm 2 Fall 2011
CSc 256 Midterm 2 Fall 2011 NAME: 1a) You are given a MIPS branch instruction: x: beq $12, $0, y The address of the label "y" is 0x400468. The memory location at "x" contains: address contents 0x40049c
More informationDATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes. Error Detection Codes
1 DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes 2 Data Types DATA REPRESENTATION Information that a Computer
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 information1.1. INTRODUCTION 1.2. NUMBER SYSTEMS
Chapter 1. 1.1. INTRODUCTION Digital computers have brought about the information age that we live in today. Computers are important tools because they can locate and process enormous amounts of information
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 informationCharacter Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21
2.9 Communication with People: Byte Data & Constants Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21 32: space 33:! 34: 35: #...
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 informationEXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART)
EXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART) Objective: Introduction To understand and apply USART command for sending and receiving data Universal Serial Asynchronous
More informationMIPS%Assembly% E155%
MIPS%Assembly% E155% Outline MIPS Architecture ISA Instruction types Machine codes Procedure call Stack 2 The MIPS Register Set Name Register Number Usage $0 0 the constant value 0 $at 1 assembler temporary
More informationNumber Representations
Simple Arithmetic [Arithm Notes] Number representations Signed numbers Sign-magnitude, ones and twos complement Arithmetic Addition, subtraction, negation, overflow MIPS instructions Logic operations MIPS
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 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 information101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009
101 Assembly ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 What is assembly? 79 Why are we learning assembly now? 80 Assembly Language Readings: Chapter 2 (2.1-2.6, 2.8, 2.9, 2.13, 2.15), Appendix
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 informationCS3350B Computer Architecture Quiz 3 March 15, 2018
CS3350B Computer Architecture Quiz 3 March 15, 2018 Student ID number: Student Last Name: Question 1.1 1.2 1.3 2.1 2.2 2.3 Total Marks The quiz consists of two exercises. The expected duration is 30 minutes.
More informationLecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.
Lecture 4: Review of MIPS Instruction formats, impl. of control and datapath, pipelined impl. 1 MIPS Instruction Types Data transfer: Load and store Integer arithmetic/logic Floating point arithmetic Control
More informationEXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART)
EXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART) Objective: To understand and apply USART command for sending and receiving data Introduction Universal Serial Asynchronous
More informationMicrocode. Application Level. High-Order Language Level. Assembly Level. Operating System Level. Instruction Set Architecture Level. Microcode.
LEVEL 2 Microcode Application Level High-Order Language Level Assembly Level Operating System Level Instruction Set Architecture Level Microcode Level 2 Logic Gate Level Chapter 12 Computer Organization
More informationComputer Architecture. The Language of the Machine
Computer Architecture The Language of the Machine Instruction Sets Basic ISA Classes, Addressing, Format Administrative Matters Operations, Branching, Calling conventions Break Organization All computers
More informationCMSC 313 Lecture 03 Multiple-byte data big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes
Multiple-byte data CMSC 313 Lecture 03 big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes UMBC, CMSC313, Richard Chang 4-5 Chapter
More informationCSc 256 Midterm 2 Spring 2012
CSc 256 Midterm 2 Spring 2012 NAME: 1a) You are given this MIPS assembly language instruction (i.e., pseudo- instruction): ble $12, 0x20004880, there Translate this MIPS instruction to an efficient sequence
More informationData Representation and Binary Arithmetic. Lecture 2
Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest
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 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 informationENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5
ENCM 369 Winter 2013: Reference Material for Midterm #2 page 1 of 5 MIPS/SPIM General Purpose Registers Powers of Two 0 $zero all bits are zero 16 $s0 local variable 1 $at assembler temporary 17 $s1 local
More informationNumber Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers
Outline of Introduction Administrivia What is computer architecture? What do computers do? Representing high level things in binary Data objects: integers, decimals, characters, etc. Memory locations (We
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 informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012
CMSC 33 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 2, FALL 22 TOPICS TODAY Bits of Memory Data formats for negative numbers Modulo arithmetic & two s complement Floating point formats
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems
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 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 informationChemistry Hour Exam 2
Chemistry 838 - Hour Exam 2 Fall 2003 Department of Chemistry Michigan State University East Lansing, MI 48824 Name Student Number Question Points Score 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 Total
More informationCSc 256 Final Fall 2016
CSc 256 Final Fall 2016 NAME: Problem 1 (25 points) Translate the C/C++ function func() into MIPS assembly language. The prototype is: void func(int arg0, int *arg1); arg0-arg1 are in $a0- $a1 respectively.
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 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 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 informationCSc 256 Midterm (green) Fall 2018
CSc 256 Midterm (green) Fall 2018 NAME: Problem 1 (5 points): Suppose we are tracing a C/C++ program using a debugger such as gdb. The code showing all function calls looks like this: main() { bat(5);
More informationLecture 5: Procedure Calls
Lecture 5: Procedure Calls Today s topics: Memory layout, numbers, control instructions Procedure calls 1 Memory Organization The space allocated on stack by a procedure is termed the activation record
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 informationCS341 *** TURN OFF ALL CELLPHONES *** Practice NAME
CS341 *** TURN OFF ALL CELLPHONES *** Practice Final Exam B. Wilson NAME OPEN BOOK / OPEN NOTES: I GIVE PARTIAL CREDIT! SHOW ALL WORK! 1. Processor Architecture (20 points) a. In a Harvard architecture
More information2a. Codes and number systems (continued) How to get the binary representation of an integer: special case of application of the inverse Horner scheme
2a. Codes and number systems (continued) How to get the binary representation of an integer: special case of application of the inverse Horner scheme repeated (integer) division by two. Example: What is
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 informationChapter 2 Number System
Chapter 2 Number System Embedded Systems with ARM Cortext-M Updated: Tuesday, January 16, 2018 What you should know.. Before coming to this class Decimal Binary Octal Hex 0 0000 00 0x0 1 0001 01 0x1 2
More informationECE232: Hardware Organization and Design
ECE232: Hardware Organization and Design Lecture 4: Logic Operations and Introduction to Conditionals Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview Previously examined
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 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 informationEEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture
EEM 486: Computer Architecture Lecture 2 MIPS Instruction Set Architecture EEM 486 Overview Instruction Representation Big idea: stored program consequences of stored program Instructions as numbers Instruction
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, SPRING 2013
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, SPRING 2013 TOPICS TODAY Bits of Memory Data formats for negative numbers Modulo arithmetic & two s complement Floating point
More informationM2 Instruction Set Architecture
M2 Instruction Set Architecture Module Outline Addressing modes. Instruction classes. MIPS-I ISA. High level languages, Assembly languages and object code. Translating and starting a program. Subroutine
More informationChapter 2 Bits, Data Types, and Operations
Chapter Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize two
More informationExperiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.
Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language
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 informationIntroduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison
Introduction to Computer Engineering CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison Chapter 5 The LC-3 Announcements Homework 3 due today No class on Monday
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 informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Pradip Vallathol and Junaid Khalid Midterm Examination 1 In Class (50 minutes) Friday, September
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 informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Junaid Khalid and Pradip Vallathol Midterm Examination 1 In Class (50 minutes) Friday, September
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 informationComputer Organization MIPS Architecture. Department of Computer Science Missouri University of Science & Technology
Computer Organization MIPS Architecture Department of Computer Science Missouri University of Science & Technology hurson@mst.edu Computer Organization Note, this unit will be covered in three lectures.
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 informationNumber Systems II MA1S1. Tristan McLoughlin. November 30, 2013
Number Systems II MA1S1 Tristan McLoughlin November 30, 2013 http://en.wikipedia.org/wiki/binary numeral system http://accu.org/index.php/articles/18 http://www.binaryconvert.com http://en.wikipedia.org/wiki/ascii
More information--------------------------------------------------------------------------------------------------------------------- 1. Objectives: Using the Logisim simulator Designing and testing a Pipelined 16-bit
More informationECE 154A Introduction to. Fall 2012
ECE 154A Introduction to Computer Architecture Fall 2012 Dmitri Strukov Lecture 4: Arithmetic and Data Transfer Instructions Agenda Review of last lecture Logic and shift instructions Load/store instructionsi
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 informationA Processor. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter , 4.1-3
A Processor Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 2.16-20, 4.1-3 Let s build a MIPS CPU but using Harvard architecture Basic Computer System Registers ALU
More informationCSE 30 Fall 2013 Final Exam
Login: cs30x Student ID Name Signature By filling in the above and signing my name, I confirm I will complete this exam with the utmost integrity and in accordance with the Policy on Integrity of Scholarship.
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 informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize
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 informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012 ANNOUNCEMENTS TA Office Hours (ITE 334): Genaro Hernandez, Jr. Mon 10am 12noon Roshan Ghumare Wed 10am 12noon Prof.
More informationECE232: Hardware Organization and Design. Computer Organization - Previously covered
ECE232: Hardware Organization and Design Part 6: MIPS Instructions II http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Computer Organization
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 informationBinary Numbers. The Basics. Base 10 Number. What is a Number? = Binary Number Example. Binary Number Example
The Basics Binary Numbers Part Bit of This and a Bit of That What is a Number? Base Number We use the Hindu-Arabic Number System positional grouping system each position represents a power of Binary numbers
More informationProcessor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4
Processor Han Wang CS3410, Spring 2012 Computer Science Cornell University See P&H Chapter 2.16 20, 4.1 4 Announcements Project 1 Available Design Document due in one week. Final Design due in three weeks.
More informationChapter 2. Computer Abstractions and Technology. Lesson 4: MIPS (cont )
Chapter 2 Computer Abstractions and Technology Lesson 4: MIPS (cont ) Logical Operations Instructions for bitwise manipulation Operation C Java MIPS Shift left >>> srl Bitwise
More informationEE108B Lecture 3. MIPS Assembly Language II
EE108B Lecture 3 MIPS Assembly Language II Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b 1 Announcements Urgent: sign up at EEclass and say if you are taking 3 or 4 units Homework
More informationMIPS Instruction Set
MIPS Instruction Set Prof. James L. Frankel Harvard University Version of 7:12 PM 3-Apr-2018 Copyright 2018, 2017, 2016, 201 James L. Frankel. All rights reserved. CPU Overview CPU is an acronym for Central
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 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 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 informationChapter 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 informationMIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support
Components of an ISA EE 357 Unit 11 MIPS ISA 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support SUBtract instruc. vs. NEGate + ADD instrucs. 3. Registers accessible
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: 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 informationCSE 30 Winter 2014 Final Exam
Signature Login: cs30x Name Student ID By filling in the above and signing my name, I confirm I will complete this exam with the utmost integrity and in accordance with the Policy on Integrity of Scholarship.
More information5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers
CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-2 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language
More informationFundamentals of Programming
Fundamentals of Programming Lecture 2 Number Systems & Arithmetic Lecturer : Ebrahim Jahandar Some Parts borrowed from slides by IETC1011-Yourk University Common Number Systems System Base Symbols Used
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 informationRecap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011
CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-3 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language
More informationLecture 10: Simple Data Path
Lecture 10: Simple Data Path Course so far Performance comparisons Amdahl s law ISA function & principles What do bits mean? Computer math Today Take QUIZ 6 over P&H.1-, before 11:59pm today How do computers
More informationThe MIPS Instruction Set Architecture
The MIPS Set Architecture CPS 14 Lecture 5 Today s Lecture Admin HW #1 is due HW #2 assigned Outline Review A specific ISA, we ll use it throughout semester, very similar to the NiosII ISA (we will use
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 information