Arithmetic Operators in LISP Last Updated : 21 Sep, 2021 Comments Improve Suggest changes Like Article Like Report Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication, and division. There are 7 arithmetic operators in LISP that are listed in the below table: OperatorSyntaxDescriptionAddition Operator(+)+ num1 num2Add the two numbersSubtraction Operator(-)- num1 num2Subtract the second number from the first numberMultiplication(*)* num1 num2Multiply two numbersDivision(/)/ num1 num2Divide the two numbersModulus(mod) mod num1 num2Get the remainder of two numbersIncrement(incf)incf num valueIncrement number by given valueDecrement(decf)decf num valueDecrement number by given value Example 1: LISP Program that demonstrates arithmetic operators Lisp ;set value 1 to 300 ; set value 2 to 600 (setq val1 300) (setq val2 600) ;addition operation (print (+ val1 val2)) ;subtraction operation (print (- val1 val2)) ;multiplication operation (print (* val1 val2)) ;division operation (print (/ val1 val2)) ;modulus operation (print (MOD val1 val2)) ;increment a by 10 (print (incf val1 val2)) ;decrement b by 20 (print (decf val1 val2)) Output: 900 -300 180000 1/2 300 900 300 Example 2: Lisp ;set value 1 to 30 ; set value 2 to 15 (setq val1 30) (setq val2 15) ;addition operation (print (+ val1 val2)) ;subtraction operation (print (- val1 val2)) ;multiplication operation (print (* val1 val2)) ;division operation (print (/ val1 val2)) ;modulus operation (print (MOD val1 val2)) ;increment a by 10 (print (incf val1 val2)) ;decrement b by 20 (print (decf val1 val2)) Output: 45 15 450 2 0 45 30 Comment More infoAdvertise with us Next Article Arithmetic Operators in LISP M manojkumarreddymallidi Follow Improve Article Tags : LISP LISP-Basics Similar Reads Bitwise Operators in LISP In this article, we will discuss the Bitwise operators in LISP. These operators are used to perform the manipulation of individual bits of a number. The truth table for bitwise AND, NAND, OR, XOR, NOR, & XNOR: aba and b a nand ba or b a xor b a nor b a xnor b00010011010111001110100110011100 Dif 4 min read Arithmetic Operations Arithmetic Operations are the basic mathematical operationsâAddition, Subtraction, Multiplication, and Divisionâused for calculations. These operations form the foundation of mathematics and are essential in daily life, such as sharing items, calculating bills, solving time and work problems, and in 9 min read JavaScript Arithmetic Operators JavaScript Arithmetic Operators are the operator that operate upon the numerical values and return a numerical value. Addition (+) OperatorThe addition operator takes two numerical operands and gives their numerical sum. It also concatenates two strings or numbers.JavaScript// Number + Number => 6 min read Arithmetic Operators in Solidity Arithmetic operators are used to perform arithmetic or mathematical operations. Solidity has the following types of arithmetic operators: Addition: The addition operator takes two operands and results in a sum of these operands. It is denoted by +.Subtraction: The subtraction operator takes two oper 2 min read Operators in LISP Operators are the foundation of any programming language. Thus the functionality of the LISP programming language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands. In other words, we can 5 min read Like