# `j`

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md) › [Instructions](https://asm-editor.specy.app/documentation/mips/instruction.md)

Web page: https://asm-editor.specy.app/documentation/mips/instruction/j

**Jump**

Category: Control flow

Jumps unconditionally to label, which must lie in the same 256 MB region as the instruction after the jump.

Used in: [Branch on compare](https://asm-editor.specy.app/learn/courses/mips/think-in-assembly/branch-on-compare.md) (MIPS assembly), [Loops](https://asm-editor.specy.app/learn/courses/mips/think-in-assembly/loops.md) (MIPS assembly), [Arrays and strings](https://asm-editor.specy.app/learn/courses/mips/think-in-assembly/arrays-and-strings.md) (MIPS assembly), [Floating point and Coprocessor 1](https://asm-editor.specy.app/learn/courses/mips/think-in-assembly/floating-point-and-coprocessor-1.md) (MIPS assembly), [The bitmap display and keyboard registers](https://asm-editor.specy.app/learn/courses/mips/talking-to-the-outside-world/the-bitmap-display-and-the-keyboard.md) (MIPS assembly), [Maximum and unsigned distance](https://asm-editor.specy.app/learn/courses/mips/examples/if-else.md) (MIPS assembly), [Sum of an array](https://asm-editor.specy.app/learn/courses/mips/examples/sum-of-an-array.md) (MIPS assembly), [Byte length of a string](https://asm-editor.specy.app/learn/courses/mips/examples/string-length.md) (MIPS assembly), [Reverse a string in place](https://asm-editor.specy.app/learn/courses/mips/examples/reverse-a-string.md) (MIPS assembly), [A subroutine with its arguments in registers](https://asm-editor.specy.app/learn/courses/mips/examples/subroutine-with-register-arguments.md) (MIPS assembly)

## Forms

- `j label`

## Operands

- `label`: A named address in the program, such as the start of a loop or a variable in `.data`.

## Description

The destination is encoded as a 26-bit word address; the upper 4 bits of PC are combined with this value, so the target must be in the same 256 MB region as the instruction following the jump.

## Example

```mips
# j transfers to a local target. Inspect $t2: it is 2 at the target.
li $t2, 0
j target
li $t2, 1
target: li $t2, 2
```
