created: 07/21/01; corrections: 08/22/01

# CHAPTER 18 — Set Instructions

This chapter describes two additional branch instructions and two conditional set instructions. Set instructions set a register to 1 or 0 depending on whether a condition is true or false.

#### Chapter Topics:

- More Conditional Branch Instructions (one operand register):
    `bltz` instruction (branch on less than zero)
    `bgez` instruction (branch on greater or equal to zero)
- Conditional Set Instructions
    `slt` instruction (set on less than)
    `slti` instruction (set on less than, immediate)
    `sltu` instruction (set on less than, unsigned)
    `sltiu` instruction (set on less than, immediate unsigned)

These new instructions help you to implement loops and branches. But it is still difficult task. Study this chapter to gain insight into what compilers do for you.

### QUESTION 1:

Are relational operators like `>, <, >=,` and `<=` useful in a programming language?