Skip to content

Instantly share code, notes, and snippets.

@rpivo
Last active September 18, 2021 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpivo/48464b9fd51c30ea8d81dd0fb8db671b to your computer and use it in GitHub Desktop.
Save rpivo/48464b9fd51c30ea8d81dd0fb8db671b to your computer and use it in GitHub Desktop.
The Left Shift Operator in Rust

The Left Shift Operator in Rust

Quoted from Tutorialspoint:

It moves all the bits in its first operand to the left by the number of places specified in the second operand. New bits are filled with zeros. Shifting a value left by one position is equivalent to multiplying it by 2, shifting two positions is equivalent to multiplying by 4, and so on.

Related Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment