ADD

ADD (Addition) operator:

Name of the operator

The "ADD" (Addition) operator is used in programming languages to add two register or to add a value to a specified destination.

Syntax

ADD RX, Y

Where :

  • RX: Represents the destination register where the value will be moved.

  • Y: Represents the source register or immediate value that will be added to the destination register.

Usage

  • Addition of Register Values:

    ADD R1, R2
    • Detail: This example demonstrates the addition of the values in registers R1 and R2. The result is stored in register R1.

  • Addition of Immediate Value:

    ADD R3, #10
    • Detail: This code adds the immediate value 10 to the contents of register R3. The result is stored back in register R3.

Last updated