Memory is sized in powers of two

Random-access memory, cache lines and address spaces are built from binary circuits, so their sizes are powers of two. A module of 8 GiB holds exactly 8 times 2³⁰ bytes. When a datasheet gives a count in bits, for example the total number of cells in a memory array, a designer converts to gibibytes to compare it with what the operating system shows. This page performs that conversion. Enter the bit count, keep the source at bit, choose gibibytes, and the page divides by 8,589,934,592, the number of bits in one gibibyte. The unit name and symbol make the binary meaning explicit.

Where the gibibyte comes from

The binary prefixes kibi, mebi, gibi and so on were introduced by the IEC in 1998 and later included in IEC 80000-13, and NIST SP 811 explains them next to the SI prefixes. They exist because the SI prefix giga means 10⁹ exactly, while computer memory naturally comes in multiples of 2³⁰, which is 1,073,741,824. The gibibyte is that quantity of bytes, and in bits it is 8,589,934,592. The ratio of a gibibyte to a gigabyte is 1.073741824, so a gibibyte is about 7.37 percent larger. Using GiB removes the ambiguity that the older use of GB for both created.

What the default of 10 bits gives

Ten bits equal 1.1641532182693481e-9 GiB, about 1.16 × 10⁻⁹. The value is smaller than the GB result of 1.25 × 10⁻⁹ for the same input, which is a general rule of this pair of pages: the binary unit is larger, so the count is smaller. The default is only a check of the factor, since ten bits is a tiny fraction of a gibibyte. The calculator prints the digits of the double precision value, and you can read it as 1.164e-9 in practice. To see a result of useful size, enter a figure with ten or eleven digits, which brings the answer into the range of 1 to 12 GiB.

From a memory array to a module size

A memory device with 34,359,738,368 bits holds 4 GiB, since 4 times 8,589,934,592 equals that number. A 32-bit address can name 2³² bytes, which is exactly 4 GiB, the reason older 32-bit systems had a limit near that size. A data set of 100,000,000,000 bits, ten to the eleventh, is 11.6415 GiB, while the same bits make 12.5 GB in decimal units. The difference of about 0.86 gigabyte between the two statements is purely a matter of definition. If you read both numbers in different documents, check the suffix before you suspect a mistake.

Going from gibibytes to bits

Swap the units to see how many bits a GiB figure contains. A 4 GiB module is 34,359,738,368 bits, and 1 GiB is 8,589,934,592 bits. This direction helps when a bit-level calculation, such as the number of cells or the size of a bitmap, must match a memory size. A bitmap that tracks one bit per 4 KiB page of memory needs one bit for every 32,768 bits of RAM, so a 4 GiB machine with 1,048,576 pages needs 1,048,576 bits, or 128 KiB, for the bitmap. The conversion supplies the first step in that kind of sizing exercise.

Why your drive seems smaller than its label

A drive labeled 1 TB holds 10¹² bytes. An operating system that reports binary units divides by 2³⁰ and shows about 931 GiB, which some systems label as GB. The same bits, 8 × 10¹², give 931.32 when you use this page for the gibibyte figure. The drive has not lost capacity. The difference between 1,000,000,000 and 1,073,741,824 grows with each prefix level, reaching about 10 percent at the tebibyte level. Some systems, including recent macOS versions, report decimal units to match the labels, and others, such as many Linux tools, offer both. The unit symbol tells you which system you are reading.

Binary prefixes and the symbols to use

The symbols are KiB, MiB, GiB and TiB, with a capital letter and a lowercase i. Writing GB for 2³⁰ bytes is common in informal use, but it conflicts with the SI meaning, and standards bodies recommend GiB. In JEDEC memory specifications, GB sometimes stands for 2³⁰ bytes, which shows that the older practice survives in some documents. The converter on this page follows the IEC meaning, so a result in GiB is always a power-of-two quantity. When you copy the answer, keep the symbol with it, so a reader cannot take 1.16e-9 GiB for a decimal value. In a spreadsheet, a column header such as Size (GiB) is the simplest way to keep the unit attached to a whole column of converted values, and it avoids the question of which gigabyte was meant.

Precision and limits of the conversion

The factor 1 over 8,589,934,592 is exact in binary floating point because the divisor is a power of two, so there is no rounding error from the factor itself. The displayed digits depend on the format. Memory sizes are exact integers, so for a bit count that is a multiple of 8,589,934,592 the result is a whole number of gibibytes. The tool does not convert between this and a hardware reality: reserved areas, error-correcting bits and overprovisioning can make the usable size lower than the raw bit count. Use the result for the arithmetic of units, and consult the datasheet for usable capacity. Another habit that prevents mistakes is to write the byte count as well: 8,589,934,592 bits is 1,073,741,824 bytes, and a quick look at that integer shows at once whether the figure is binary, since it equals 2 to the power of 30, or decimal, since it would then be 1,000,000,000.

Estimating a bit-level data structure in GiB

A Bloom filter, a bitmap index or a genome store may be described by the number of bits it holds, and its memory cost must be compared with a machine that reports GiB. A filter of 50 billion bits, an illustrative size, takes 50,000,000,000 divided by 8,589,934,592, which is 5.82 GiB. The same filter in decimal units is 6.25 GB. If the machine has 8 GiB of memory and the operating system takes some of it, the 5.82 GiB figure tells you quickly whether the structure fits. Using the decimal number in this case would overstate the memory need by about seven percent, which could lead to buying a bigger machine than necessary.