Data Storage Units

From PHWiki

Contents

The Short Version

PCs use bytes. GBA cartridges and DS chips use bits. A byte is 8 bits. The byte abbreviation is an uppercase 'B'. The bit abbreviation is a lowercase 'b'. Use binary prefixes instead of SI prefixes (see below). Smack anyone who does not follow that last sentence.

The Long Version

On a PC, data size is generally measured in bytes. However, in reference to smaller digital media such as Game Boy Advance and Nintendo DS cartridges, data size is measured in bits. 1 byte is comprised of 8 bits. So, whenever you hear 'meg' or 'gig' in reference to such things, assume they are speaking in bits, or ask for clarification.

Often confused are the unit abbreviations for bits and bytes; bits are a lowercase 'b' and bytes are an uppercase 'B'. The abbreviation for a bit is 'b'.The abbreviation for a byte is 'B'. See b is not B.

Simply multiply the size of the ROM on a PC by 8 to get the size in mebibits for flash card usage. The same goes for saves, by the way; some flash cards like to measure those in bits, usually kibibits.

Using the bit unit for ROM sizes is not a marketing ploy invented by flash card manufacturers, but actually Nintendo that has been using bits to measure their cart sizes dating back to the 80s. In addition, most chip manufacturers still label their ROM and flash chips in bits.

Unit Prefix Ambiguation

Some confusion arises from the different prefixes used for bits and bytes. The commonly-used kilobyte, megabyte, and so forth follow the [Wikipedia:SI|SI] standard of powers of 10, which are not accurate for binary data measurement, which is done in powers of 2. To differentiate, another set of prefixes were made to remain accurate to binary patterns. They are comparable to the original prefixes, with the second letter and further replaced with 'bi'. It is assumed the 'bi' is an abbreviation of 'binary'. The prefix abbreviations are the same as the originals with a lower-case 'i' following. See the tables.

Name Symbol Value
kilo k 103 = 1,000 < 210
mega M 106 = 1,000,000 < 220
giga G 109 = 1,000,000,000 < 230
tera T 1012 = 1,000,000,000,000 < 240
peta P 1015 = 1,000,000,000,000,000 < 250
exa E 1018 = 1,000,000,000,000,000,000 < 260
zetta Z 1021 = 1,000,000,000,000,000,000,000 < 270
yotta Y 1024 = 1,000,000,000,000,000,000,000,000  < 280
Name Symbol Value
kibi Ki 210 = 1,024 > 103
mebi Mi 220 = 1,048,576 > 106
gibi Gi 230 = 1,073,741,824 > 109
tebi Ti 240 = 1,099,511,627,776 > 1012
pebi Pi 250 = 1,125,899,906,842,624 > 1015
exbi Ei 260 = 1,152,921,504,606,846,976 > 1018
zebi Zi 270 = 1,180,591,620,717,411,303,424 > 1021
yobi Yi 280 = 1,208,925,819,614,629,174,706,176 > 1024

Conversion Tables

For quick and easy reference, here's a table of common ROM sizes on the Game Boy Advance and Nintendo DS in both bytes and bits.

MiB and kiB are the size of the file as it's measured on a PC. Mib and kib are the size of the file as it's measured on a cartridge or flash card. 'In-between' sizes on a PC are the result of truncation.

ROM Sizes Save Sizes
Mebibytes Mebibits Kibibytes Kibibits
4 MiB 32 Mib 0.5 KiB 4 Kib
8 MiB 64 Mib 8 KiB 64 Kib
16 MiB 128 Mib 32 KiB 256 Kib
32 MiB 256 Mib 64 KiB 512 Kib
64 MiB 512 Mib 128 KiB 1024 Kib (1 Mib)
128 MiB 1024 Mib (1 Gib) 256 KiB 2048 Kib (2 Mib)