Matt Riddell wrote:

Chee Foong wrote:
i guess may be it's a 64bit variable. so you can only use 0-63.

LOL!!!!

Bits work like this

[128][64][32][16][8][4][2][1]

So, you have a whole lot of bits, each one moving from right to left inceases
a power of 2.  Say you wanted to represent 10, then you would turn on the 8
and the 2 (8+2=10) so the binary representation (for an 8 bit variable) would 
be:

00001010

So, from that you can see that you could get from 0-255 in 8 bits.

If however you wanted the number to be able to go negative as well then you
would use one of the bits to determine the sign (i.e. +/-)

That would give you possible values between -127 and +127.

So, a max value of 63 would either indicate a signed 7 bit variable (dunno
where the other one went) or an unsigned 6 bit variable.

But I am on the other side of the equator from you!

Should I move from left to right or should I reverse the polarity to get the same results?

_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to