Best search algorithm to find condition within a range

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Apr 8 02:49:01 CEST 2015


jonas.thornvall at gmail.com wrote:
> No i don't i say the operations assume base ten other wise INT A=7,B=4
> Calculate C=A+B would not yield 11 as an answer.

The answer, when converted to base 10, will still be
11 regardless of the base in which the arithmetic is
performed.

For example, in base 2:

A = 0111   (decimal 7)
B = 0100   (decimal 4)
     ----
C = 1011

Now convert binary 1011 to decimal and see what
you get.

-- 
Greg



More information about the Python-list mailing list