Unable to figure out what could be wrong

Hi
I am getting wrong output even for positive numbers.

#include
using namespace std;

int main()
{
int n;
cin>>n;
long long int no;//1
for(int i=1;i<=n;i++){
int rem;
int pow=0;
int s=0;
cin>>no;
while(no>0)
{
rem=no%10;
s=s+(rem*(2^pow));
pow++;
no=no/10;
}
cout<<s<<endl;
}
return 0;
}

Hello @rbak what is the error that you are getting?

I am getting wrong output.

@rbak this is the correct code :

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.