[Tutor] difference between signed integers and unsigned integers

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Wed Jan 21 11:43:21 EST 2004


hi Hameed,

Signed integers have one bit allocated to indicate whether the value is
positive or negative.  Unsigned integers do not.  The difference between
them is in certain languages with data types of a specific size, an
unsigned data type can hold more combinations than a signed value.  If
you think of a byte as eight switches, each with the on or off showing,
then a signed byte will have only 7 boxes to store values, as opposed to
the unsigned byte which will have 8 boxes.

I hope that helps you.

On Wed, 21 Jan 2004, Hameed Khan wrote:

> Hi,
>   i know my question is not directly related to
> python. but i just have started the programming in
> python. so i am not a profesional programmer or an
> expert. and i am only subscribed to the python's
> mailing lists. thats why i am asking this question on
> this list. i want to know what are signed and unsigned
> integers and what is the difference between them.
>
> Thanks,
> Hameed Khan
>
> =====
> _____________________
>  Hameed Ullah Khan
>
> *Try not to become a man of success but rather to become a man of value.*
> Albert Einstein
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>




More information about the Tutor mailing list