HW8_05

# HW8_05 - .data textdata.asciiz “Fibonacci number is...

This preview shows pages 1–2. Sign up to view the full content.

EE 3755 MIPS Homework8 Due: Not to be submitted Estimated time to finish: Prob. 1 : 120 Minutes. Prob. 2 : 20 Minutes. Prob. 3 : 50 Minutes. Total : 190 Minutes. Problem 1: Write MIPS program to compute Fibonacchi number : (120 Mins) Fibonachi number: 0,1,1,2,3,5,8,13,…. . F(n) = 0 when n = 0; F(n) = 1 when n = 1; Otherwise F(n)= F(n-1) + F(n-2). . # hint: stack memory and procedure call and return. # FIBO: j \$ra nop. Problem2 : Write drive program and check the result.(20Mins)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: .data textdata: .asciiz “Fibonacci number is =\n” # output format and output when n = 4. # # “n = 4” # ”Fibonacci number is = 3” # Sol) .text .globl __start # or main. . __start: Problem 3: Write MIPS program to compute Factorial. (50 Mins) Factorial: 1,1,2,6,24,120,…. . F(n) = 1 when n = 0; Otherwise F(n)= n* F(n-1). # hint: stack memory and procedure call and return. ....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

HW8_05 - .data textdata.asciiz “Fibonacci number is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online