1. The following problems deal with translating from C to MIPs. Assume that variables g, h, i, and j are given and imple

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. The following problems deal with translating from C to MIPs. Assume that variables g, h, i, and j are given and imple

Post by answerhappygod »

1 The Following Problems Deal With Translating From C To Mips Assume That Variables G H I And J Are Given And Imple 1
1 The Following Problems Deal With Translating From C To Mips Assume That Variables G H I And J Are Given And Imple 1 (147.38 KiB) Viewed 33 times
1. The following problems deal with translating from C to MIPs. Assume that variables g, h, i, and j are given and implemented as 32-bit integers in a C program. You can assume that the values have already been loaded into registers. You can select which register is assigned to each variable. a. f = (g / 2 + j + i) - j (f * 4) - (i - h) b. g = • For each C statement above, what is the corresponding MIPS code? Use a minimum number of statements. • How many bits are needed to encode the above instructions for each C statement? • How many bits are needed in the register file to store the data for each C statement? a. addi f, g, 1 b. sub 8, 8, f • How can the two MIPS instructions above be represented using C code? • Name two ways using MIPS instructions to multiple a value in a register by 2 without using a multiply instruction.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply