Branch Definition

Branch

Branch (in a computer program) — an instruction in a computer, which a user may input, by which a computer will start the execution of some other sequence of instructions. Thus, deviating from its standard job of executing statements one by one. The branch, therefore, takes an important role in controlling the flow of execution of the computer program since it allows the execution of the instruction in a non-linear fashion as based on the pre-defined conditions and criteria.

Another interpretation in this context of instruction set architectures is a switch in execution to another instruction sequence on account of an execution of a branch instruction. Thus, branch instructions provide for the implementation of control flow in program loops and conditionals, such that those conditions are met under which in practice the program implements some particular sequence of instructions.

In addition, these branch instructions are sometimes further divided into a more general classification of two groups, unconditional branches and conditional branches. That is to say, there would always be a jump in the flow of control in the case of an unconditional branch while in the case of a conditional branch, this would be or would not be there according to some condition.

Else, one may express some logic without branches or with fewer branches. More often, one may use bitwise operations, conditional moves, or other predication instead of branches. In cryptography, such branch-less code is a must due to timing attacksю