Back
Close

Rust for Python Developers - Unsigned, Signed Integers and Casting

Shin_O
31.5K views

This story was originally published on Medium

Follow me:

4-bit Signed Binary Number Comparison

The following table shows the comparison of three signed number representations.

DecimalSigned MagnitudeSigned Ones' ComplementSigned Two's Complement
+7011101110111
+6011001100110
+5010101010101
+4010001000100
+3001100110011
+2001000100010
+1000100010001
+0000000000000
-010001111-
-1100111101111
-2101011011110
-3101111001101
-4110010111100
-5110110101011
-6111010011010
-7111110001001
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io