<DIV>Bill, I am confused, could you explain the first line of code. I can probably then figure out the remaining. all I need to do is find the difference of two binary numbers, converting them to decimal is easy to do. here is the first line of code from the link you sent:</DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=syntaxcomment># bstr_pos: only positive integers</SPAN><BR><SPAN class=syntaxcomment># zero&nbsp;&nbsp;&nbsp;&nbsp; -&gt; ''</SPAN><BR><SPAN class=syntaxcomment># negative -&gt; ''</SPAN><BR><BR>bstr_pos = <SPAN class=syntaxkeyword>lambda</SPAN> n: n&gt;0 <SPAN class=syntaxkeyword>and</SPAN> bstr_pos(n&gt;&gt;1)+str(n&amp;1) <SPAN class=syntaxkeyword>or</SPAN> <SPAN class=syntaxstring>''</SPAN><BR><BR>thanks.</DIV>
<DIV>Jeff<BR><BR><B><I>Bill Mill &lt;bill.mill@gmail.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Jeff,<BR><BR>There isn't a built-in type, but it's fairly easy to do. Have a look<BR>at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/219300 for<BR>some ideas on how to do it. If you don't understand those, ask and<BR>I'll try to clarify them for you.<BR><BR>Peace<BR>Bill Mill<BR>bill.mill at gmail.com<BR><BR><BR>On Mon, 25 Oct 2004 09:09:27 -0700 (PDT), Jeff Peery<BR><JEFFPEERY@YAHOO.COM>wrote:<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Hello, <BR>&gt; <BR>&gt; will python work with binary math? i.e., add subtract binary numbers? is<BR>&gt; there a specific type that I have to use to define a binary number? thanks. <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Jeff <BR>&gt; _______________________________________________<BR>&gt; Tutor maillist - Tutor@python.org<BR>&gt; http://mail.python.org/mailman/listinfo/tutor<BR>&gt; <BR>&gt;
 <BR>&gt;<BR>_______________________________________________<BR>Tutor maillist - Tutor@python.org<BR>http://mail.python.org/mailman/listinfo/tutor<BR></BLOCKQUOTE>