> I came across some code, which uses bit operator. I could not understand how > the logic of that code. If anyone knows to convert the decimal into binary > using BIT OPERATOR, then please help me.
please reply to the list, not just me. since this is your homework assignment, i cannot give you the answer, but i will tell you that there are six bit operators (not one): - << left shift - >> right shirt - & bitwise AND - | bitwise OR - ^ bitwise XOR (eXclusive OR) - ~ bit inversion your solution will likely include (at least) one of the shifters and (at least) one of the bitwise operators. good luck! -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor