What do the logical operators AND, OR, XOR and NOT do?

AND (both conditions on either side of the AND operation MUST be satisfied for the IF function to work)
OR (either condition on each side of the OR operation MUST be satisfied for the IF function to work)
NOT (used when something needs to be displayed UNLESS a value is a certain amount/type/name etc.)
XOR (used when exclusively ONE of the conditions has to be met – not both! This is where XOR and OR differ.)

CD

Related Computing A Level answers

All answers ▸

Why indentation is important in Python and what is the scope of a global variable?


How does a HDD (Hard drive disk) work?


Why are bit patterns often displayed in hexadecimal notation instead of binary notation?


What is the denary equivalent of the hexadecimal number A7?