Compare Branch and Jump Instructions for Computers

  • Thread starter Thread starter EvLer
  • Start date Start date
  • Tags Tags
    Computer
Click For Summary

Discussion Overview

The discussion centers on the differences between "branch" and "jump" instructions in computer programming, exploring their definitions, conditions, and potential variations across programming languages. The scope includes technical explanations and conceptual clarifications.

Discussion Character

  • Technical explanation, Conceptual clarification

Main Points Raised

  • Some participants propose that a branch instruction is conditional, meaning it only executes a jump if a specific condition is met, while a jump instruction is unconditional.
  • Others argue that the distinction can depend on the programming language being used, with one participant noting that in 68HC11 code, a jump refers to an absolute position and a branch to a relative position.
  • A later reply mentions that the definitions may not be strictly absolute, suggesting a level of ambiguity in the terminology.

Areas of Agreement / Disagreement

Participants express differing views on the definitions and applications of branch and jump instructions, indicating that multiple competing interpretations exist without a clear consensus.

Contextual Notes

The discussion highlights potential limitations in definitions and the context-dependent nature of the terms, particularly regarding specific programming languages.

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
 
ya, we use 68HC12. Thanks for the explanations.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K