Skip to content
Related Articles

Related Articles

Arithmetic instructions in AVR microcontroller
  • Last Updated : 18 Sep, 2020

Arithmetic Instructions are the instructions which perform basic arithmetic operations such as addition, subtraction, multiplication, etc. AVR micro-controller has 2 operands which are actually registers that hold the data. The left register is the source register while the right one is the source register.



The following table shows the arithmetic instructions :

InstructionOperandExplanationExample
ADDD, SD = D+ SADD D, S
ADCD, SD = D+ S+ carryADC D, K
SUBD, SD = D- SSUB D, S
SBCD, SD = D- S- carrySBC D, S
MULUnsigned nos.R1= Higher byte of the result

R0= Lower byte of the result

MUL D, S
MULSSigned nos.R1= Higher byte of the result



R0= Lower byte of the result

MULS D, S
MULSUSigned nos. and Unsigned nos.R1= Higher byte of the result

R0= Lower byte of the result

MULSU D, S
INCDD= D+1INC D
DECDD= D-1DEC D

Note : Here D and S stand for Destination and Source respectively.
D and S are registers. There is no instruction for division in AVR.

My Personal Notes arrow_drop_up
Recommended Articles
Page :