Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this homework, you will explore different types of integers. As you know the C / C + + standard leaves issues such as the
For this homework, you will explore different types of integers. As you know the C C standard leaves issues such as the number of bits and numeric format up to the compiler unlike some other languages For purposes of this homework, we will assume that long integers are bit twos complement TC and integers are bit TC Recall that to convert an n bit integer k to a m bit integer where m n we need to account for two cases:
If k is negative, concatenate s to the more significant part. For example, becomes where n m
If k is non negative, concatenate s to the more significant part. For example, becomes This is called sign extension. Write MIPS code to convert an array A of integers to an array B of long integers. Both arrays have size n You may treat A B and n as HLL variables. As usual, you are required to both draw a CFG and may only use certain instructions excluding functions Note that we have not covered any instructions dealing with doublewords. You may choose to first write this in C ish pseudocode though it is not required. But a CFG is required. The instructions you can use are addi, addi, jal, lw sw slti bne, j jr Ret RetOne. Only use these, dont use other ones. PLEASE DO ALL WELL, FOLLOW ALL DIRECTIONS, DO FULL MIPS CODE WITH ALL COMMENTS PER CODE, PROPER MIPS, SHOW WHAT YOU ARE DOING BASED ON INSTRUCTIONS SAID. DO A PROPER CFG TOO!! CFG IS A FLOW CHART,do this flowgorithm way
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started