Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualpapalazaru

Posted 16 October 2012 - 01:13 PM

something like this?

Not sure if the logic is correct.

y = 0;
t = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >>= 2;
}

#4papalazaru

Posted 16 October 2012 - 01:12 PM

something like this?

Not sure if the logic is correct.

y = 0;
t = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >> 2;
}

#3papalazaru

Posted 16 October 2012 - 01:12 PM

something like this?

Not sure if the logic is correct.

y = 0;
while(x)
{
	y |= ((x&1) << t);
	t++;
	x >> 2;
}

#2papalazaru

Posted 16 October 2012 - 01:11 PM

something like this?

Not sure if the logic is correct.

[source lang="cpp"]y = 0;while(x){ y |= ((x&1) << t); t++; x >> 2;}[/source]

#1papalazaru

Posted 16 October 2012 - 01:11 PM

something like this?

Not sure if the logic is correct.

[source lang="cpp"]y = 0;while(x){ y |= ((x&1) << t); t++; x >> 2;}[/source]

PARTNERS