Some programming languages allow two’s complement integer arithmetic on variables declared byte and half, whereas MIPS only has integer arithmetic operations on full words. MIPS does have data transfer operations for bytes and halfwords. What MIPS instructions should be generated for byte and halfword arithmetic operations?
A.
Load with lbu, lhu; arithmetic with add, sub, mult, div; then store using sb, sh.
B.
Load with lb, lh; arithmetic with add, sub, mult, div; then store using sb, sh.
C.
Load with lb, lh; arithmetic with add, sub, mult, div, using AND to mask result to 8 or 16 bits after each operation; then store using sb, sh.