No,I'm using atmega controllers.To be specific atmega 16.N prob is not with manufacturing of ic(whether it is open coll or drain)...I am using another piece of code for same purpose .And that is working properly.It has logical shifting and "AND"ing and "OR"ing.I am not able to figure out what is wrong with the piece of code given above.