Determine if the bit positions are equal

Take input as n,p1,p2 and determine if n's bit positions at p1 and p2
are equal (changing n to base-2), output will be true or false.