Results 1 to 8 of 8

Thread: Confused

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    12

    Exclamation Confused

    This question isn't approopriate for the forum, but this seems a logical place for smart people to give a reply...


    The Magic Number for computers seems to be 255.
    FF converted to dec is 255
    0-F to Dec is 16
    Array (O-F):
    0 1 . F
    1
    .
    F

    thats a 16 by 16 grid.
    16 * 16 = 256
    RAM Comes in 256 increments

    Where does the extra 1 from FF to 256 come in???

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Confused

    Moved to General Developer

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Confused

    There are 256 numbers between 0 and 255. If you use an 8 bit byte, with all bits turned off 0000 0000, the value is 0, but if you turn on all the bits 1111 1111, the value is 256 (or 2^8). (2^16 = 65536, or 64K)

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Confused

    Quote Originally Posted by dglienna
    There are 256 numbers between 0 and 255. If you use an 8 bit byte, with all bits turned off 0000 0000, the value is 0, but if you turn on all the bits 1111 1111, the value is 256 (or 2^8). (2^16 = 65536, or 64K)
    Last I heard, 1111 1111 has the value 255, not 256. Otherwise that's about it.
    My usual boring signature: Nothing

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Confused

    dg got a little carried away with that explanation

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: Confused

    You could just say, the short answer is you have to count zero. In your 2D array, you have to count 0,0. The number of positions range from 00 to FF. FF is 255, which is the 256th possible combination.

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    12

    Re: Confused

    Thanks

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Confused

    Oops. Using CALC. Forgot to subtract 1 from both exponential calcs. Logic over-ridden

Posting Permissions

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



Click Here to Expand Forum to Full Width