Why does 8gb of ram display like 8192mb and not 8000mb?

403 views

In informatics parts there’s always a little bit more when talking about GB or similars. Why it’s like that?

In: 0

10 Answers

Anonymous 0 Comments

If you look at memory chips you see the pins sticking out of them. Some of those pins are address lines. Like a street will have house numbers to help you figure out where someone lives, the address lines tell the circuitry inside which data to access.

Each address line can be either 1 or 0, a high voltage or low voltage.

Several of them are arranged so that they form a binary number.

For example, 8 address lines can form a number from 0 to 255, so it can “select” 255 different data addresses.

“`
00000000 – 0
11111111 – 255
“`

Recall that in base 10 or regular numbers, you have 10 “symbols”, 0 to 9.

Then you have place value 1s, 10s, 100s.

1s is just 10^0 ( ten to the zeroth power ), 10 is 10^1, 100 is 10^2. To make a number like 255 you have

“`
2 × 10^2 + 5 × 10^1 + 5 × 10^0 = 200 + 50 + 5 = 255
“`

Still with me?

Now, binary number are just the same, just that it has 2 symbols (0 and 1). And instead of powers of 10, you use powers of 2.

“`
1 × 2^7 + 1 × 2^6 ….. 1 × 2^0 =

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 =

255

“`

8 address bits can access 256 memory locations (0 -255 inclusive)

So 33 address bits can access 8,589,934,592 memory locations.

Its a huge number, so we divide it by a multiple of 2, since its a binary number, so we will get a whole number after division.

1024 is 1KiB

1KiB × 1024 is 1MiB = 1048576

Dividing 8,589,934,592 by 1,048,576 gets us exactly 8,196 MiB

Notice the small i in KiB, MiB, GiB.

We used to call it just plain KB, MB, GB, but more accurately it’s Kibibytes (KiB), Mebibiyes (MiB), Gibibytes (GiB), since Kilo, Mega, Giga are properly powers of 10 in SI units.

For the general public its still KB, MB, GB of course.

TL;DR

because of how computers physically access memory, using bits (electric lines that are on or off), addresses are always powers of 2.

Powers of 2 don’t align with powers of 10.

Bonus:

We use powers of 10 (decimal) only because ancient bony fish had 10 fingers! Imagine our math if we had 4 fingers per hand! Actually it’s called octal.

Bonus++:

Modern computers have 64 bit address lines. Theoretically we could have 16 million Terabyte RAM.

Bonus++:

Bill Gates famously once said 64kB is enough for everybody

You are viewing 1 out of 10 answers, click here to view all answers.