Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAM standards - 1 kB = 1024 B #493

Closed
coffeecrisp opened this issue Mar 2, 2021 · 11 comments
Closed

RAM standards - 1 kB = 1024 B #493

coffeecrisp opened this issue Mar 2, 2021 · 11 comments

Comments

@coffeecrisp
Copy link

Can you insert an option for switching off the kibobobytes and gigobots?
Instead of kiB, I want it to show kB
Instead of MiB, I want it to show MB
Instead of GiB, I want it to show GB.
This is because in computer science,
1 kB = 1024 B
1 MB = 1024 kB
and so on.

@jackun
Copy link
Collaborator

jackun commented Mar 3, 2021

Uh? Vice versa, 1KiB is 1024B. Kilo is SI unitprefix so 1KB = 1000B

@coffeecrisp
Copy link
Author

That's nice. It's more than nice. Display it as 1kiB on your system.
The Byte is not a SI unit.
Can we have an option in the configuration file so that I can display it as kB? When I mean kB, mean the computer science standard of 1 kB = 1024 B = 2^10 B

@gort818
Copy link
Collaborator

gort818 commented Mar 4, 2021

What do you think 1 KiB is? 1 KiB = 1024B = 2^10 B.

That is what you are asking for...or do you just want the actual text changed from KiB to KB?

Can you link me to the corresponding computer science standard?

@coffeecrisp
Copy link
Author

Yes, I would like the text to display kB, MB, GB, TB. The file in which that happens is hud_elements.cpp
I don't know any links. You would have to pick up some univesity textbooks.
When you took your courses at university, what did they say?
Also, check out the cache related information on Intel's website for every CPU. Also check out AMD's website for cache related information. Kingston which is a RAM manufacturer, also displays their RAM sizes as GB. They display their storage information in the metric format.
You can also look at the JEDEC documents for their DDR3 and DDR4 standards. The document only uses the computer science standard.
As for wikpedia,
The kilobyte has traditionally been used to refer to 1024 bytes (210 B).[5][6][7] The usage of the metric prefix kilo for binary multiples arose as a convenience, because 1024 is approximately 1000.[8]
The binary interpretation of metric prefixes is still prominently used by the Microsoft Windows operating system.[9] Metric prefixes are also used for random-access memory capacity, such as main memory and CPU cache size, due to the prevalent binary addressing of memory.

@coffeecrisp
Copy link
Author

I recently checked out Firefox and VirtualBox.
When you download a file with Firefox, it tells you the file size during the download. They also define 1 kB = 1024 B
For VirtualBox, they express the RAM that you assign to your VM as 1 kB = 1024 B.
I don't know about the HDD.
So, these are 2 major software using the traditional definition for kilo, mega, giga, tera.

@Faalagorn
Copy link
Contributor

So it's all about skipping i in the middle of units?

@coffeecrisp
Copy link
Author

That's right Faalagorn.
It's as simple as that. All the code needs is a if else statement and something in the config file to set to TRUE or FALSE.
I did it in my own app. It satisfies everyone to the maximum joyfulness state.

@raspin0
Copy link
Contributor

raspin0 commented Mar 17, 2021

That's right Faalagorn.
It's as simple as that. All the code needs is a if else statement and something in the config file to set to TRUE or FALSE.
I did it in my own app. It satisfies everyone to the maximum joyfulness state.

Imo. making an exclusive tweak for such thing would harm simplicity of this project. Is it really such an issue? A user who's not a computer person will just treat MiB as a MegaByte, while MangoHud will remain full correctness.

@coffeecrisp
Copy link
Author

Vesterlay, you call that complex? It doesn't make anything complicated. I have already done it on my own projects. When I have the time, I will take this MangoHud project and make a custom version and upload it to sourceforge.

@raspin0
Copy link
Contributor

raspin0 commented Mar 21, 2021

I don't think complex is a good word to describe it, but I don't feel like implementing whole new tweak is a good idea just to change such a minor detail. Making a compromise between the two looks like a more appealing option for me.

@WhosyVox
Copy link

I think this is very much a case of "If you want this change, fork it."
KiB is not wrong so this wouldn't be a bug fix, and it hardly seems worth the added code complexity to make it an official feature.

So fork it, do a global find/replace of KiB/MiB/GiB to KB/MB/GB and use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants