manuel wrote: > How to convert a decimal to binary ? def foo(i): b = '' while i > 0: j = i & 1 b = str(j) + b i >>= 1 return b Maybe this is inefficient, but... -Manish -- Manish Jethani (manish.j at gmx.net) phone (work) +91-80-51073488