Logical Operators in LISP Last Updated : 22 Oct, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Common LISP supports 3 types of logical operators on Boolean Values. The arguments of these operators are evaluated conditionally, therefore they are also part of the LISP control Structure. The common LISP operators are listed below in the table: OperatorSyntaxDescriptionandand number1 number2This operator takes two numbers which are evaluated left to right. If all numbers evaluate to non-nil, then the value of the last number is returned. Otherwise, nil is returned.oror number1 number2This operator takes two numbers which are evaluated left to right. If any one number evaluates to non-nil, then the value of the last number is returned. Otherwise, nil is returned.notnot numberThis operator takes one number and returns T(true) if the argument evaluates to NIL Example: LISP Program that demonstrates Logical operators on numbers Lisp ;set value 1 to 50 ; set value 2 to 50 (setq val1 50) (setq val2 50) ;and operator (print (and val1 val2)) ;or operator (print (or val1 val2)) ;not operator with value1 (print (not val1)) ;not operator with value2 (print (not val2)) Output: 50 50 NIL NIL Example 2: LISP Program to demonstrate Logical operators on Boolean values Lisp ;set value 1 to T ; set value 2 to NIL (setq val1 T) (setq val2 NIL) ;and operator (print (and val1 val2)) ;or operator (print (or val1 val2)) ;not operator with value1 (print (not val1)) ;not operator with value2 (print (not val2)) Output: NIL T NIL T Comment More infoAdvertise with us Next Article Logical Operators in LISP M manojkumarreddymallidi Follow Improve Article Tags : LISP LISP-Control-Structures Similar Reads 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 Logical Operators in Solidity Logical Operators are used to combining two or more conditions. Solidity has the following types of logical operators: Logical AND: Logical AND takes two operands and gives the valid Boolean result. The logical AND operator evaluates to true when all the operands are true (non-zero) otherwise false( 2 min read Logical Operators in Programming Logical Operators are essential components of programming languages that allow developers to perform logical operations on boolean values. These operators enable developers to make decisions, control program flow, and evaluate conditions based on the truthiness or falsiness of expressions. In this a 3 min read 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 Loops in LISP Loops allow executing a set of instructions repeatedly while some condition is true. LISP provides the following types of loops: 1. dotimes loop: The dotimes loop allows executing instructions for a fixed number of times.Syntax: (dotimes( variableName numberOfIterations ) ( expressions )) Where, va 4 min read Like