summaryrefslogtreecommitdiff
path: root/4p25.cpp
diff options
context:
space:
mode:
Diffstat (limited to '4p25.cpp')
-rw-r--r--4p25.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/4p25.cpp b/4p25.cpp
new file mode 100644
index 0000000..22070d3
--- /dev/null
+++ b/4p25.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+
+/*
+ *
+ * 4.25
+ *
+ *
+ */
+
+int main () {
+
+ /*
+
+ 01110001 (q)
+ NOT
+ 11111111 11111111 11111111 10001110
+ << 6
+ 11111111 11111111 11100011 10000000 (my own calculations)
+ 11111111 11111111 11100011 10000000 (output from gdb, added spaces)
+ (seems correct!)
+ */
+
+ // Quick little test where we can examine with GDB if i did it correctly.
+ int8_t ch = 0b01110001;
+ int32_t cf = ~ch << 6;
+ std::cout << cf << std::endl;
+ return 0;
+}