- 1

What do they mean by 1024?

return number%1024

18th Oct 2017, 7:47 PM
Đ’Đ°Đ»Đ”Ń€ĐžŃ
Đ’Đ°Đ»Đ”Ń€ĐžŃ - avatar
5 Answers
+ 22
2^10 //u want remainder , after getting divided by 1024 â˜ș
18th Oct 2017, 8:36 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 9
it seems like this could be used to calculate Kilo bytes from bytes (Division: BYTES / 1024) Because there's 1024 bytes in 1 KB When people are loading a file and they get the size of the file it is returned in bytes, so it is necessary to do this step to get the KB of the file: 1 KB = 1024 bytes If you use % (Mod) You'll always get a number between 0 and 1023, this it's a good way to see if the file is "perfectly rounded" to (1024 * x) bytes [ x = any integer] If it's not 0 it will return how many bytes are in excess.
18th Oct 2017, 7:57 PM
Limitless
Limitless - avatar
0
that is what you divide by
18th Oct 2017, 7:50 PM
Joshua
Joshua - avatar
0
it is the power 10 of number 2
2nd Nov 2017, 7:37 AM
Raghad
Raghad - avatar