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

Answer:

No. beq tests if the same 32-bit pattern is in each register. The pattern can represent anything.


Branch on Not Equal

Here is the bne (branch on not equal) instruction:

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

QUESTION 12:

Can a branch instruction implement a two-way decision (an if-then-else)?


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