created: 08/05/01; audio: 01/17/04; revised 11/09/01; 04/12/09; 07/03/15;

CHAPTER 23 — Logic and Math Pseudoinstructions

This chapter discusses additional pseudoinstructions. When you write a program using pseudoinstructions it looks to you as if the computer has a rich set of convenient machine instructions. In fact, these convenient instructions are each implemented by using basic instructions. The extended assembler replaces each pseudoinstruction with one or more basic instructions. The basic instructions are then translated into machine code.

Chapter Topics:

• Bitwise logic:
• `not ` pseudoinstruction
• Integer Arithmetic:
• `abs `   pseudoinstruction
• `addu`   pseudoinstruction
• `subu`   pseudoinstruction
• `negu`   pseudoinstruction
• `mul `   pseudoinstruction
• `div `   pseudoinstruction
• `divu`   pseudoinstruction
• `remu`   pseudoinstruction
• Rotate Instructions:
• `rol `   rotate left pseudoinstruction
• `ror `   rotate right pseudoinstruction

QUESTION 1:

What is the bitwise not of this pattern:

0011 1001