public static void Main()
Console.Write("Binary deger giriniz: ");
string input = Console.ReadLine();
char[] charArray = input.ToCharArray();
foreach (var item in charArray)
if (item != 49 && item != 48)
Console.WriteLine("Girilen yanlış değer. Deger:{0}", item);
if (!string.IsNullOrEmpty(input) & !flag)
int onTheHand = charArray.Length / 128;
for (int i = charArray.Length % 128 - 1; i >= 0; i--)
V += (UInt64)Math.Pow(2, charArray.Length % 128 - i -1);
Console.WriteLine("Adım sayısı:{0}", onTheHand * 64 + counter);