SlideShare a Scribd company logo
Programming Question
programming project and need support to help me learn.
Please see file attached.
You need to submit a zip file compressing the following files:
.asm file of the program for task #2 (20 points)
.asm file of the program for task #4 (20 points)
A report.pdf file containing all the snapshots (30 points) and console outputs (30 points) of
tasks #1, #3, and #5.
total: 100 points.
Requirements: Deliverables | .doc file
In this assignment, you will execute and manipulate a simple program written in MIPS
assembly language. The code of this program that calculates the sum of cubes of integers
from one to a given non-negative integer can be found in the following .asm file:
cubesum.asm (extension of assembly files may be .s as well). In this program, function with
label cube gets an input Unknown node type: imgUnknown node type: span and returns
Unknown node type: imgUnknown node type: span. Also, function with label cube_sum gets
an input Unknown node type: imgUnknown node type: span and returns the following sum
with the help of cube function: To execute this file, you can use this online service, or
alternatively, install and use the QtSpim application. Please read the following tutorial on
QtSpim: Tutorial on Using QtSpim.pdf Tasks Here are the tasks that you need to do: 1. (20
points) Execute the given program, input number 9 through console, and find the program
output printed on console. Take a snapshot of the value of all the 32 MIPS registers before
and after executing the program. The values are visible on the main window of the online
assembler or the QtSpim program. 2. (20 points) Manipulate the program assembly code so
that it implements and prints out the return value of this function (instead of cube_sum): int
sum_odd_factorial(int n){ int sum = 0; for(int i = 1; i <= n;i+=2) sum +=
factorial(i); return sum; } where factorial is another function that you need to implement:
int factorial(int n) {
int rv = 1; for(int i = 1; i <= n;i++) rv *= i; return rv; } 3. (20 points) Execute
the program that you wrote in step 2 for input 11. Take a snapshot of the value of all the 32
MIPS registers before and after executing the program. 4. (20 points) Manipulate the
program assembly code so that it it implements and prints out the return value of this
function: int nested_loop_test(int n){ int rv = 1; for(int i = 1; i < n;i*=2) for(int j = i;
j >=0; j--) if(j % 2 == 0) rv += (i + j); else rv += (2*i-3*j);
return rv; } 5. (20 points) Execute the program that you wrote in step 4 for input 20. Take a
snapshot of the value of all the 32 MIPS registers before and after executing the program.
Deliverables You need to submit a zip file compressing the following files: ¥ .asm file of the
program for task #2 (20 points) ¥ .asm file of the program for task #4 (20 points) ¥ A
report.pdf file containing all the snapshots (30 points) and console outputs (30 points) of
tasks #1, #3, and #5. ¥ total: 100 points.

More Related Content

Similar to Programming Question.docx

Programming Fundamentals Functions in C and types
Programming Fundamentals  Functions in C  and typesProgramming Fundamentals  Functions in C  and types
Programming Fundamentals Functions in C and types
imtiazalijoono
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make
YASHU40
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignment
Saket Pathak
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
AASTHA76
 
CorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. ProgrammingCorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. Programming
Slide_N
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdf
ayush616992
 
C++ manual Report Full
C++ manual Report FullC++ manual Report Full
C++ manual Report Full
Thesis Scientist Private Limited
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
Shuvongkor Barman
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
S.Ali Sadegh Zadeh
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning material
ArthyR3
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Mohammed Saleh
 
OOP program questions with answers
OOP program questions with answersOOP program questions with answers
OOP program questions with answers
Quratulain Naqvi
 
Gsp 215 Effective Communication / snaptutorial.com
Gsp 215  Effective Communication / snaptutorial.comGsp 215  Effective Communication / snaptutorial.com
Gsp 215 Effective Communication / snaptutorial.com
HarrisGeorg21
 
Visual programming
Visual programmingVisual programming
Visual programming
Dr. C.V. Suresh Babu
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
geishaannealagos
 
Chapter 1 Class 12 Computer Science Unit 1
Chapter 1 Class 12 Computer Science Unit 1Chapter 1 Class 12 Computer Science Unit 1
Chapter 1 Class 12 Computer Science Unit 1
ssusera7a08a
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
Prabhu D
 
Revision of the basics of python1 (1).pdf
Revision of the basics of python1 (1).pdfRevision of the basics of python1 (1).pdf
Revision of the basics of python1 (1).pdf
optimusnotch44
 
Apclass
ApclassApclass
Lecture2.ppt
Lecture2.pptLecture2.ppt
Lecture2.ppt
TarekHemdan3
 

Similar to Programming Question.docx (20)

Programming Fundamentals Functions in C and types
Programming Fundamentals  Functions in C  and typesProgramming Fundamentals  Functions in C  and types
Programming Fundamentals Functions in C and types
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignment
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
 
CorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. ProgrammingCorePy High-Productivity CellB.E. Programming
CorePy High-Productivity CellB.E. Programming
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdf
 
C++ manual Report Full
C++ manual Report FullC++ manual Report Full
C++ manual Report Full
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning material
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
OOP program questions with answers
OOP program questions with answersOOP program questions with answers
OOP program questions with answers
 
Gsp 215 Effective Communication / snaptutorial.com
Gsp 215  Effective Communication / snaptutorial.comGsp 215  Effective Communication / snaptutorial.com
Gsp 215 Effective Communication / snaptutorial.com
 
Visual programming
Visual programmingVisual programming
Visual programming
 
Apclass (2)
Apclass (2)Apclass (2)
Apclass (2)
 
Chapter 1 Class 12 Computer Science Unit 1
Chapter 1 Class 12 Computer Science Unit 1Chapter 1 Class 12 Computer Science Unit 1
Chapter 1 Class 12 Computer Science Unit 1
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
Revision of the basics of python1 (1).pdf
Revision of the basics of python1 (1).pdfRevision of the basics of python1 (1).pdf
Revision of the basics of python1 (1).pdf
 
Apclass
ApclassApclass
Apclass
 
Lecture2.ppt
Lecture2.pptLecture2.ppt
Lecture2.ppt
 

More from write5

This week we are going to participate in a.docx
This week we are going to participate in a.docxThis week we are going to participate in a.docx
This week we are going to participate in a.docx
write5
 
This week begins an overview of the Research In.docx
This week begins an overview of the Research In.docxThis week begins an overview of the Research In.docx
This week begins an overview of the Research In.docx
write5
 
This week you are exploring what it means to have.docx
This week you are exploring what it means to have.docxThis week you are exploring what it means to have.docx
This week you are exploring what it means to have.docx
write5
 
Watch the TED Talk for Chapter 8 on Pay.docx
Watch the TED Talk for Chapter 8 on Pay.docxWatch the TED Talk for Chapter 8 on Pay.docx
Watch the TED Talk for Chapter 8 on Pay.docx
write5
 
The value of diversity in groups and society is continually.docx
The value of diversity in groups and society is continually.docxThe value of diversity in groups and society is continually.docx
The value of diversity in groups and society is continually.docx
write5
 
The Travels of Sir John Mandeville.docx
The Travels of Sir John Mandeville.docxThe Travels of Sir John Mandeville.docx
The Travels of Sir John Mandeville.docx
write5
 
This will enable you to understanding the extent to which.docx
This will enable you to understanding the extent to which.docxThis will enable you to understanding the extent to which.docx
This will enable you to understanding the extent to which.docx
write5
 
The Superfund website will have information about contaminated how.docx
The Superfund website will have information about contaminated how.docxThe Superfund website will have information about contaminated how.docx
The Superfund website will have information about contaminated how.docx
write5
 
The Strengths and Weaknesses of the North and South in.docx
The Strengths and Weaknesses of the North and South in.docxThe Strengths and Weaknesses of the North and South in.docx
The Strengths and Weaknesses of the North and South in.docx
write5
 
This assignment will help you to explain the concept of.docx
This assignment will help you to explain the concept of.docxThis assignment will help you to explain the concept of.docx
This assignment will help you to explain the concept of.docx
write5
 
The Institutional Structure of the Communist.docx
The Institutional Structure of the Communist.docxThe Institutional Structure of the Communist.docx
The Institutional Structure of the Communist.docx
write5
 
The next couple of weeks begins an overview of the.docx
The next couple of weeks begins an overview of the.docxThe next couple of weeks begins an overview of the.docx
The next couple of weeks begins an overview of the.docx
write5
 
Two general technology trends in my workplace are that EHRs.docx
Two general technology trends in my workplace are that EHRs.docxTwo general technology trends in my workplace are that EHRs.docx
Two general technology trends in my workplace are that EHRs.docx
write5
 
Two of the religions that we have studied in the.docx
Two of the religions that we have studied in the.docxTwo of the religions that we have studied in the.docx
Two of the religions that we have studied in the.docx
write5
 
XYZ restaurant owner wishes to extend his current operation by.docx
XYZ restaurant owner wishes to extend his current operation by.docxXYZ restaurant owner wishes to extend his current operation by.docx
XYZ restaurant owner wishes to extend his current operation by.docx
write5
 
Write at least 4 paragraphs in your own words after.docx
Write at least 4 paragraphs in your own words after.docxWrite at least 4 paragraphs in your own words after.docx
Write at least 4 paragraphs in your own words after.docx
write5
 
You mention in your post that you will be.docx
You mention in your post that you will be.docxYou mention in your post that you will be.docx
You mention in your post that you will be.docx
write5
 
to in which you draw from the assigned.docx
to in which you draw from the assigned.docxto in which you draw from the assigned.docx
to in which you draw from the assigned.docx
write5
 
Title Executive Order on Improving the Cybersecurity.docx
Title Executive Order on Improving the Cybersecurity.docxTitle Executive Order on Improving the Cybersecurity.docx
Title Executive Order on Improving the Cybersecurity.docx
write5
 
Write a to paper in APA format that.docx
Write a to paper in APA format that.docxWrite a to paper in APA format that.docx
Write a to paper in APA format that.docx
write5
 

More from write5 (20)

This week we are going to participate in a.docx
This week we are going to participate in a.docxThis week we are going to participate in a.docx
This week we are going to participate in a.docx
 
This week begins an overview of the Research In.docx
This week begins an overview of the Research In.docxThis week begins an overview of the Research In.docx
This week begins an overview of the Research In.docx
 
This week you are exploring what it means to have.docx
This week you are exploring what it means to have.docxThis week you are exploring what it means to have.docx
This week you are exploring what it means to have.docx
 
Watch the TED Talk for Chapter 8 on Pay.docx
Watch the TED Talk for Chapter 8 on Pay.docxWatch the TED Talk for Chapter 8 on Pay.docx
Watch the TED Talk for Chapter 8 on Pay.docx
 
The value of diversity in groups and society is continually.docx
The value of diversity in groups and society is continually.docxThe value of diversity in groups and society is continually.docx
The value of diversity in groups and society is continually.docx
 
The Travels of Sir John Mandeville.docx
The Travels of Sir John Mandeville.docxThe Travels of Sir John Mandeville.docx
The Travels of Sir John Mandeville.docx
 
This will enable you to understanding the extent to which.docx
This will enable you to understanding the extent to which.docxThis will enable you to understanding the extent to which.docx
This will enable you to understanding the extent to which.docx
 
The Superfund website will have information about contaminated how.docx
The Superfund website will have information about contaminated how.docxThe Superfund website will have information about contaminated how.docx
The Superfund website will have information about contaminated how.docx
 
The Strengths and Weaknesses of the North and South in.docx
The Strengths and Weaknesses of the North and South in.docxThe Strengths and Weaknesses of the North and South in.docx
The Strengths and Weaknesses of the North and South in.docx
 
This assignment will help you to explain the concept of.docx
This assignment will help you to explain the concept of.docxThis assignment will help you to explain the concept of.docx
This assignment will help you to explain the concept of.docx
 
The Institutional Structure of the Communist.docx
The Institutional Structure of the Communist.docxThe Institutional Structure of the Communist.docx
The Institutional Structure of the Communist.docx
 
The next couple of weeks begins an overview of the.docx
The next couple of weeks begins an overview of the.docxThe next couple of weeks begins an overview of the.docx
The next couple of weeks begins an overview of the.docx
 
Two general technology trends in my workplace are that EHRs.docx
Two general technology trends in my workplace are that EHRs.docxTwo general technology trends in my workplace are that EHRs.docx
Two general technology trends in my workplace are that EHRs.docx
 
Two of the religions that we have studied in the.docx
Two of the religions that we have studied in the.docxTwo of the religions that we have studied in the.docx
Two of the religions that we have studied in the.docx
 
XYZ restaurant owner wishes to extend his current operation by.docx
XYZ restaurant owner wishes to extend his current operation by.docxXYZ restaurant owner wishes to extend his current operation by.docx
XYZ restaurant owner wishes to extend his current operation by.docx
 
Write at least 4 paragraphs in your own words after.docx
Write at least 4 paragraphs in your own words after.docxWrite at least 4 paragraphs in your own words after.docx
Write at least 4 paragraphs in your own words after.docx
 
You mention in your post that you will be.docx
You mention in your post that you will be.docxYou mention in your post that you will be.docx
You mention in your post that you will be.docx
 
to in which you draw from the assigned.docx
to in which you draw from the assigned.docxto in which you draw from the assigned.docx
to in which you draw from the assigned.docx
 
Title Executive Order on Improving the Cybersecurity.docx
Title Executive Order on Improving the Cybersecurity.docxTitle Executive Order on Improving the Cybersecurity.docx
Title Executive Order on Improving the Cybersecurity.docx
 
Write a to paper in APA format that.docx
Write a to paper in APA format that.docxWrite a to paper in APA format that.docx
Write a to paper in APA format that.docx
 

Recently uploaded

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 

Recently uploaded (20)

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 

Programming Question.docx

  • 1. Programming Question programming project and need support to help me learn. Please see file attached. You need to submit a zip file compressing the following files: .asm file of the program for task #2 (20 points) .asm file of the program for task #4 (20 points) A report.pdf file containing all the snapshots (30 points) and console outputs (30 points) of tasks #1, #3, and #5. total: 100 points. Requirements: Deliverables | .doc file In this assignment, you will execute and manipulate a simple program written in MIPS assembly language. The code of this program that calculates the sum of cubes of integers from one to a given non-negative integer can be found in the following .asm file: cubesum.asm (extension of assembly files may be .s as well). In this program, function with label cube gets an input Unknown node type: imgUnknown node type: span and returns Unknown node type: imgUnknown node type: span. Also, function with label cube_sum gets an input Unknown node type: imgUnknown node type: span and returns the following sum with the help of cube function: To execute this file, you can use this online service, or alternatively, install and use the QtSpim application. Please read the following tutorial on QtSpim: Tutorial on Using QtSpim.pdf Tasks Here are the tasks that you need to do: 1. (20 points) Execute the given program, input number 9 through console, and find the program output printed on console. Take a snapshot of the value of all the 32 MIPS registers before and after executing the program. The values are visible on the main window of the online assembler or the QtSpim program. 2. (20 points) Manipulate the program assembly code so that it implements and prints out the return value of this function (instead of cube_sum): int sum_odd_factorial(int n){ int sum = 0; for(int i = 1; i <= n;i+=2) sum += factorial(i); return sum; } where factorial is another function that you need to implement: int factorial(int n) { int rv = 1; for(int i = 1; i <= n;i++) rv *= i; return rv; } 3. (20 points) Execute the program that you wrote in step 2 for input 11. Take a snapshot of the value of all the 32 MIPS registers before and after executing the program. 4. (20 points) Manipulate the program assembly code so that it it implements and prints out the return value of this function: int nested_loop_test(int n){ int rv = 1; for(int i = 1; i < n;i*=2) for(int j = i;
  • 2. j >=0; j--) if(j % 2 == 0) rv += (i + j); else rv += (2*i-3*j); return rv; } 5. (20 points) Execute the program that you wrote in step 4 for input 20. Take a snapshot of the value of all the 32 MIPS registers before and after executing the program. Deliverables You need to submit a zip file compressing the following files: ¥ .asm file of the program for task #2 (20 points) ¥ .asm file of the program for task #4 (20 points) ¥ A report.pdf file containing all the snapshots (30 points) and console outputs (30 points) of tasks #1, #3, and #5. ¥ total: 100 points.