Docsity

C Programming: Bit Manipulation Algorithm, Exercises of Microprocessors

Partial preview of the text

Download C Programming: Bit Manipulation Algorithm and more Exercises Microprocessors in PDF only on Docsity!

if((temp>='a') && (temp<='z')) { index=temp - 'a'; bit=arr[index].no - 1; while(bit>=0) { ans=((arr[index].code) & (mask[bit]))>>bit; //for bit extraction PORTB|=1; if(ans=0) { for(loop=1;loop<=dit;++loop); } else if(ans=1) { for(loop=1;loop<=daht;++loop); } PORTB&=0; { for(loop=1;loop<=dit;++loop); } bit = --bit; } //while loop ends } //if loop end

docsity.com