A számítástechnika alapjai

A logikai műveletek szabályai

A and 1 = A
A or 1 = 1
A and not A = 0
A and B = B and A
A and (A or B) = A

A and 0 = 0
A or 0 = A
A or not A = 1
A or B = B or A
A or (A and B) = A

A and (B and C) = (A and B) and C
A or (B or C) = (A or B) or C
not (A and B) = not A or not B
not (A or B) = not A and not B
not (not A) = A

A nand B = not (A and B)
A nor B = not (A or B)
A xor B = (A or B) and not (A and B)

A logikai kifejezés végrehajtási sorrendje

Zárójelek figyelembevételével (ha van)
Végrehajtási sorrend:

NEM,
ÉS,
VAGY
Balról jobbra szabály