Rust for Python Developers - Unsigned, Signed Integers and Casting

Shin_O
1,920 views

Open Source Your Knowledge, Become a Contributor

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

Create Content
Previous: 4-bit Signed Binary Number Comparison Next: Casting in Rust

This story was originally published on Medium

Follow me:

Rust signed two’s complement integer types

Now let’s compare negative numbers of signed two’s complement from the above table (from -1 to -7) to Rust’s signed integers.

They are exactly the same except Rust uses the default 32-bit. Rust’s signed integer types are called the signed two’s complement integer types.

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content