COnvert Memory to GB

i am using a from to display memory status and usage.i would like to have it converted as GB displayed in the task manager.I need a formula that will convert  2147483647  to gb.

Who is Participating?
Rey Obrero (Capricorn1)Commented:
just divide the value by 1,000,000,000  ( 1 billion)
Shaun KlineLead Software EngineerCommented:
A kilobyte is 1024 bytes.
A megabyte is 1024 kilobytes.
A gigabyte is 1024 megabytes.

Divide your number by 1024 * 1024 * 1024, or 1,073,741,824 for an exact amount. To get an approximate value, use Rey's answer.
Shaun KlineLead Software EngineerCommented:
Both provided solutions answer the question asked.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.