# Boolean (logical) operators
Logical operators can only be used with arguments that can be evaluated to a boolean. The result of a logical operation is a boolean. The following table shows the logical operators that are available in AL.
## Boolean operators
As the following table shows, the not operator is a unary prefix operator. This means that it takes only one argument and is placed in front of the argument. The and, or, and xor operators are binary infix operators; they take two arguments and are placed between the corresponding arguments.
Operator|Name|Expression|Resulting data type
not|Logical negation|not bool|Boolean
and|Logical and|bool1 and bool2|Boolean
or|Logical or|bool1 or bool2|Boolean
xor|Exclusive logical or|bool1 xor bool2|Boolean
## Related information
devenv-al-operators
devenv-al-arithmetic-operators
devenv-al-relational-operators

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-boolean-operators, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-al-boolean-operators/
