5.13. Beq, Bne, J Branch And Jump Instructions

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 12

Scroll down to view the document on your mobile browser.
1/3/2019 5.13. beq, bne, j: Branch and jump instructionshttps://learn.zybooks.com/zybook/FIUCDA3103CickovskiFall2018/chapter/5/section/13 1/125.13 beq, bne, j: Branch and jump instructionsBranch instructions: beq, bneA branch instruction species the location of the next instruction to execute, depending on the branch instruction's conditioequal (beq) instruction branches to an instruction at a specied location if the values held in two registers are equal. If the vthe branch is taken, and the instruction at the specied location is executed. Otherwise, the branch is not taken, and the insimmediately following the branch instruction is executed.A branch instruction typically uses a label to specify the next instruction's location. A label is a named position in a programan instruction's memory address. The MIPS beq instruction format below branches to the instruction at location Label if thein regA and regB are equal.beq regA, regB, LabelA label is a sequence of letters (a-z, A-Z, _) and digits (0-9) starting with a letter and followed by a colon (:).PARTICIPATIONACTIVITY 5.13.1: Branch on equal (beq) instruction.Cont: addi $t2, $t2, 1   beq $t1, $t0, Cont  add $t2, $t2, $t3  $t3$t2$t1$t0Register file55Cont7 85 5=Start 2x speed

Navigation menu