A Sign Of Wierdness
Iced_Eagle
Borg Engineer Join Date: 2003-03-02 Member: 14218Members
<div class="IPBDescription">kind of offtopic</div> ummm this is random but to let you know that the NS v1.1 info thread and the Bot info thread as of when i posted had exactly the same view ammount. wierd aint it??? is it a sign that 1.1 is coming soon??? O THE SIGNS ARE COMING!!! the threads both had a count of 32767 and its the 2 webbed at top <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> very random but deserves mention
Comments
Mudblood.
I dont think that is a coincidence becuse losts of limits in programing tend to be 2 to the power of somehting
I dont think that is a coincidence becuse losts of limits in programing tend to be 2 to the power of somehting <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
if i remember corectly its really
2^16 = 65536/2=32768 (half for positive, half for negative)
once again thou it has been a while since my last cs class (thats computer science, not counter strike)
EDIT: I'm a programmer and in school currently (APCS). So hopefully I know what I'm talking about or I flunked the AP exam and I'll have to redo this in college. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
EDIT: I'm a programmer and in school currently (APCS). So hopefully I know what I'm talking about or I flunked the AP exam and I'll have to redo this in college. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Most <b>int</b> are now considered as 32 bits (On Windows, an integer can hit 2 billion. 32 bit signed), not to mention the unsigned version.
That probably is a signed short. 16 bits signed.
Weird thing is php 4.0 doesn't support short as a primitive type. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
2^16 = 65536/2=32768 (half for positive, half for negative) <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Thats correct actually, it's unlikely to be 2^15 -1 as computers work better if the number of bits are easily divisible by 8 (8 bits in a byte). And the reason we use half for negative and half for positive is two fold
1) Having a whole bit donating negative or positive is a waste of memory (before the programmers here say any thing, I know twos complement still gives this effect but thats kinda indirectly)
2) The maths is much easier to do when using half for negative and the other half for positive.
programming is an art form... (apparently) its good!!! create what you want when you want. you should check it out seriously. even if its just HTML which you can learn in half an hour (the basics and some
advanced)
[edit] too many u's instead of you's [/edit]
2^16 = 65536/2=32768 (half for positive, half for negative) <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Thats correct actually, it's unlikely to be 2^15 -1 as computers work better if the number of bits are easily divisible by 8 (8 bits in a byte). And the reason we use half for negative and half for positive is two fold
1) Having a whole bit donating negative or positive is a waste of memory (before the programmers here say any thing, I know twos complement still gives this effect but thats kinda indirectly)
2) The maths is much easier to do when using half for negative and the other half for positive. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Actually it is 2^x - 1 because 0 is counted.
Bots For Ns: 643
Ns 1.1 Info: 64
**hears whisperings of a nameless fear**
It depends on the langage you are using. In Java "int" is a 32-bits signed number. The maximal positive number is (2^31)-1=2'147'483'647.
HTML is not a programming langage. As far as I know, it is only used for the presentation of a web page <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->.
HTML = Hyper-Text Markup Language.... But yeah, I don't consider it a language, even though I write all of my websites in Notepad and Pico...
And on another note...
2-byte unsigned integer = 0..65535
2-byte signed integer = -32768..32767
How to count in two's complement:
0, 1, 2, ... 32766, 32767, -32768, -32767, -32766, ... , -3, -2, -1, OVERFLOW