Rust for Python Developers - Unsigned, Signed Integers and Casting

Shin_O
1,518 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

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
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content