Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void showBit (unsigned int a)
- {
- unsigned int mask=1;
- int i=0;
- mask<<=sizeof(int)*8-1; //1 ganz nach links
- for (i=0; i<sizeof(int)*8; i++)
- {
- // if ((a&mask)==mask)
- if (a&mask)
- printf ("%c",'1');
- else
- printf ("%c",'0');
- mask >>=1; //eine Stelle nach rechts
- }
- }
- //ganz Wichtig --> Die Zeile ist mir nicht ganz klar!
- mask<<=sizeof(int)*8-1; //1 ganz nach links
- //Warum -1?!
Advertisement
Add Comment
Please, Sign In to add comment