Arithmetic instructions in AVR microcontroller Last Updated : 07 Apr, 2025 Comments Improve Suggest changes Like Article Like Report 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 :InstructionOperandExplanationExampleADDD, SD = D+ SADD D, SADCD, SD = D+ S+ carryADC D, KSUBD, SD = D- SSUB D, SSBCD, SD = D- S- carrySBC D, SMULUnsigned nos.R1= Higher byte of the result R0= Lower byte of the resultMUL D, SMULSSigned nos.R1= Higher byte of the result R0= Lower byte of the resultMULS D, SMULSUSigned nos. and Unsigned nos.R1= Higher byte of the result R0= Lower byte of the resultMULSU D, SINCDD= D+1INC DDECDD= D-1DEC DFeatures of the arithmetic instructions in AVR microcontrollers:Arithmetic operations: AVR microcontrollers support a variety of arithmetic operations, including addition, subtraction, multiplication, and division. These operations can be performed on data stored in registers, and can also involve immediate values or data stored in memory.Data types: AVR microcontrollers support both 8-bit and 16-bit data types, allowing for arithmetic operations to be performed on both bytes and words of data.Overflow detection: AVR microcontrollers provide flags to detect arithmetic overflow, which occurs when the result of an arithmetic operation exceeds the maximum or minimum value that can be stored in a register. This allows for error handling and can be used to prevent unexpected behavior in the program.Conditional instructions: AVR microcontrollers also provide conditional arithmetic instructions, which allow for arithmetic operations to be performed only if certain conditions are met. For example, the branch instructions can be used to jump to a different part of the program depending on the result of a previous arithmetic operation.Bit manipulation: AVR microcontrollers support a variety of instructions for manipulating individual bits within a register, including bitwise AND, OR, and XOR operations. These instructions can be used for tasks such as setting or clearing individual flags in a register.Note : Here D and S stand for Destination and Source respectively. D and S are registers. There is no instruction for division in AVR. Comment More infoAdvertise with us Next Article Arithmetic instructions in AVR microcontroller K kunalsg18elec Follow Improve Article Tags : Electronics Engineering microprocessor Similar Reads Steady State Response In this article, we are going to discuss the steady-state response. We will see what is steady state response in Time domain analysis. We will then discuss some of the standard test signals used in finding the response of a response. We also discuss the first-order response for different signals. We 9 min read Half Wave Rectifier A Half-wave rectifier is an electronic device that is used to convert Alternating current (AC) to Direct current (DC). A half-wave rectifier allows either a positive or negative half-cycle of AC to pass and blocks the other half-cycle. Half-wave rectifier selectively allows only one half-cycle of th 15 min read Architecture of 8085 microprocessor A microprocessor is fabricated on a single integrated circuit (IC) or chip that is used as a central processing unit (CPU).The 8085 microprocessor is an 8-bit microprocessor that was developed by Intel in the mid-1970s. It was widely used in the early days of personal computing and was a popular cho 11 min read Bridge Rectifier In the world of electronics, the bridge rectifier is a component that plays a role, in converting alternating current (AC) to direct current (DC). This article explores the concept of the bridge including how it's constructed how it operates, its benefits and drawbacks different types available, imp 11 min read Number System and Base Conversions Electronic and digital systems use various number systems such as Decimal, Binary, Hexadecimal and Octal, which are essential in computing. Binary (base-2) is the foundation of digital systems.Hexadecimal (base-16) and Octal (base-8) are commonly used to simplify the representation of binary data. T 9 min read 8051 MicroController Architecture For many years, the 8051 microcontroller architecture is vital and important component in embedded systems design due to its common use. Its strong architecture and multiple uses in a variety of industries from consumer electronics to industrial automation are the main causes of its appeal.What is 8 6 min read Boolean Algebra Boolean algebra is a type of algebra that is created by operating the binary system. In the year 1854, George Boole, an English mathematician, proposed this algebra. This is a variant of Aristotle's propositional logic that uses the symbols 0 and 1, or True and False. Boolean algebra is concerned wi 14 min read Programmable peripheral interface 8255 PPI 8255 is a general purpose programmable I/O device designed to interface the CPU with its outside world such as ADC, DAC, keyboard etc. We can program it according to the given condition. It can be used with almost any microprocessor. It consists of three 8-bit bidirectional I/O ports i.e. PORT A 4 min read Pin diagram of 8085 microprocessor The 8085 microprocessor is a popular 8-bit microprocessor developed by Intel. It has 40 pins, each with a specific function for interfacing with memory, input/output devices, and other components.Pin diagram of 8085 microprocessor is shown below: Key Pin Descriptions1. Address Bus and Data BusAddres 5 min read Schmitt Trigger We use Schmitt Triggers in digital electronics. It is used for rejecting the noise from the input signals by using the hysteresis curve. To provide accurate and more stable results, it uses two threshold voltages i.e., upper threshold voltage (VUT) and lower threshold voltage (VLT). It is mainly use 11 min read Like