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
MakcuM [25]
3 years ago
13

Write a MIPS program to continuously generate the following series of integers: 1, 2, 3, 6, 9, 18, 27, 54, 81, and so on. Use st

andard MIPS programming conventions. Use the jump instruction to generate an infinite loop. Write a subroutine EVEN that returns a 1 if the argument is even, else it returns a 0. You must call this subroutine with jal and return from it with jr. The MIPS program must be converted into machine code and placed in the instruction memory. The sequence can be computed by adding the value to itself if it is odd and by adding the previous value to it if it is even. Before replacing the test program in the instruction memory, make sure that your design works for the provided Test-Program.
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
3 0

Answer:

Explanation:

Here is a working solution in MIPS

.data

space: .asciiz ", "

.text

li $t1, 1       #Start at 1

li $t2, 1       #Store last value

li $t4, 1000    #terminate at 1000

li $t7, 2       #For division (divide by 2)

loop:

li $v0, 1

add $a0, $t1, $zero #print $t1

syscall

div $t1, $t7      #divide $t1 by 2

mfhi $t5          #get the remainder

move $t6, $t1     #hang on to what $t1 was originally

beqz $t5, even    #if the remainder is 0, it's even

add $t1,$t1,$t1    #it's odd, so add to itself

move $t2, $t6      #store what $t1 was originally to last value

bgt $t1, $t4, done #if the number is over 1000, we're done

li $v0, 4           #Print a comma and space

la $a0, space

syscall

j loop

even:

add $t1,$t1,$t2    #set $t1 = $t1 + Last value ($t2)

move $t2, $t6      #store what $t1 was originally to last value

bgt $t1, $t4, done #if the number is over 1000, we're done

li $v0, 4           #Print a comma and space

la $a0, space

syscall

j loop

done:

You might be interested in
An email address is made up of all of the following parts except
Lesechka [4]

Answer:

D: HTTP

Explanation:

When we talk about the email address and the different parts, we can mention for example:

Firstly the username, always an email address starts with a username, next we must use the symbol @, for example:

peter @

michael @

we can add numbers or some characters

henry_98 @

The last part is the domain name, this is the email's company.

5 0
3 years ago
Read 2 more answers
Drag each tile to the correct box.
Likurg_2 [28]
Learning
planning
designing
developing
testing delivering
4 0
2 years ago
What is the condition for setting an alarm clock
stich3 [128]

Answer:

The time in which the alarm clock will sound

Explanation: Hope this helped please give me brainliest

6 0
2 years ago
While troubleshooting a network connection problem for a coworker, you discover the computer is querying a nonexistent DNS serve
tatuchka [14]

Answer:

nslookup ifconfig.

Explanation:

The nslookup is used a number of times by network admins to troubleshoot DNS related problems. In addition, this command finds IP addresses and name servers of hosts. This utility command queries the DNS database tables from every host in a network. It then determines the host name and issues an IP. It sort of converts your domain name into an IP addresses. This command combined with ifconfig finds the correct DNS servers and assigns the correct DNS server IP.

6 0
3 years ago
How many residues separate amino acids that are stabilized by hydrogen bonds in α helices?.
irina [24]

The numbers of residues separate amino acids that are stabilized by hydrogen bonds in α helices is  3.6 amino acid residues.

<h3>Why are amino acids called residues?</h3>

The  Amino acids are known to be compounds that are said to be called residues if there is  two or more amino acids that are known to be bond with each other.

Note that the amino group on one amino acid is one that tends to interacts with the carboxyl group and as such  form a peptide bond.

Therefore, The numbers of residues separate amino acids that are stabilized by hydrogen bonds in α helices is  3.6 amino acid residues.

Learn more about amino acids from

brainly.com/question/2526971

#SPJ1

5 0
1 year ago
Other questions:
  • A rectangular range of cells with headings to describe the cells' contents is referred to as a
    9·1 answer
  • Fill in the blank.
    7·1 answer
  • Desmond must enter a long string of numbers (1 4 9 2 1 6 2 0 1 7 7 6) into an old computer every two hours or the computer will
    12·1 answer
  • List and describe the tools for all the main stages of app/application development.
    11·1 answer
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • You are troubleshooting a client connectivity problem on an Ethernet network. The client system has intermittent connectivity to
    9·1 answer
  • Which of these parts serves as the rear cross structure of a vehicle?
    12·1 answer
  • If the old and new systems are operated side by side until the new system has proven itself, this type of system conversion plan
    11·1 answer
  • __________ is a broad class of software that is surreptitiously installed on a user's machine to intercept the interaction betwe
    6·1 answer
  • The most significant concerns for implementation of computer technology involve _______, security, and ethics. accuracy property
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!