Author Topic: Kilobyte  (Read 9024 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: nl
Kilobyte
« on: August 31, 2019, 01:35:01 pm »
Kilobyte 1000 or 1024 ?
How do i create a poll.

Google start spitting out wrong answers.
Because it was so confusing they made it 1000, now it is really confusing.

I vote 1024
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 1917
  • Country: be
    • Freelance Hardware Engineer
Re: Kilobyte
« Reply #1 on: August 31, 2019, 01:38:30 pm »
There's no vote. A Kilobyte is 1024 bytes.
 
The following users thanked this post: Psi, Jan Audio, magic

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 6512
  • Country: gb
Re: Kilobyte
« Reply #2 on: August 31, 2019, 01:41:42 pm »
A kilo- is 1000. Please do not arbitrarily redefine systems which existed long before your use case.
 
The following users thanked this post: rs20

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4624
  • Country: au
  • Question Everything... Except This Statement
Re: Kibibyte
« Reply #3 on: August 31, 2019, 01:46:48 pm »
Kilobyte is 1000, Kibibyte is 1024, and formatted capacities suck
« Last Edit: September 07, 2019, 04:20:10 am by Rerouter »
 
The following users thanked this post: Dave, rs20, Marco1971

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 1917
  • Country: be
    • Freelance Hardware Engineer
Re: Kilobyte
« Reply #4 on: August 31, 2019, 01:49:06 pm »
I think I'll go crawl under a rock or something. So, uhm, there's kebibyte and mebibyte and... I've been wrong for 20 years?  :palm:

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 3517
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Kilobyte
« Reply #5 on: August 31, 2019, 01:49:31 pm »
KibiByte, 1024
KiloByte, 1000

Hard disk KB is KiloByte.
External Memory KB is KiloByte, or even Kb which is KiloBit.
Microcontroller KB is KibiByte.
Data speed KB is KibiByte, or Kb for KiloBit.

It’s a problem.
 
The following users thanked this post: vk6zgo

Offline madires

  • Super Contributor
  • ***
  • Posts: 5331
  • Country: de
  • A qualified hobbyist ;)
Re: Kilobyte
« Reply #6 on: August 31, 2019, 01:50:20 pm »
1024 bytes = 1 KiB (kibibyte) >:D

It depends on the standard used. For IEC it's 1kB = 1000 bytes, and for JEDEC it's 1kB = 1024 bytes.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 6851
  • Country: 00
  • +++ ATH1
Re: Kilobyte
« Reply #7 on: August 31, 2019, 01:59:18 pm »
C'mon, don't be so stingy, its only 24 bytes out of 1.000, thats still plenty.  :-DD

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: nl
Re: Kilobyte
« Reply #8 on: August 31, 2019, 02:01:33 pm »
Humans have 10 fingers, then 1000 is ok.
Robots has 8 fingers, it is 1024.
 
The following users thanked this post: SL4P

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4624
  • Country: au
  • Question Everything... Except This Statement
Re: Kilobyte
« Reply #9 on: August 31, 2019, 02:03:44 pm »
24 bytes out of 1,000 (2.4%)
48576 bytes out of 1,000,000 (4.9%)
73741824 bytes out of 1,000,000,000 (7.4%)
99511627776 bytes out of 1,000,000,000,000 (10%)

Seems the more you buy the more they screw you over
Says the guy with 100+TB's of storage....
« Last Edit: August 31, 2019, 02:07:18 pm by Rerouter »
 
The following users thanked this post: amyk

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: nl
Re: Kilobyte
« Reply #10 on: August 31, 2019, 02:11:45 pm »
Yes it must be introduced by commercial humans.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1380
  • Country: gb
Re: Kilobyte
« Reply #11 on: August 31, 2019, 02:29:26 pm »
I never  knew it is called kibibyte.

Yes, in computing world kB is 1024 (kibibyte)
For other people (marketing of hdd) kilobyte is 1000 bytes

Hence the confusion.
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: nl
Re: Kilobyte
« Reply #12 on: August 31, 2019, 03:14:30 pm »
Or what about this one : mebibit.
Are they serious : a maybebit.
Just fire them persons.

A kilo- is 1000. Please do not arbitrarily redefine systems which existed long before your use case.

It has always been 1024 per kilobyte, so why redefine system.
Those who changed it are non-digital persons,
i bet they could not evade computers any longer, since you cant live without no more.
They started using computers and then changing things ?
Lets not use the new system please, its to confusing.
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 6512
  • Country: gb
Re: Kilobyte
« Reply #13 on: August 31, 2019, 03:29:59 pm »
A kilo- is 1000. Please do not arbitrarily redefine systems which existed long before your use case.

It has always been 1024 per kilobyte, so why redefine system.
Those who changed it are non-digital persons,
i bet they could not evade computers any longer, since you cant live without no more.
They started using computers and then changing things ?
Lets not use the new system please, its to confusing.

The prefix kilo existed long before computers. It means 10³, or one thousand. It's that simple.

To put it another way: There is no kilobyte. There is the unit (byte, which in itself is generally a multiplier of the unit bit), and the multiplier. You can have a kilo of bytes, which is 1000 bytes. You can have a mega of bytes, which is 1,000,000. You can have a kibi of bytes, which is 1024. The multiplier came long before the unit, so don't misuse it or you create confusion.

Let's say, in your crazy world, I wish to express that I have a thousand bytes. Not 1024, 1000. I should say kiloby- oh fuck, no, that means 1024 in your world, how do I say one thousand bytes?

What if I want 1024 grams of flour? Is it okay to call that a kilogram?
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2188
  • Country: au
Re: Kilobyte
« Reply #14 on: August 31, 2019, 03:35:45 pm »
Always these precious people complaining about how unusual "mebibyte" looks or sounds. It doesn't matter, spoken language is generally loose so you can be vague about whether you mean 1000^2 or 1024^2. And if you want to be specific, you can say "you know, a power-of-2 style kilobyte" or "kibibyte". It's your choice, if you don't want to say kibibyte, no-one is forcing you to do so, snowflake.

This is even more true with the abbreviated form: I just pop the extra "i" in there as appropriate, just to make my meaning as clear as possible. It's great that there is a standard in place allowing me to communicate clearly, heck, even if I have to put a little note at the heading of my doc saying "1 GB means X and 1 GiB means Y"; I could hardly think of a more succinct system of clarification myself.

Lets not use the new system please, its to confusing.

Should we keep the imperial system around as well for you, because it's too hard to mentally adjust? Aww poor you. How about looking at the new state of things rather than complaining about the transition pains. How you could you possibly claim that "kilo always means 1000 regardless of field" is more confusing than "kilo means 1000 for all units other than bytes, and for bytes it kinda depends on IEC vs JEDEC and memory modules it means 1024 but for hard drives it means 1000"...

In short, how does the addition of a new set of units (KiB, MiB, GiB, TiB) with an utterly unambiguous definition make things more confusing for you? The fact that I have to think hard to figure out what kB means in any given context is a fact that predates the introduction of this new system; and will continue to be a problem (principally because of stubborn people like you). But as the new units become more and more prevalent, that just decreases the number of times I have to encounter this issue.
 
The following users thanked this post: eugene

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 5845
  • Country: nl
Re: Kilobyte
« Reply #15 on: August 31, 2019, 03:42:43 pm »
Yes please stick to the new umambiguous system the old one was a PITA, some stupid example from discussions with colleagues in the past:
" kB means 1000 bytes, KB means 1024 bytes, kb means 1000 bits Kb means 1024 bits"
So there was a difference between big Kilo and small kilo.

And in the HW world it might be impossible to get devices with 1000bytes ram or rom multiples,
But in software it is not trivial and easy to make mistakes to create an array of 1000 entries or 1024.
« Last Edit: August 31, 2019, 03:47:22 pm by Kjelt »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5453
  • Country: fr
Re: Kilobyte
« Reply #16 on: August 31, 2019, 03:43:31 pm »
The prefix kilo existed long before computers. It means 10³, or one thousand. It's that simple.

To put it another way: There is no kilobyte. There is the unit (byte, which in itself is generally a multiplier of the unit bit), and the multiplier. You can have a kilo of bytes, which is 1000 bytes. You can have a mega of bytes, which is 1,000,000. You can have a kibi of bytes, which is 1024. The multiplier came long before the unit, so don't misuse it or you create confusion.

Absolutely right. Even before we were talking about "kibi", the common "unit" for 1024 was uppercase K, while lowercase k IS the kilo multiplier (x1000). It's now recommended to write KiB instead of just KB to avoid confusion. But you'll still see "K" as in x1024 in many documents and datasheets, and it really means x1024, so be aware of that and use common sense and context when needed.

As a side note, it makes me cringe when I see the "kilo" prefix written as bloody uppercase. It's not correct. https://physics.nist.gov/cuu/Units/prefixes.html
Multliplier prefixes have a defined case for each. Try and use them correctly.



 
The following users thanked this post: oPossum, Lee697, Kleinstein

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 465
  • Country: nl
Re: Kilobyte
« Reply #17 on: August 31, 2019, 03:52:48 pm »

Let's say, in your crazy world, I wish to express that I have a thousand bytes. Not 1024, 1000. I should say kiloby- oh fuck, no, that means 1024 in your world, how do I say one thousand bytes?


In my world i dont use 1000 bytes, it gives slow performance.
If it was exact 1000, then it was a 1000 characters, not a kilo characters, can you eat that ?

Or do you say 1,024 kilobytes ?
« Last Edit: August 31, 2019, 03:56:28 pm by Jan Audio »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 7413
  • Country: us
Re: Kilobyte
« Reply #18 on: August 31, 2019, 03:59:06 pm »
A KB is 1024 bytes - period!

In fact, the idea of the byte is based on a number system that isn't decimal (powers of 10) but binary (powers of 2).  Why should 'kilo' prefix mean the same thing in two different number systems?  When used with a binary based system, 'kilo' means 1024 - always and forever.

We should have slapped the drive manufacturers when they tried to redefine the unit as a marketing ploy.  Since, internally, sectors were still 512 B (half of a kB), they were flat out cheating their customers.  The device itself used KB as 1024 (2 sectors).  Too much code was written around the 512 byte sector to actually change them to 500 bytes.  And 512 (or 1024) were selected because they ARE powers of two.

As to IEC:  It doesn't matter what they think.  JEDEC is the proper standard and KB is 1024 bytes.

Different number systems, different interpretations of the prefix.  And, no, we're not going to develop decimal based computers any time soon.  That has already been done and it is a niche market if not completely gone.

« Last Edit: August 31, 2019, 04:02:59 pm by rstofer »
 
The following users thanked this post: amyk, cgroen, Jan Audio

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3977
  • Country: ro
  • .
Re: Kilobyte
« Reply #19 on: August 31, 2019, 04:25:16 pm »
For hard drives, we got used with 1024 due to cpu cycles and memory constraints.

Basically back then everything was made with multiples of two, in order to be able to make computations using bit shifting.
Disk sectors were 512 bytes which is 29 , clusters were multiple of 512 for example 4096 bytes which is 212.

For an operating system like MS-DOS in the times of 8086 and < 1MB of memory, it was much easier, faster and cheaper memory wise to consider a KB as 1024 bytes, because it would allow them to quickly list the file sizes just by shifting bytes

ex Let's say a file size has 123456 bytes   ( 0x01 E240 or 0b0000 0001 1110 0010 0100 0000)
If you want to list the KB value, you can just shift 10 bits to the right to divide the number by 1024 (210 = 1024) so you get 

0b0000 0001 1110 0010 0100 0000 => 0b0000 0001 1110 00 = 0b0000 0000 0111 1000  = 120 KiB    (it's actually 120.56 kiB so technically 121 KiB but good enough for an 8086)

FAT 16 and FAT32 also stored file sizes in multiples of sector size and cluster size so again bit shifting was used to calculate file sizes, remaining free disk space and so on ... it was only natural due to cpu cycle and memory constraints to use multiples of 1024 instead of 1000.

Memory always used multiples as 8, due to the the memory bus on processors being 8 bits, then 16 bits, then 32 bits with 386, and now we have 64/128/256 bit with dual channel ddr4 / quad channel
So memory chips kept using multiples of 8, even though they advertise as 512 mbit , 1gbit etc etc


1
« Last Edit: August 31, 2019, 04:29:06 pm by mariush »
 
The following users thanked this post: Moshly

Offline madires

  • Super Contributor
  • ***
  • Posts: 5331
  • Country: de
  • A qualified hobbyist ;)
Re: Kilobyte
« Reply #20 on: August 31, 2019, 04:25:38 pm »
Absolutely right. Even before we were talking about "kibi", the common "unit" for 1024 was uppercase K, while lowercase k IS the kilo multiplier (x1000). It's now recommended to write KiB instead of just KB to avoid confusion. But you'll still see "K" as in x1024 in many documents and datasheets, and it really means x1024, so be aware of that and use common sense and context when needed.

The "K" for 1024 might be a workaround, but the concept fails with M or larger multipliers.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 5331
  • Country: de
  • A qualified hobbyist ;)
Re: Kilobyte
« Reply #21 on: August 31, 2019, 04:30:45 pm »
For hard drives, we got used with 1024 due to cpu cycles and memory constraints.

Hard drive vendors use the SI prefixes (IEC standard) to specify the storage size for quite a while.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5453
  • Country: fr
Re: Kilobyte
« Reply #22 on: August 31, 2019, 04:39:03 pm »
Absolutely right. Even before we were talking about "kibi", the common "unit" for 1024 was uppercase K, while lowercase k IS the kilo multiplier (x1000). It's now recommended to write KiB instead of just KB to avoid confusion. But you'll still see "K" as in x1024 in many documents and datasheets, and it really means x1024, so be aware of that and use common sense and context when needed.

The "K" for 1024 might be a workaround, but the concept fails with M or larger multipliers.

It's not a workaround. It probably seemed reasonable at the time to use K instead of k (whereas there was no "free" prefix for > 2^10), but refer to rstofer post. It's just not the same reference. Binary size units ARE NOT part of the SI units, they don't have to follow the same rules.

Yes it introduces some confusion, which, as rstofer said, was mainly used as a marketing trick in the storage device industry. They suddenly were pretty much the only ones in the computer industry concerned with using proper SI units. How convenient. ;D
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 5845
  • Country: nl
Re: Kilobyte
« Reply #23 on: August 31, 2019, 04:56:57 pm »
As to IEC:  It doesn't matter what they think.

Blasphemy!  ;)

Quote
the International Electrotechnical Commission (IEC), the leading international organization for worldwide standardization in electrotechnology
It did not even came from computer science , it came from electronics standardization.
So it doesn't matter what you think in your universe, just accept it, it is done for over twenty years and is the way students learn it already for the last generation, it is the single and only true definition.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3977
  • Country: ro
  • .
Re: Kilobyte
« Reply #24 on: August 31, 2019, 05:12:49 pm »
For hard drives, we got used with 1024 due to cpu cycles and memory constraints.

Hard drive vendors use the SI prefixes (IEC standard) to specify the storage size for quite a while.

I know that. I was referring to Microsoft and other operating system developers who decided to compromise and use 1024 instead of 1024 while saying KB and MB, because it improved the performance of the programs by a significant amount and reduced the memory and disk space used.
Of course hard drives were sold and specified in millions of bytes, not as multiples of 1024 ... though it's worth noting that even back then most were factory formatted to use 512 byte sectors and clusters using powers of two... some bytes were inadvertently left out, unused, because drive may not have an exact multiple of 512 bytes of actual capacity.
 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf