Easily Calculate Memory from Bytes to KB, MB, GB, TB
coderstea.in
coderstea.in
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
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.
Teaching grandmother to suck eggs