[Tutor] bin to dec conversion puzzlement
Alan Gauld
alan.gauld at btinternet.com
Mon Apr 20 19:14:33 CEST 2015
On 20/04/15 17:58, Alex Kleider wrote:
>> The key is that the result gets multiplied by 2 each time
>> so for an N bit number the leftmost digit winds up being
>> effectively 2**N, which is what you want.
>
> Shouldn't that be 2**(N-1)?
Yes, sorry.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list