summaryrefslogtreecommitdiff
path: root/4p27.cpp
diff options
context:
space:
mode:
Diffstat (limited to '4p27.cpp')
-rw-r--r--4p27.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/4p27.cpp b/4p27.cpp
new file mode 100644
index 0000000..de8fb47
--- /dev/null
+++ b/4p27.cpp
@@ -0,0 +1,30 @@
+#include <iostream>
+
+/*
+ *
+ * 4.27
+ *
+ *
+ */
+
+int main () {
+
+ uint32_t ul1 = 3;
+ uint32_t ul2 = 7;
+
+ // 00000011 (ul1)
+ // 00000111 (ul2)
+ /*
+ ul1 AND ul2:
+ 00000011
+
+ ul1 OR ul2
+ 00000111
+ */
+
+ std::cout << (ul1 & ul2) << std::endl; // 3
+ std::cout << (ul1 | ul2) << std::endl; // 7
+ std::cout << (ul1 && ul2) << std::endl; // 1 (true)
+ std::cout << (ul1 || ul2) << std::endl; // 1 (true)
+ return 0;
+}