BitArray class manages a array of bit values, which are represented as Booleans, where true indicates bit is 1 and false indicates bit is 0. This class is contained in namespace, System.Collections. BitArray.RightShift(Int32) method is used to shift the bits of the bit array to the right by one position and adds zeros on the shifted position. Original BitArray object will be modified on performing the operation right shift.
Syntax: public System.Collections.BitArray RightShift (int count);
count is an immutable value type that represents signed integers with values that range from negative 2,147,483,648 through positive 2,147,483,647.
Return value : It returns Bit Array.
Example 1: Suppose we have the bit array 10011 we want to shift it right by two positions.
The final result is 00100.
False False True False False
Example 2: Suppose we have the bit array 100011 we want to shift it right by three positions.
The final result is 011000.
False True True False False False
- MathF.Tan() Method in C# with Examples
- MathF.Cos() Method in C# with Examples
- MathF.Pow() Method in C# with Examples
- MathF.Log() Method in C# with Examples
- MathF.Exp() Method in C# with Examples
- MathF.Abs() Method in C# with Examples
- MathF.Sin() Method in C# with Examples
- MathF.Max() Method in C# with Examples
- MathF.Min() Method in C# with Examples
- UInt16.GetHashCode Method in C# with Examples
- Graphics.Clear() Method in C# with Examples
- Int64.Equals Method in C# with Examples
- CopyOnWriteArrayList set() method in Java with Examples
- C# | Char.GetHashCode() Method with Examples
- C# | Char.GetTypeCode() Method with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.