Jump to content

Why don't numbers work properly?


Recommended Posts

I have an SD card for my RK2020 retro handheld, onto which I want to burn a pre-made image of emulators.




- the micro SD card (a Toshiba bought from a legit UK online source) is ostensibly a 128GB one.


- the IMG file I've downloaded is 119GB according to Windows.




- except the image-writer app (BalenaEtcher) thinks the IMG is 128GB and that the card capacity is only 125GB, so refuses to write it.






- and if I try to format the card, Windows says its actual capacity is only 116GB.





Link to comment
Share on other sites

2 minutes ago, BobAtari said:

Three GIGABYTES for a file system?

Like I said, maybe bad blocks?   If you are writing an image to it, it will overwrite the filesystem anyway, so what the filesystem consumes won't matter.


I've read lots of stories about scam SD cards in Amazon reviews that don't have the capacity advertised too.

Link to comment
Share on other sites

Memory size is all messed up these days, as zzip said memory was originally reported in binary sizes so 1 kilobyte was 1024 bytes, not a decimal 1000 bytes but that confused the layman, particularly when the size became bigger, i.e. 32 Kilobyte is 1024 x 32 = 32786 byte, 64killobytes = 65535 bytes as reported on their PC boot screen.

Oddly people would complain even though the value was larger so it effectively looked like you had more memory than expected, about 5(?) years ago regulations were passed to make it easier for the layman to understand memory size by specifying that memory was made in decimal sizes so that 64Kilobyte now equals 64000 bytes and not 6553 bytes so now you are getting less bang for your buck than you used to.


Currently, I think there is still a mixture of devices with memory that are in binary and decimal values so there can be a miss match between what you expect and what you get depending on which format it is specified in and your understanding of decimal to binary conversion. This mismatch between actual and expected memory size can be complicate further depending on whether the device reading the memory size is doing so in the same format the size is specified, i.e. if the memory size is specified in decimal but the device is reading and displaying the size in binary then that will also result is a size mismatch.


For example, if you have an SD card with a 64Mb size expressed as a decimal value and your PC is reading it in as a binary value where 1KB = 1024 bytes instead of 1000 bytes then the PC will report the size as 64000 / 1024 = 62.5Kb but as it cannot resolve the .5KB because it is not a complete 1024byte block it will report the size as 62KB hence a discrepancy in size.


I maybe wrong but I think the reported memory size is further complicated by the size of the data chucks (Allocation size) being used, for example of your chunk size is a binary 4KB (4096 bytes) then the reported usable memory size (in binary terms) of a decimal 64 Kilobyte memory would be 64000 bytes / 4096 =  15 whole chunks, 15 * 4096 =   61440 bytes / 1024 = 60KB, so (if my math is correct) you could appear to lose a whole 4 kilobytes of memory compared to the specified size due to a decimal/binary size mismatch.


Note the above calculation assumes the entire specified memory size is available for user files and there is additional memory for the files system, otherwise your reported usable space would be even less than indicated to allow room for the file system. Also, although I have uses Kilobytes as an example here to keep the values used simple, it translates up to Mega, Gigi and Terra bytes equally.



Link to comment
Share on other sites

Disk space reporting is about as clear as mud ?.  After doing some experiments with large files on my Windows 10 box, I think it comes down to how disk sizes are reported by HD/SD manufacturers, as well as how Windows handles them and reports them in Explorer.


IMO the best way to do an apples to apples comparison is to look at the number of bytes.


In Windows Explorer

1.  For the file:  Right click --> Properties and look at the Size where it shows the total bytes in parentheses.

2.  For the SD:  Right click --> Properties and look at the Free space in bytes


I'm guessing the IMG file will be a little bit larger than the amount of free space on the SD.  I don't think there's a problem with the file or the SD card.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...