M
M
Moolzv Rivers2020-01-25 23:00:09
C++ / C#
Moolzv Rivers, 2020-01-25 23:00:09

How to convert bytes to gibibytes?

Hello.
In general, in my C ++ program I have a function to get free disk space in bytes, I need to somehow convert them to gibibytes, not to gigabytes, but to gibibytes. Tell me how? What to multiply? Here, for example:
Bytes: 892198711296
You need to convert them to gibibytes. It is advisable to explain in simple language, otherwise I was a C student in computer science, the only case in my whole life where I needed it: D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2020-01-25
@SaddledSharp

1 kilobyte = 1000 bytes, 1 kibibyte = 1024 bytes.
1 gigabyte = 1,000,000,000 bytes, 1 gibibyte = 1024 * 1024 * 1024 bytes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question