1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yuki888 [10]
2 years ago
14

convert the following c code to mips. assume the address of base array is associated with $s0, n is associated with $s1, positio

n is associated with $t0, c is associated with $t1, d is associated with $t2, and swap is associated with $t3 for (c
Computers and Technology
1 answer:
Brums [2.3K]2 years ago
7 0

Answer:

Explanation:

hello we will follow a step by step process for this code, i hope you find it easy.

Mips Equivalent code:

  sw      $0,0($fp)

.L7:

       lw      $2,12($fp)

       addiu   $2,$2,-1

       lw      $3,0($fp)

       slt     $2,$3,$2

       beq     $2,$0,.L2

       nop

       lw      $2,0($fp)

       sw      $2,8($fp)

       lw      $2,0($fp)

       addiu   $2,$2,1

       sw      $2,4($fp)

.L5:

       lw      $3,4($fp)

       lw      $2,12($fp)

       slt     $2,$3,$2

       beq     $2,$0,.L3

       nop

       lw      $2,8($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       lw      $3,24($2)

       lw      $2,4($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       lw      $2,24($2)

       slt     $2,$2,$3

       beq     $2,$0,.L4

       nop

       lw      $2,4($fp)

       sw      $2,8($fp)

.L4:

       lw      $2,4($fp)

       addiu   $2,$2,1

       sw      $2,4($fp)

       b       .L5

       nop

.L3:

       lw      $3,8($fp)

       lw      $2,0($fp)

       beq     $3,$2,.L6

       nop

       lw      $2,0($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       lw      $2,24($2)

       sw      $2,16($fp)

       lw      $2,8($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       lw      $3,24($2)

       lw      $2,0($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       sw      $3,24($2)

       lw      $2,8($fp)

       dsll    $2,$2,2

       daddu   $2,$fp,$2

       lw      $3,16($fp)

       sw      $3,24($2)

.L6:

    lw      $2,0($fp)

       addiu   $2,$2,1

       sw      $2,0($fp)

       b       .L7

        nop

cheers  i hope this helps

You might be interested in
A technician is buying a PC that will host three VMs running at the same time with the current configuration. The technician bel
raketka [301]

Answer:

B. SSD

Explanation:

VMs or virtual machines are virtually created environment for multiple operating system on a host operating system. The host operating system has an extension called Hyper-V. The hyper-V manager helps to manage the virtual machine's activities.

The VMs can hold applications in their respective containers, which requires a partition of the storage. So when more VMs are configured, more storage memory is required to store their individual data. The VMs in a computer system can share a network interface card.

7 0
3 years ago
Vẽ sơ đồ lắp đặt gồm 2 cầu chì, 1 ổ điện, 2 cực điều khiển 2 đèn mắc song song
Nookie1986 [14]

Answer:

okokikhjhghjjjkkkkkokoloo

7 0
2 years ago
Tim has an old server computer that his company uses as a backup. One of the hard drives has gone bad and needs to be replaced.
dimaraw [331]

Answer:

SCSI.

Explanation:

It is a set of ANSI-developed simultaneous interface requirements for connecting scanners, drives, printers, and many other devices to systems.

Although when Tim has such an outdated network system which is used as a backup by his corporation. Then hard drive may have gone wrong and required replacement. The connector used by the hard disk drive is not something he has ever seen before, but he upload photos of that on the community board of the organization to aid determine what kind of hard disk drive they will also have to order.

So, according to the following scenario he required SCSI cable.

4 0
3 years ago
The protection of the confidentiality, integrity, and availability of information assets, whether in storage, processing, or tra
Sergeu [11.5K]

Answer: Information security

Explanation:

 The information security is one of the system that keeps the data confidential, assure the integrity and also availability of the information or data.

This system is basically refers as the CIA triad in the information security system and the data risk management.

The main aim of the information security is that keeps the data protected from the unauthorized accessing and also  controlling the access in the system.

Therefore, Information security is the correct answer.

8 0
3 years ago
Explain briefly in What Way, Facebook is not free medium
Sergio039 [100]
"If you're not paying for it, you are the product."
Your information and (buzzword warning) "big data" are being collected and potentially sold in ways that you cannot control.
4 0
3 years ago
Other questions:
  • Why is it important to know much time you spend on task
    8·1 answer
  • 15. The text of a desktop publishing document is often created using
    6·2 answers
  • Which best explains why magnets can push on or pull other magnets without touching them?
    9·1 answer
  • How does the access point know whether a wireless data packet is intended for its network?
    14·1 answer
  • When replacing a system board in a laptop, which feature is a must?
    10·1 answer
  • 5. Which of the following views is used to run a PowerPoint presentation?
    11·2 answers
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • Select the correct answer.
    12·2 answers
  • Karen works in a department store. Her coworker gave diverse cultural backgrounds. Which statement shows that Karen understand t
    14·1 answer
  • Which of the following statements best illustrates how value was created for eggs? when a farmer sells a chicken who is no longe
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!