Thread: 8-bit, 16-bit, 32-bit, bytes

Results 1 to 9 of 9
  1. #1 8-bit, 16-bit, 32-bit, bytes 
    Endeavor

    Mikey`'s Avatar
    Join Date
    Dec 2007
    Posts
    4,434
    Thanks given
    715
    Thanks received
    1,435
    Rep Power
    1202
    I've always seen bytes and bit groupings such as the ones in the thread name. But I've never actually understood what they are or what they mean. I'm sure they have something to do with memory maybe.

    Can someone explain to me how they are used and what they are.

    Thanks.
    Reply With Quote  
     

  2. #2  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,746
    Thanks given
    354
    Thanks received
    1,370
    Rep Power
    3032
    well they describe the size in respect to the average amount of bits and bites an ideal toddler would require to eat said data. as an example, an int is 4 bites; this means, typically, a toddler will require about 4 bites to eat an integer. an int is also 64 nibbles, which, similarly, means that the toddler would need to nibble at the object about 64 times.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    Reply With Quote  
     

  4. #4  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,746
    Thanks given
    354
    Thanks received
    1,370
    Rep Power
    3032
    Quote Originally Posted by Colby View Post
    stop spreading slander you noob
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    Quote Originally Posted by super_ View Post
    stop spreading slander you noob
    lolwut?
    Reply With Quote  
     

  6. #6  
    Registered Member D4NyZ's Avatar
    Join Date
    Sep 2008
    Age
    28
    Posts
    664
    Thanks given
    50
    Thanks received
    10
    Rep Power
    30
    Quote Originally Posted by super_ View Post
    stop spreading slander you noob
    but he is right, 2^32 - 1
    Spoiler for Retard below:

    Quote Originally Posted by dani_gonzales View Post
    dany i know u hate me because i am better then u,,,so stfu noob and stop spaming my posts or i conntact a moderator!

    Reply With Quote  
     

  7. #7  
    ¯̿ ̿|̿ ̿ |̶ ̶ ̶ ̶| |̶͇̿ ̶͇̿ ͇̿ Haskelle

    Join Date
    Nov 2007
    Age
    29
    Posts
    1,227
    Thanks given
    329
    Thanks received
    517
    Rep Power
    1133
    everything in a computer is seen as 0s and 1s.. so called bits...

    a pair of 8 bits is what we call a byte..

    so

    1 byte = 8 bit ( 00000000 to 11111111) = 0 to 2^8 = 0 - 256

    1 short = 2 byte = 16 bit(00000000 00000000 to 11111111 11111111) = 0 to 2^16 = 0 to 65536

    1 int = 4 byte = 32 bit(00000000 00000000 00000000 000000 to 11111111 11111111 11111111 11111111) = 0 to 2^32 = 0 to 4294967296

    1 long = 8 byte = 64 bit ( too long to type lol ) = 0 to 2^64 = 0 to 18446744073709551616


    this is for unsigned values... ( 0 to maximum) in java we use signed values

    these go from -(maximum/2) to +(maximum/2)

    for example:

    1 java byte (signed) = -127 to +128
    Monads are just Monoids in the category of Endofunctors. What is the problem?
    Costate Comonad Coalgebra is equivalent of Java's member variable update technology for haskell. Problem?
    Reply With Quote  
     

  8. #8  
    Community Veteran


    Join Date
    Jan 2008
    Posts
    2,659
    Thanks given
    494
    Thanks received
    627
    Rep Power
    980
    @Arian Rock
    11111111 != 256 but rather 255.

    Same with your other theories; for unsigned it's 0 to 2^n-1, and for signed it's −(2^n−1) to (2^n−1)−1.
    ~iKilem
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    Quote Originally Posted by d4nyz View Post
    but he is right, 2^32 - 1
    2^31 - 1
    2^31=2147483648
    2^32=4294967296
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

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