subject

Use Assembly PLEASE !!

Complete swap_bits function which swaps bits at odd and even positions of an integer (32 bits). In other words, every even position bit is swapped with the adjacent bit on the right side, and every odd position bit is swapped with the adjacent on the left side. For instance, bits 0 and 1 are swapped, bits 2 and 3 are swapped, and so on. It is not recommended to use loops or conditional statements for this part.

PART 2 (Swap Bits)
#
# You are given an 32-bits integer stored in $t0. You need swap the bits
# at odd and even positions. i. e. b31 <-> b30, b29 <-> b28, ... , b1 <-> b0
# The result must be stored inside $t0 as well.
swap_bits:
move $t0, $a0
Part 2: your code begins here ###

Part 2: your code ends here ###
move $v0, $t0
jr $ra

Example: if the given number is 23 (00010111), it should be converted to 43 (00101011). Note this example, we only use the lower 8 bits of a number, but your program will work on 32-bit numbers.

You can expect the input to your function in register $t0. The result must be stored inside $t0 as well.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
You know the right answer?
Use Assembly PLEASE !!

Complete swap_bits function which swaps bits at odd and even posi...
Questions
question
Mathematics, 03.07.2019 07:00
question
Mathematics, 03.07.2019 07:00
question
Mathematics, 03.07.2019 07:00
Questions on the website: 13722367