Unformatted text preview:

CSE341 Exam 1 Guide Exam logistics Thursday March 16th 7 00 9 00 pm Knox 20 You will have assigned seats Seat assignments will be available on UBLearns prior to the exam you will find your seat under Grades section Make sure you bring UBID card pens and pencils black blue mask in case you are coughing sneezing Show up on time Once someone leaves you cannot enter and start This also means no restroom use once you begin the exam You get 120 minutes Student IDs or photo IDs will be collected when you enter They will be returned to you when you hand in your exam When you sit and get the paper do not open the booklet until instructed It will be academic integrity violation to do so Only read the cover sheet Read the cover sheet carefully you need to verify your info and it also contains important information that you don t want to miss The MIPS green sheet will be provided to you You should return it with your paper You must bring 1 double sided sheet of your hand written notes and submit it you re your exam If you don t bring it you will lose up to 5 points on your exam If you bring it but don t submit it It will be academic integrity violation and you fail the class Make sure you submit your note sheet The notes must be on a letter sized printer sheet Other paper types and sizes The notes should have your full name student ID and seat number at the top The notes must be your hand written notes Anything related to the content of the won t get the points in a clear and distinct box course is allowed No technology calculator smart watch headphone etc If you try to use technology even just peaking at your phone that is an academic integrity violation Disable alarms and set your phones on silent Independent work no collaborating talking Exams are to be taken individually Topics In no particular order Note This course is inherently cumulative so all concepts are on here that we talked about thus far General Concepts Analog v digital Die Elements of a computer Policies Architecture Key elements Systems Parts of a computer system Performance Factors ISA What is it Instructions What are they Read Write Arithmetic Logic Pseudo vs real Decisions Flowcharts Pseudocode Commenting Writing code Implementation Numbers Conversions and notations All work must be shown including all carries Binary Signed Unsigned Excess Biased Fixed point Hex IEEE 754 Conditionals Loops Functions Procedure Calls Recommended things to review Lecture slides Lecture videos Supplementary documents videos examples Recommended textbook chapters zyBooks Chapters 1 2 3 Appendix A Harris and Harris 1 2 1 4 1 8 5 3 6 1 6 2 6 3 6 4 6 5 6 6 6 7 7 2 Going through Appendix B Homework and recitation assignments Format Includes but not limited to Fill in the blank Fill in things Multiple choice Matching Short answer Essay Describe the picture Draw a picture Solve things True False Create complete flow charts Complete tables Complete maps Evaluate maps Create functions Simplify functions Do math Code Writing Planning Interpreting Tracing Commenting Write things Follow instructions Interpreting comments Sample Questions Note Not all questions types or examples are included 1 We want to speed up a program to twice as fast by only improving the CPI for the branch instructions Calculate the original cycle count first for this program Find the improved branch CPI and tell if this speedup is possible The original program has 65 Load Store instructions 50 Arithmetic instructions and 35 Branch instructions Each Arithmetic instruction has a CPI of 7 each Load Store has a CPI of 5 and each Branch has an original CPI of 10 Show all work to receive full credit 2 How many bits are in a nibble and how many bits are in a half word 3 Convert 0xF03B to unsigned binary and decimal Show all work 4 Take the 2 s complement of decimal 42 to represent it in a 10 bit 2 s complement representation Show all steps and in the process to receive full credit Make sure your final answer is complete 5 Represent the following number 297 0625 in single precision IEEE 754 floating point Show all work yes this will take up space but you need to show all additions subtractions multiplications and divisions 6 What is the standard size of a register in MIPS 7 A program has a branch instruction at address 0x0040 0038 as follows beq s0 s1 label The label which the branch will jump to is at address 0x0040 005C What is the hex representation of full encoded machine code for this instruction What if the instruction was j label 8 What purposes do assembly directives provide when developing programs in MIPS Provide an example of an assembly directive 9 Create comments for each and every line of the following program to tell what that line does Keep the comment concise appropriate and meaningful Create a one line summary of what this program will do Lines are numbered in the provided code for your convenience 20 Points 1 data 0x10000000 2 Sz word 5 3 Array word 12 15 5 10 27 4 S word 0 5 6 text 7 main 8 lui t0 0x1000 9 ori t0 t0 0 10 lw s0 0 t0 11 add 0 0 0 12 addi t0 t0 4 13 add s1 0 0 14 addi t1 zero 0 15 Loop 16 sll t2 t1 2 17 add t2 t2 t0 18 lw s2 0 t2 19 add s1 s1 s2 20 addi t1 t1 1 21 blt t1 s0 Loop 22 add 0 0 0 23 sll t2 t1 2 24 add t2 t2 t0 25 sw s1 0 t2 26 jr ra 27 add 0 0 0 10 Clearly identify the line number s and the name s of all the pseudo instructions that are used in the following code Then rewrite the code to be able to run in bare mode by replacing the pseudo instructions with real instructions and other needed steps Lines are numbered in the provided code for your convenience 1 data 0x10000000 2 var word 27 3 res word 0 4 text 5 main 6 addi t0 0 5 7 addi t1 0 0 8 la t2 var 9 lw t3 0 t2 10 Loop 11 add t1 t1 t0 12 ble t1 t3 Loop 13 sw t1 4 t2 11 Write the main part and only the main part of a MIPS ASM program that will implement the following operation f r2 Include all necessary loads and stores assume all data is the size of a word Use the integer value of 3 for instead of 3 14159 If you write any additional segments you will lose points Use comments to define what purposes each memory address and register is serving in this implementation 12 For both R Format and I Format instructions how many bits are in the op code field 13 What is the …

View Full Document

UB CSE 341 - Exam-1 Guide

Download Exam-1 Guide
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...

Join to view Exam-1 Guide and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Exam-1 Guide 2 2 and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?