How could you compute 4× $8 + $8 ?

A good answer might be:

Multiply $8 by four by shifting left two positions, then add it the original $8

Example Program

Here is the program. Unfortunately, there are a few blanks. This would be a good time to use that scratch pad and pencil next to your keyboard.

## slowMult.asm
## 
## Program to calculate 5 × x - 74
##
## Register Use:
##  $8   x
##  $9   result

        .text
        .globl  main

main:
        ori      $8, $0, 12           # put x into $8
        sll      $___, $___,  ___     # $___ <-- 4x
        addu     $___, $___, $___     # $___ = 5x
        addiu    $___, $___,-74       # $___ = 5x - 74

## End of file

QUESTION 13:

Fill in the blanks to finish the program. The final result should be in register $9.