summaryrefslogtreecommitdiff
path: root/signed.c
diff options
context:
space:
mode:
Diffstat (limited to 'signed.c')
-rw-r--r--signed.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/signed.c b/signed.c
new file mode 100644
index 0000000..050b66f
--- /dev/null
+++ b/signed.c
@@ -0,0 +1,14 @@
+#include <u.h>
+#include <libc.h>
+
+void
+main()
+{
+ int x;
+
+ x = 25;
+ print("n:%d,s:%d\n", x, (x>>31));
+ x *= -1;
+ print("n:%d,s:%d\n", x, (x>>31));
+ exits(0);
+}