Results 1 to 7 of 7

Thread: 65k ports ?

  1. #1
    Junior Member
    Join Date
    Jul 2004

    65k ports ?

    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 ???? ....

  2. #2
    Senior Member
    Join Date
    Mar 2003
    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
    Get OpenSolaris http://www.opensolaris.org/

  3. #3
    AO French Antique News Whore
    Join Date
    Aug 2001
    Computer use the binary system. They had to choose between 256 or 65536 (Not 65537). 256 is too little port!
    -Simon \"SDK\"

  4. #4
    Senior Member
    Join Date
    Jul 2003
    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 .

  5. #5
    Senior Member
    Join Date
    Jan 2002
    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.


  6. #6
    Senior Member therenegade's Avatar
    Join Date
    Apr 2003
    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)

  7. #7
    Senior Member
    Join Date
    Jun 2002
    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
    Bit: A single, bivalent unit of binary notation. Equivalent to a decimal "digit."
    Crumb, Tydbit, or Tayste: Two bits.
    Nibble, or Nybble: Four bits.
    Nickle: Five bits.
    Byte: Eight bits.
    Deckle: Ten bits.
    Playte: Sixteen bits.
    Dynner: Thirty-two bits.
    Word: (system dependent).
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts