A good answer might be:

The program below has the blanks filled.

Shifting the Sign Bit

To determine if "A" is negative, check if its sign bit is one. To do this, logically shift the sign bit into bit position 0 of a register. The register will be zero if "A" is positive. The program assumes that integer values are represented with two's complement.

## absVal.asm
##
## Calculate the absolute value of A

      .text
      .globl  main

main: 
# Get A
        lui   $10,0x1000     #  Initialize the base register
        lw    $8,0($10)      #  Load A
        sll   $0,$0,0        #  no-op

# Is A negative?
        srl   $9,$8,_____       #  Shift sign bit to position 0
        beq   $___,$_____,done  #  sign bit == zero, done
        sll   $0,$0,0


# Store -A


done:   

      .data
A:    .word   -1

## End of file

The branch delay slot is filled with a no-op.

QUESTION 15:

Fill the blanks.