checking if binary numbers are palindromic

hey all, jus need a lil help. ok. got an assignment to make a C program to find all the palindromic primes from 1 to 10000, convert them to binary and chek if the binary representation is palindromic for each, then output only the palindromic primes to a txt file with time stamps.

well i think i kinda have it but cant really code the last part which is taking the binary numbers and cheking if they are palindromic. teacher said we can get it using bitwise operators but i have no idea how to use them to do that. i kno i either hav to compare the first and last digit, then the second and the second to last digit, and so on to see if its a palindrome. or take the number and print it backwards and check if they are ==. so yea i dont kno how to take my binary number which i am already printing and code it to chek if its a palindrome . any help? thanks