CPEG323 Quiz 1 Review Long Chen October, 26th, 2005.

Slides:



Advertisements
Similar presentations
1 Lecture 3: MIPS Instruction Set Today’s topic:  More MIPS instructions  Procedure call/return Reminder: Assignment 1 is on the class web-page (due.
Advertisements

Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
Lecture 5: MIPS Instruction Set
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
MIPS Calling Convention Chapter 2.7 Appendix A.6.
Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Csci136 Computer Architecture II Lab#4. - Stack and Nested Procedures
Lecture 16: Computer Arithmetic Today’s topic –Floating point numbers –IEEE 754 representations –FP arithmetic Reminder –HW 4 due Monday 1.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
1  2004 Morgan Kaufmann Publishers Chapter Three.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
1 Lecture 7: Computer Arithmetic Today’s topics:  Chapter 2 wrap-up  Numerical representations  Addition and subtraction Reminder: Assignment 3 will.
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
CS 3843 Final Exam Review Fall 2013 December 5, 2013.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 5 Unsigned integer and floating point.
CSCI 6307 Foundation of Systems – Exercise (2) Xiang Lian The University of Texas – Pan American Edinburg, TX
2015/10/22\course\cpeg323-08F\Final-Review F.ppt1 Midterm Review Introduction to Computer Systems Engineering (CPEG 323)
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
Computer Architecture Chapter 3 Instructions: Arithmetic for Computer Yu-Lun Kuo 郭育倫 Department of Computer Science and Information Engineering Tunghai.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 3: MIPS Instruction Set I Topics: 1.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
Integer and Fixed Point P & H: Chapter 3
CEC 220 Digital Circuit Design Binary Codes
Monday, January 14 Homework #1 is posted on the website Homework #1 is posted on the website Due before class, Jan. 16 Due before class, Jan. 16.
Chapter 2 — Instructions: Language of the Computer — 1 Memory Operands Main memory used for composite data – Arrays, structures, dynamic data To apply.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
CS 3843 Computer Organization Prof. Qi Tian Fall 2013
COMPUTER ORGANIZATION LECTURE 3: ISA YASSER MOHAMMAD.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
CPEG323 Homework Review I Long Chen October, 17 th, 2005.
CSCI206 - Computer Organization & Programming
Lecture 6: Assembly Programs
Computer Architecture Instruction Set Architecture
Number Representation
Lecture 7: MARS, Computer Arithmetic
Data Representation Binary Numbers Binary Addition
Recitation 4&5 and review 1 & 2 & 3
Computer Architecture & Operations I
CS1010 Programming Methodology
Introduction to Computer Systems Engineering
Lecture 4: MIPS Instruction Set
Number Representations
The University of Adelaide, School of Computer Science
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
The University of Adelaide, School of Computer Science
Topic 3 Number Representations and Computer Arithmetics
How to represent real numbers
How to represent real numbers
MIPS Functions.
CSE378 Midterm Review Moore’s Law -- What are the two versions?
Lecture 5: Procedure Calls
Topic 3 Number Representations and Computer Arithmetics
10/4: Lecture Topics Overflow and underflow Logical operations
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
March 27 Test 2 Review Read Sections 5.1 through 5.3.
MIPS Instruction Set Architecture
MIPS Assembly.
Chapter 4 計算機算數.
Review In last lecture, done with unsigned and signed number representation. Introduced how to represent real numbers in float format.
COMS 161 Introduction to Computing
Introduction to Computer Systems Engineering
Number Representations
Presentation transcript:

CPEG323 Quiz 1 Review Long Chen October, 26th, 2005

Problem 1 (30 points) - 1 (D) MIPS is using a RISC ISA Represent 256 in its binary representation (C) 2^8 => [0, 255], so we need 9 bits Big endian vs. little endian (A) 0x44332211 (see slides) What is Addressing mode? (C) It determinates where an operand in an instruction can be located and addressed (see slides)

This number is used to identify the distance in WORDs! Problem 1 (30 points) - 2 The range of addresses in the conditional branch instructions in MIPS (Homework #2 - 5) This number is used to identify the distance in WORDs! Conditional branch instruction: beq $s0, $s2, there 16 5 6 bits 16 bits 18 5 bits The range of the distance is about 2^15 WORDs before and 2^15 WORDs after the branch. In other words, 2^17 bytes before and 2^17 bytes after the branch (D) Addresses up to about 128K before and 128K after the branch

Problem 1 (30 points) - 3 f) In a N-bit ALU, overflow can be detected by looking at (A) the carry into MSB and the carry out MSB (See Topic3b) g) -0.75ten = - 2-1-2-2 = -0.11two Normalized it into -1.1twoX2-1 Compared with the general representation (-1)s X (1+Fraction) X 2(Exponent – 127) We have, s= 1, Fraction = .1000 0000 0000 0000 0000 000two, Exponent = 126ten = 0111 1110two (A) 1011 1111 0100 0000 0000 0000 0000 0000

Problem 1 (30 points) - 4 Compare signed and unsigned numbers Represent decimal number to hexadecimal number (2) 14D Translate IEEE 754 binary representation to decimal representation (B) -5.0

Problem 2 (30 points) - 1 Homework #2 – 5 Homework #3 – 3 Caller save register: the registers that the calling procedure (caller) is responsible for saving and restoring across the call. The called procedure (callee) can then modify the registers without constraint. Callee save register: the registers that the callee is responsible for saving and restoring if it might use. The caller uses the registers without worrying about restoring them after a call. (see slides)

Problem 2 (30 points) - 2 P + P = N; N + N = P; P – N = N; N – P = P (see slides) i, j, temp, $fp, $ra

Problem 3 (10 points) Homework #3 – 1 (with slight change) 1100 0000 1111 0000 0000 0000 0000 0000 (a) unsigned INT 231+230+223+222+221+220 (b) 2’s comp INT -231+230+223+222+221+220 (c) IEEE 754 single precision FP -7.5

Problem 4 (15 points) - 1 Homework #3 - 6 fib(4) fib(3) fib(2) fib(2)

Problem 4 (15 points) - 2 sw $s0,4($sp) sw $s1,8($sp) sw $ra,0($sp)

Problem 5 (15 points) Homework #3 – 2