Here is my solution to it:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class CheckABitAtGivenPosition
{
static void Main()
{
int n = int.Parse(Console.ReadLine());
int p = int.Parse(Console.ReadLine());
int nRightp = n >> p;
int bit = nRightp & 1;
bool check = (bit == 1);//by default boolean expressions are set to true
Console.WriteLine(check);
}
}