Computer Science > EXAM > University of Florida - CDA 3101 Practice Final Exam Solution Latest Update (All)

University of Florida - CDA 3101 Practice Final Exam Solution Latest Update

Document Content and Description Below

University of Florida - CDA 3101 Practice Final Exam Solution (Latest 2020 / 2021) 1 CDA 3101 Final Exam (Sample) Last Name ____________________ Time: 2 hrs. First Name ____________________ Hono... r Code Statement On my honor, I have neither given nor received unauthorized aid on this exam. _______________________ ________________________ Signature UFID Show all your work to get partial/full credit. You can use a calculator. 1. (10 points) Write (in binary) the IEEE 754 single-precision representation of the number 18.2510. 2. (15 points) Consider two different implementations, I1 and I2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. I1 has a clock rate of 6 GHz, and I2 has a clock rate of 4 GHz. The average number of cycles for each instruction class on I1 and I2 is given in the following table. Class CPI on I1 CPI on I2 C1 Usage C2 Usage A 2 1 40% 50% B 3 2 20% 25% C 5 2 40% 25% The table also contains a summary of average proportion of instruction classes generated by two different compilers (C1, and C2). Assume each compiler uses the same number of instructions for a given program but that the instruction mix is as described in the table. 3. (15 points) Implement the recursive function sillymultiply() given below in the MIPS assembly language. You may assume that the result always fits the 32-bit resgisters. int sillymultiply(int x, int y) 4 4. (20 points) Imagine I want to support the bge $t0, $t1, label, which compares $t0 and $t1 and branches only if $t0 >= $t1 (without breaking the rest of the instructions like add, sub, and, or, beq, lw, sw etc.). The instruction uses I-format representation (6 bits opcode, 5 bit rs, 5 bit rt, 16 bits label). Assume that the ALU generates another output ‘sign’ which is 1 when the ALU output is negative. (Hint: $t0 >= $t1 if $t0 - $t1 >= 0). a. Make changes to the single-cycle datapath and control shown below to support this instruction. b. Complete the table given below by writing the values (0/1/X) next to each control signal to show the values that would exist in the circuit after all the “work” for executing this instruction has completed, right before the moment that the rising edge of the next clock cycle occurs. 5. (20 points) Look at the following code. The pipelined datapath is given on the last page for your reference. addi $t0, $t0, 4 lw $v0, 0($t0) data hazard on $t0 sw $v0, 20($t1) data hazard on $v0 lw $s0, 60($t0) add $s1, $s0, $s0 data hazard on $s0 sub $s1, $s1, $s0 data hazard on $s1 sub $s4, $s1, $s5 data hazard on $s1 a. Determine where the hazards occur and on which register and write it against each instruction above. See above b. Indicate in the chart below what stage each instruction is in at what cycle, where forwarding occurs (draw an arrow from where the value is produced to where the value is used), and where stalls or flushes occur. In the chart below, you may have more/less spaces than you need. Make sure you fill in the instructions in the first column as they would execute. c. Which two registers of the register file are being read in cycle 8? d. How many cycles does it take to execute the above code completely? e. Can you reorder the code to reduce the number of cycles it takes to execute this code, without changing the code result? If yes, show how. 6. (5 points) Describe (not just give the name) two schemes that can be used to resolve branch hazards. The pipelined datapath is given on the last page for your reference. See slides/book 7. (5 points) The forwarding unit in the pipelined system discussed in class checks the following 4 conditions to identify cases when forwarding will be necessary. Condition1: If EX/Mem.RegisterRD = ID/EX.RegisterRS Condition2: If EX/Mem.RegisterRD = ID/EX.RegisterRT Condition3: If Mem/WB.RegisterRD = ID/EX.RegisterRS Condition4: If Mem/WB.RegisterRD = ID/EX.RegisterRT Consider the following code and identify which condition(s) are true for the forwarding required between the instruction pairs (sub, and) and (sub, or). sub $2, $1, $3 and $12, $2, $5 or $13, $6, $2 (sub, and): Condition 1 (sub, or) : Condition 4 https://www.coursehero.com/file/5877096/CDA3101PracticeFinalExamSoln/ This study resource was shared via CourseHero.com 8 [Show More]

Last updated: 11 months ago

Preview 1 out of 8 pages

Reviews( 0 )

Recommended For You

 Government> EXAM > LEG 100 MILESTONE 4 (answered) Solved Exam Solution Latest 2021 (All)

preview
LEG 100 MILESTONE 4 (answered) Solved Exam Solution Latest 2021

LEG 100 MILESTONE 4 (answered) Solved Exam Solution Latest 2021

By Ebooks , Uploaded: May 23, 2021

$12.5

 NRNP 6568> EXAM > NRNP 6568 WEEK 11 FINAL EXAM LATEST 2023-2024 WALDEN UNIVERSITY (100% VERIFIED Q & A ) BEST EXAM SOLUTION LATEST UPDATE 2023 (All)

preview
NRNP 6568 WEEK 11 FINAL EXAM LATEST 2023-2024 WALDEN UNIVERSITY (100% VERIFIED Q & A ) BEST EXAM SOLUTION LATEST UPDATE 2023

NRNP 6568 WEEK 11 FINAL EXAM LATEST 2023-2024 WALDEN UNIVERSITY (100% VERIFIED Q & A ) BEST EXAM SOLUTION LATEST UPDATE 2023

By EVERYSTUDY , Uploaded: Dec 20, 2023

$18

 Health Care> EXAM > PN HESI EXIT EXAM QUESTIONS & ANSWERS BEST EXAM SOLUTION LATEST UPDATE 2022/2023 TEST BANK (All)

preview
PN HESI EXIT EXAM QUESTIONS & ANSWERS BEST EXAM SOLUTION LATEST UPDATE 2022/2023 TEST BANK

• An 18-year old female client with pelvic inflammatory disease (PID0 asks the pn..Which information is best for the PN to provide? A history of untreated gonorrhea can lead to PID • A new moth...

By James003 , Uploaded: Mar 03, 2023

$13

 Health Care> EXAM > PN HESI EXIT EXAM QUESTIONS & ANSWERS BEST EXAM SOLUTION LATEST UPDATE 2022/2023 TEST BANK (All)

preview
PN HESI EXIT EXAM QUESTIONS & ANSWERS BEST EXAM SOLUTION LATEST UPDATE 2022/2023 TEST BANK

• An 18-year old female client with pelvic inflammatory disease (PID0 asks the pn..Which information is best for the PN to provide? A history of untreated gonorrhea can lead to PID • A new moth...

By James003 , Uploaded: Mar 03, 2023

$13

 Health Care> EXAM > ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+ (All)

preview
ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+

ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDAT...

By Otieno , Uploaded: May 01, 2023

$16

 Health Care> EXAM > ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+ (All)

preview
ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+

ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDATE 2022/2023 Grade A+ATI Med-Surg proctored Final Exam Questions & Answers BEST FINAL EXAM SOLUTION LATESTUPDAT...

By IMMANUEL , Uploaded: May 13, 2023

$15.5

 *NURSING> EXAM > NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+ (All)

preview
NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+,

By oxlade , Uploaded: May 22, 2023

$15

 *NURSING> EXAM > NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+ (All)

preview
NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

By chamberlain , Uploaded: May 23, 2023

$14

 *NURSING> EXAM > NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+ (All)

preview
NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

By Mikeacademia , Uploaded: May 24, 2023

$14

 *NURSING> EXAM > NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+ (All)

preview
NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

NURS 4470 HESI EXIT V1 & ANS 100% CORRECT VERIFIED BEST EXAM SOLUTION LATEST UPDATE 2023 RATED A+

By rrugeruni , Uploaded: May 26, 2023

$14

$6.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
69
0

Document information


Connected school, study & course



About the document


Uploaded On

Nov 30, 2020

Number of pages

8

Written in

Seller


seller-icon
quiz_bit

Member since 3 years

552 Documents Sold


Additional information

This document has been written for:

Uploaded

Nov 30, 2020

Downloads

 0

Views

 69

Document Keyword Tags

THE BEST STUDY GUIDES

Avoid resits and achieve higher grades with the best study guides, textbook notes, and class notes written by your fellow students

custom preview

Avoid examination resits

Your fellow students know the appropriate material to use to deliver high quality content. With this great service and assistance from fellow students, you can become well prepared and avoid having to resits exams.

custom preview

Get the best grades

Your fellow student knows the best materials to research on and use. This guarantee you the best grades in your examination. Your fellow students use high quality materials, textbooks and notes to ensure high quality

custom preview

Earn from your notes

Get paid by selling your notes and study materials to other students. Earn alot of cash and help other students in study by providing them with appropriate and high quality study materials.

WHAT STUDENTS SAY ABOUT US


What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·