Question: Assignment: 1. Translate the Babbage program above into MIPS assembly language; 2. Make sure your program is well commented; Background: Although the nineteenth-century mathematician Charles
Assignment:
1. Translate the Babbage program above into MIPS assembly language;
2. Make sure your program is well commented;
Background: Although the nineteenth-century mathematician Charles Babbage is best known today for envisioning the fetch/execute cycle of general-purpose computers, he also accomplished an amazing mechanical engineering feat. He designed (using cams and gears) the first fully automated special-purpose computer. This machine computes values of mathematical functions (at equally-spaced intervals of x) that we would normally think of as requiring several multiplications (such as x3=x*x*x) using a clever algorithm that requires only a few additions to obtain each successive value of the function from an earlier value of the function. For example, the following high-level language program computes s1=13=1, s2=23=8, s3=33=27, s4=43=64 and s5=53=125:
int t0,t1,t2; i
nt s1,s2,s3,s4,s5;
main() //Babbage program
{t0 = 6;
t1 = 0;
t2 = 1;
s1 = 1;
t1 += t0;
t2 += t1;
s2 = s1 + t2;
t1 += t0;
t2 += t1;
s3 = s2 + t2;
t1 += t0;
t2 += t1;
s4 = s3 + t2;
t1 += t0;
t2 += t1;
s5 = s4 + t2;
court << " " < }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
