https://developerpublish.com/how-to-find-if-an-integer-is-a-power-of-2-in-c/
How to Find if an Integer is a Power of 2 in C# ?