Back
Close

Rust for Python Developers - Unsigned, Signed Integers and Casting

Shin_O
31.5K views
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.

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