Compare Branch and Jump Instructions for Computers

  • Thread starter Thread starter EvLer
  • Start date Start date
  • Tags Tags
    Computer
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 3K views
EvLer
Messages
454
Reaction score
0
how is "branch" instruction different from "jump"?

Thanks in advance.
 
Physics news on Phys.org
A branch instruction is conditional. If some condition is met, program flow jumps to some other location. If the condition is not met, the next instruction is executed instead.

A jump, on the other hand, is not conditional.

- Warren
 
It also sometimes has to do with language you are programming. I believed in 68HC11 code, a jump is for an absolute position, and a branch is relative. Check out the BRA and the JMP commands.

From what I have seen, it is more loose than an absolute definition.

-- MLH