SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    (simple ques:) kb vs. mb

    Hi --

    Simple question! How many kilobytes (kb) are in 1 megabyte (mb)? Is it 1,000? 10,000? A million!!? (My math teacher would be embarrassed )

    Thanks!

    --Josh

  2. #2
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    About ~ 1,200

    -Tom
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I'm pretty certain it is 1024

    The sequence is:

    8 bits in a byte
    1024 byes in a kilobyte
    1024 kilobytes in a megabyte
    1024 megabytes in a gigabyte
    and so on.

  4. #4
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys,

    That answers my question!

    --Josh

  5. #5
    SitePoint Wizard
    Join Date
    Sep 1999
    Posts
    1,390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is important to know that KB and MB are reported in different ways. Hard drive manufacturers often report it in 1,000 units. That's why your 25 GB drive (as reported on the box) is actually about 21 GB. Really, it would be about 25,000 kilobytes, which is 21 GB. It is an easy way of making a hard drive seem bigger than it is.

    Make sense?

  6. #6
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That does make sense.

    How about this then: If my web host gives me 350 Mb of space, how many Kb is that?

    Is it 350 mb x 1024 kb = 358,400 kb total?

  7. #7
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by JCary
    That does make sense.

    How about this then: If my web host gives me 350 Mb of space, how many Kb is that?

    Is it 350 mb x 1024 kb = 358,400 kb total?
    Yep, that's right. Just multiply any MB amount by 1024 to get the KB amount.

  8. #8
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad to see that at least some got it (kinda) right. Computers use the Binairy system, which means that you don't end up with 1,000 bytes for one kb, but 1024.

    Consequently, there are 1,048,567 bytes in one MB and 1,037,741,824 bytes in one GB.


    350 MB would thus be 367,001,600 bytes.
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  9. #9
    SitePoint Enthusiast Vpekulas's Avatar
    Join Date
    Mar 2000
    Location
    Winnipeg, Canada
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Elledan
    I'm glad to see that at least some got it (kinda) right. Computers use the Binairy system, which means that you don't end up with 1,000 bytes for one kb, but 1024.

    Consequently, there are 1,048,567 bytes in one MB and 1,037,741,824 bytes in one GB.
    350 MB would thus be 367,001,600 bytes.
    Hypothetically you are right, however Windows for example uses 1000 bytes for a Kilobyte. Don't ask me why, but they always shrink your HDD.
    Vladimir S. Pekulas
    http://www.Europeum.net
    http://wap.Europeum.net

  10. #10
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but the data isn't always stored as complete strings of 1s and 0s. The data is usually sent with header data, footer data parity bits etc..

    ok then - on the spot question,-

    How many Bits in a Nibble?

    that ones really easy

  11. #11
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Vpekulas, Windows correctly uses 1024 according to me.

    Windows is telling me command.com is 93,890 bytes or 91.6 kb.

    It's also telling me my free hard drive space is 180,805,632 bytes or 172Mb

    If windows were incorrectly using 1000, your hard drive space would appear to grow, not shrink, and it would incorrectly tell me I had 180Mb free.

    [There are actually 1,048,576 bytes in a MB, but I'm sure elledan's mistake was only a typo.]
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  12. #12
    SitePoint Wizard
    Join Date
    Sep 1999
    Posts
    1,390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Vpekulas


    Hypothetically you are right, however Windows for example uses 1000 bytes for a Kilobyte. Don't ask me why, but they always shrink your HDD.
    I don't think this is right. Hard Drive companies do this though, and that is why Windows reports a smaller size. I mentioned this in a post earlier in this thread.

  13. #13
    SitePoint Enthusiast Vpekulas's Avatar
    Join Date
    Mar 2000
    Location
    Winnipeg, Canada
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Acctually, I'm running both WindowsME and ReHat 6.2. Widnows reports 1000 bytes and RH reports 1024, same file.
    So I guess it is a question of Windows. It's only what I noticed though.
    Vladimir S. Pekulas
    http://www.Europeum.net
    http://wap.Europeum.net

  14. #14
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sounds like RH is reporting the allocated size, which is the total size when the file is put into 1024 byte clusters.

    In windows, it will tell you both the allocated size and the file size for a file if you right click and go into properties. The "bytes used" is the allocated size.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff


Bookmarks

Posting Permissions

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