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
G i r l s o n l y j o i n <br> id= ons jcuv jke
Katyanochek1 [597]

Answer:

nooooooo

1.1431586352

4 0
3 years ago
Read 2 more answers
802.11ac provides an advantage over 802.11n by incorporating increased channel bonding capabilities. What size bonded channels d
bulgar [2K]

Answer:

The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.

Explanation:

The 802.11ac is a standardized wireless protocol established and accepted by the institute of electrical and electronics engineers (IEEE). 802.11ac as a wireless local area network (WLAN) protocol, has multiple amplitude and bandwidth, thus making it to be the first standard wireless protocol to have the ability to operate on a Gigabit (Gb) network.

Generally, the 802.11ac wireless standard provides an advantage over 802.11n by incorporating increased channel bonding capabilities. The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.

<em>On the other hand, 802.11n is a standardized wireless protocol that can support either a 20MHz or 40MHz channel. </em>

6 0
3 years ago
Which is the correct formula to add the values in cells A1 and B1? A. SUM(A1+B1) B. =SUM(A1+B1) C. =SUMA1+B1 D. A1+B1
galina1969 [7]
D I'd the answer to the problem
4 0
3 years ago
Read 2 more answers
Give two examples of desktop publishing software
soldier1979 [14.2K]
There are quite a lot of desktop publishing software as of today.
I'll give you the names of some of it.
- Adobe inDesign - one of the most popular
- Corel Draw
- Microsoft Publisher
- Serif
- Ultra Xml
And more.
There are actually a lot if you are just about to check in the internet.
7 0
3 years ago
Supports traditional transactional processing for day-to-day front-office operations or systems that deal directly with the cust
Jet001 [13]

Answer:

Operational CRM.

Explanation:

Operational CRM can be described as most of the programs that allow a company to taking care of the desires of the consumers. The structure links and maintains the selling, marketing, and customer support activities of a corporation, thus providing a structure that requires customer service.

So, the following answer is correct according to the statement.

7 0
3 years ago
Other questions:
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • Write the pseudocode for linear search, which scans through the sequence, looking for ν. Using a loop invariant, prove that your
    14·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
    6·1 answer
  • Retrieve the names of employees who work on exactly one project that is controlled by their department. (It does not matter how
    7·1 answer
  • In 2009, __________ accounted for 1,772 total fatalities. A. passengers riding with impaired drivers B. children hit by backing
    14·2 answers
  • Which operating system is a version of Linux?​
    13·1 answer
  • In his digital portfolio, Ben wants to locate each work he created. Where can he list details about the work in his digital port
    7·2 answers
  • Explain ONE negative outcomes of not matching an ICT product to the correct audience:
    15·1 answer
  • New and just need help with C coding. I've tried if statements and it outputs the wrong number.
    6·2 answers
  • When and why would you use a prefab? <br> Subject video gaming
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!