go to previous page   go to home page   go to next page hear noise highlighting

Answer:

No. You can build unending loops (infinite loops) with it. But additional instructions are needed for while loops and for if-then-else structures.


Conditional Branches

A conditional branch instruction branches to a new address only if a certain condition is true. Usually the condition is about the values in two registers.

Here is the  beq  (branch on equal) instruction:

beq  u,v,addr   # if register $u == register $v
                #     PC  <— addr 
                #     (after a delay of one machine cycle.)
                # else
                #     no effect.

The bit patterns in two registers are compared. If the bit patterns are the same, the PC is changed to the branch address. There is a branch delay slot that follows this instruction (just as for a jump instruction).


QUESTION 10:

Do the bit patterns in the two registers represent integers?


go to previous page   go to home page   go to next page