From e747f69eb9b34f2c99472ca1cd17e049c1b74c9c Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 21 Aug 2024 18:08:30 +0200 Subject: more --- bitwise-operator-tests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitwise-operator-tests.cpp') diff --git a/bitwise-operator-tests.cpp b/bitwise-operator-tests.cpp index 110d52e..8bfac1c 100644 --- a/bitwise-operator-tests.cpp +++ b/bitwise-operator-tests.cpp @@ -50,6 +50,12 @@ result of Quiz1 AND NOT(1UL << 27): 00000000 01100000 00010000 11100000 ------------------------------------------------------------------------------------------------------------------------- + +NOT(~) --- Inverts the operand +AND(&) --- If both operands contains 1 then it stays 1. Anything else becomes 0. +OR(|) --- If one or both of the operands have 1 then it becomes 1. Anything else becomes 0. +XOR(^) --- Turn to one if one operand has 1. If both have 1, or if both have 0 then turn to 0. + */ void cin_clear() { -- cgit v1.2.3