Exp 6
Exp 6
Exp 6
Experiment 6
Objective
• To learn how to use Boolean operators in assembly language
Introduction to Boolean Operators
• Boolean operators work on a bitwise level between two operands.
• The results are stored in the destination operand.
• Common Boolean operations include:
AND, OR, XOR, NOT, NEG
AND & OR
AND Instruction
•Performs a bitwise AND between two operands.
• Syntax: AND dest, source
Example: AND AL, BL (Result is stored in AL)
OR Instruction
• Performs a bitwise OR between two operands.
• Syntax: OR dest, source
Example: OR AL, BL
XOR, NOT & NEG
XOR Instruction
•Performs a bitwise XOR between two operands.
• Syntax: XOR dest, source
Example: XOR AL, BL (Result is stored in AL)