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 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 24.06.2019 23:00
Why is it preferable to code web pages in html format? a. to create more lines code b. to apply general formatting rules c. to display properly as search results in all browsers d. to add meaning to the document
Answers: 1
question
Computers and Technology, 25.06.2019 00:30
Which email writing etiquette should ariel follow to let people know that she received their message? a. reply to their messages immediately b. use formal language c. specify the email's intent in the subject field d. be direct when writing the reply
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
You are asked to calculate an object's velocity, in order to do so you must know the object's a. direction and speed. b. distance and time. c. speed and distance. d. direction and distance.
Answers: 1
You know the right answer?
Use Assembly PLEASE !!

Complete swap_bits function which swaps bits at odd and even posi...
Questions
question
Mathematics, 18.07.2019 16:30
question
Mathematics, 18.07.2019 16:30
Questions on the website: 13722363