summaryrefslogtreecommitdiff
path: root/bitwise-operator-tests.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-21 18:08:30 +0200
committerOskar <[email protected]>2024-08-21 18:08:30 +0200
commite747f69eb9b34f2c99472ca1cd17e049c1b74c9c (patch)
treebf082a6c2a00f29cdc81f5a2b9b1699c94eb1128 /bitwise-operator-tests.cpp
parent5562f3eb30418f33ba2d2b4634e8d7a2f5d49dc5 (diff)
more
Diffstat (limited to 'bitwise-operator-tests.cpp')
-rw-r--r--bitwise-operator-tests.cpp6
1 files changed, 6 insertions, 0 deletions
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() {