Easily Calculate Memory from Bytes to KB, MB, GB, TB
1–6 of 6 posts
Re: Easily Calculate Memory from Bytes to KB, MB, GB, TB
#2Re: Easily Calculate Memory from Bytes to KB, MB, GB, TB
#3If I need to calculate the approximate memory required for 42652 records of 46 bytes, I'd just multiply them? So that'd be 1961992 bytes, if I wanted to know how many kibibytes it was, I'd divide by 1024 and that'd be 1916, or roughly 1,9 mib ?
If I needed giant numbers and knew my result be in the gigabyte range, I'd just divide by 1024^3
Re: Easily Calculate Memory from Bytes to KB, MB, GB, TB
#4Teaching grandmother to suck eggs
Re: Easily Calculate Memory from Bytes to KB, MB, GB, TB
#5I don't understand this.. What's this trying to tell ? If I need to calculate the approximate memory required for 42652 records of 46 bytes, I'd just multiply them? So that'd be 1961992 bytes, if I wanted to know how many kibibytes it was, I'd divide by 1024 and that'd be 1916, or roughly 1,9 mib ? If I needed giant numbers and knew my result be in the gigabyte range, I'd just divide by 1024^3
Re: Easily Calculate Memory from Bytes to KB, MB, GB, TB
#6I don't understand this.. What's this trying to tell ? If I need to calculate the approximate memory required for 42652 records of 46 bytes, I'd just multiply them? So that'd be 1961992 bytes, if I wanted to know how many kibibytes it was, I'd divide by 1024 and that'd be 1916, or roughly 1,9 mib ? If I needed giant numbers and knew my result be in the gigabyte range, I'd just divide by 1024^3
No, this is just for interviews and rough calculations. I wouldn't dare to take 42652 records of 46 bytes for calculation. I will need approx value anyway. so go for 40000 records for 50 bytes each instead or best use 50K of 50 bytes.
If I was asked during an interview, I'd either type it into the machine or write the calculation on the whiteboard and tell that there's absolutely no reason for me to concern myself with performing calculations when my job is literally to instruct machines to perform them.