<PackageReference Include="Microsoft.Bcl.Memory" Version="11.0.0-preview.2.26159.112" />

System.Numerics.BitOperations

static class BitOperations
public static uint RotateLeft(uint value, int offset)

Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.

public static uint RotateRight(uint value, int offset)

Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 instruction ROR.

public static int TrailingZeroCount(uint value)

Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.