[Tutor] First realscript + Game of Life

Luke Paireepinart rabidpoobear at gmail.com
Sat Nov 11 19:48:23 CET 2006


Kent Johnson wrote:
> Luke Paireepinart wrote:
>> I was trying to make it clear that Python wasn't directly accessing 
>> the binary from memory with this function Carlos had.
>> The function just mathematically converted a base-10 number into a 
>> base-2 number.
>
> No. It converts a binary representation of a number into a string 
> representation of the binary representation of the number. There is no 
> base-10 number involved.
Binary is base-2.
Decimal is base-10.
Integers in python are base-10.
Python doesn't give him direct access to the bits in memory.
It gives him a base-10 integer (a decimal number)
he uses a mathematical conversion to go from a decimal integer to a list 
of binary bits.
Do you disagree?
The argument to the function is an integer.
>>
>
>> Anyway, I just wanted to make sure that Carlos knew that python 
>> wasn't directly copying the binary representation from memory into a 
>> list,
>> Python was getting the base-10 integer representation out of the binary, 
>
> No, there is no base-10 representation anywhere in Carlos' program, at 
> least not on any computer he is likely to be using to run the program.
>
>> and then the function converted this back again into base2 using
>> binary shifts.  I.E. the sentence 'copy binary numbers from memory' 
>> made me think Carlos thought the binary was directly copied into a list.
>> I also clarified that it's not a 'module' it's a function.
>>
>> Am I still confused, Kent?
>
> Yes. Maybe someone else can explain better than me?
>
> Kent
>
>



More information about the Tutor mailing list