A branch (or jump on some computer architectures, such as the PDP-8 and Intel x86) is a point in a computer program where the flow of control is altered. The term branch is usually used when referring to a program written in machine code or assembly language; in a high-level programming language, branches usually take the form of conditional statements, subroutine calls or GOTO statements. An instruction that causes a branch, a branch instruction, can be taken or not taken: if a branch is not taken, the flow of control is unchanged and the next instruction to be executed is the instruction immediately following the current instruction in memory; if taken, the next instruction to be executed is an instruction at some other place in memory. There are two usual forms of branch instruction: a conditional branch that can be either taken or not taken, depending on a condition such as a CPU flag, and an unconditional branch which is always taken.
See also
- Control flow
- Branch delay slot
- Branch predictor
- Branch table
- Indirect branch
- Instruction pipeline
- Spaghetti code
- Conditional (programming)
Wikipedia content modification information:
- This page was last modified on 3 January 2009, at 15:41.
Wikipedia Authorship and Review
Wikipedia content provided here is not reviewed directly by PediaView.com. Wikipedia content is authored by an open community of volunteers and is not produced by or in any way affiliated with PediaView.com.
Wikipedia Usage Guidelines
This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article on "Branch (computer science)".
The URL for this specific entry is:
All Wikipedia text is available under the terms of the GNU Free Documentation License. (See Copyrights for details). Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
