hi, 
 
>>> bin(0xff0)
'111111110000'
>>> bin(0xff1)
'111111110001'
>>> a=bin(0xff0)+bin(0xff1)
>>> a
'111111110000111111110001'
>>> b=0xff0
>>> c=0xff1
>>> d=b+c
>>> d
8161
>>> bin(d)
'1111111100001'
 
question: 
1) why is it that a and d values are different? i'm using Python 2.5. 
2) how to convert hex to bin in Python 2.5?
 
 
thanks
tcl                                       
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to