The total number of virtual pots is equal to 65537 which is same as the normal integer range
in (-32768 to 32767 ) .Is there some good reason or is it some coincidence ???? ....
Printable View
The total number of virtual pots is equal to 65537 which is same as the normal integer range
in (-32768 to 32767 ) .Is there some good reason or is it some coincidence ???? ....
That is 16 ^ 4, or the largest unsigned integer value of one byte.
It is a common theme on hardware architechtures that use 4-byte integers.
Also, on many systems it is more efficient to use an entire byte than to
use a nibble (2-bytes on many systems), so things tend to get packed
into the integer range of one byte.
If you pay close attention, you'll see this theme repeat itself over and
over again in modern computers for everything from UID numbers to
netmasks, structures/classes for video games, etc.
-- spurious
Computer use the binary system. They had to choose between 256 or 65536 (Not 65537). 256 is too little port!
Well 0 to 65535 to be even more exact, this is the port range [which indeed adds up to 65536 ports]. The reason behind it was already explained... now if we had 65536^2 ports that would've been just a waste :).
Port 0 is not allowed in most operating systems and hence cannot be used by applications.
It's not clear however, whether if you wrote your own OS, using port 0 would be illegal. But it wouldn't be compatible with most other OS.
Slarty
Would such an OS be allowed to connect to the net if it had different services running on different ports?It should considering that port redirection's allowed right?And why isnt it allowed?(yes,I havent googled lol)
there are 65536 virtual ports because sixteen bits are used to identify the port. so you have 2^16 combinations with 16 binary bits.
also, a nybble is two bits, not two bytes ( which would be sixteen bits ).
Quote:
Originally Posted by http://www.allaboutcircuits.com/vol_4/chpt_2/6.html