ch=234;//I HAVE THIS NUMBER WHOSE TWO NIBBLES ARE TO BE EXCHANGED//
num=cp=ch;
ch=(ch & 0x0f);//MASK UPPER 4 BITS OF NUMBER BY 0..//
ch=ch<<4;//MAKE LOWER 4 BITS TO UPPER 4 BY 4 RIGHT SHIFT...//
cp=(cp & 0xf0);//MASK LOWER 4 BITS TO 0
cp=cp>>4;//SHIFT UPPER 4 BITS TO LOWER 4 IN MAKING 4 RIGHT SHIFT //
num=ch | cp;//MAKE OR CP TO CH//MEANS ORIGINALLY UPPER 4 BITS BECAME LOWER ONE& ORIGIONALLY LOWER 4 BITS BECAME UPPER ONE//NOW I GET NEED TO THIS REVERSED NIBBLE TO PRINT IN BINARY//
while(num!=0)
{
//printf("num=%d\n",num);
//byt[i]=byt[i]*10;//byt[i]=0 *10=0/////
byt[i]=byt[i]|(num%2);//everytime when i found remainder....%2 ==0 or 1 ...that remainder is ored by byt[i]..... to make that number as byt[i]...//so everytime remainder is lefting in byt[] array..//
printf("byt[%d]=%d\n",i,byt[i]);
num=num/2;//SO DIVIDE NUMBER BY 2 EVERYTIME ...//
i++;//INCREMENT i ...everytime ..in to put the ,value in byt ...means in binary number..//
}
for(j=(i-1);j>=0;j--)//represent that remainder array in reverse order to print proper binary order..//