Monday, October 12, 2015

write a prgram for to find x^n(x to power of n) using bitwise operators only

int rev(unsigned int byte)
{
unsigned int temp1=0;
unsigned int temp2=0;
unsigned int count=0;
int i;
for(i=0;i<=7;i++)
{
temp1=byte&127;
if(temp1)
{
temp2=temp1|cnt;
}
count=count<<1;
byte=byte<<1;
}
void main()
{
printf("reversse its=%d\n",rev(130));
}

No comments:

Post a Comment

Contributors

Translate