# Thread: Binary!!! How do I manage that?

1. It's pointless to do your work for you. You clearly don't want to even learn. You're not trying to understand what's going on in the code. You just want it done for you. This is just begging for a lock.

Quzah.

2. Originally Posted by quzah
It's pointless to do your work for you. You clearly don't want to even learn. You're not trying to understand what's going on in the code. You just want it done for you. This is just begging for a lock.

Quzah.
Fine lock it and make my evening! I don't see what the difference is, I'm tyring to ........ing learn here. Not sure what I'm doing wrong, all you guys are just saying bit this bit that and not actually posting anything useful...

To me bit this bit that is pointless, I already made an online school in perl and JS, not such basic trivial operations confuse me, i'm sorry! gah

3. Code:
`   z = x & d;`
12 & 0 is zero.

So neither of these print, as you coded.
Code:
```      if ( z>0 )
{
printf("1");
}
if ( z<0 )
{
printf("0");
}```
Code:
`      z = z<<1;`
What is 0 left shifted 1?

4. 0 <<1 ;

= 00?

:s

5. Code:
```#include <stdio.h>
#include <conio.h>

void bin_prnt_byte(int x);

void main(void)
{
clrscr();
bin_prnt_byte(0xc);
printf("\n");
}

void bin_prnt_byte(int x)
{
int n;
for(n=0; n<8; n++)
{
if((x & 0x80) !=0)
{
printf("1");
}
else
{
printf("0");
}
if (n==3)
{
printf(" "); /* insert a space between nybbles */
}
x = x<<1;
}
}```