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

411 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

Because computer scientists and technicians needed a way to express larger numbers and decided to borrow the SI prefixes.

But as others have explained, actual digital storage comes in powers of two, so it wasn’t a perfect match. But it was good enough and everyone knew what was meant. Or at least had a good guess—“byte” can mean everything from 5 to 13 bits, depending on the computer you’re talking about.

This was fine for ages, but then hard drive manufacturers noticed they could put higher numbers on their drives if they counted in base 10 and used real SI prefixes. That was quite easy for them, as the capacities of hard drives are determined as “512 bytes x platters x sides x tracks”—and platters, sides and tracks are simply numbers with no powers of twos. So the influence of 512 not being a round number gets lost very quickly when you multiply it up into the billions.

And the very next thing we knew was that the “it’s called a screwturner, you’re not driving on it” people came along and complained about everyone in IT (aside from the hard drive manufacturers) misusing SI prefixes. This then gave us the “kibi”, “gibi”, “schmibi” and whatever prefixes some people insist on. But as those are not universally accepted, it’s now guesswork what someone means when they say “1 kB”—is that 8000 bits, 8196 bits, 10000 bits or 10240 bits?

And now some digression into the original question. Computer memory is addressed using a bundle of wires that can be on or off, giving you the binary representation of the address (see the other replies for details). But that’s not enough to force you to count your memory that way. But what happens next is the interesting part. Memory is made up of multiple chips (unless you have a small computer that doesn’t need more than one chip can provide). So you need to split that address into two parts: (1) the part to select which chip that address is on, and (2) which cell inside that chip it is.

The absolutely simplest to do that is to simply split the wire bundle in the middle. The first 8 wires are the address within each chip, and the other 8 wires select which chip should answer. That is so simple and easy to do that that is exactly how everyone has ever done it. If instead you wanted the first chip to respond to addresses 0 to 999, and the second to 1000 to 1999, you would need to do math on address wires. You’d have to design circuitry that subtracts the base address of each chip from the current address and then checks for which chip the resulting number is between 0 and 999, … that would cost more than the RAM chips, and those are not cheap.

But this now means that each RAM chip has to store exactly as many locations as a specific number of wires can address. In my example, each chip would have 256 addresses. Or with 10 address lines, it would need to store 1024 elements. If you’d build a chip with only 1000 elements, there would be a gap between the addresses each chip handles.

And that’s why memory is always in chunks that can be expressed by powers of two.

Side note 1: Modern memory chips have gotten so big that there now actually is some logic on the motherboard that allows mixing of different sizes, i.e. the address lines are not simply split. This, however, still doesn’t do complex math, but allows stuff like 8+16GB RAM banks to be inserted.

Side note 2: I’ve said before that chips store elements. That’s because what they store really depends on how memory is organised. In the past, each chip only stored single bits. So you’d need 8 chips responding to the same address to have one byte. Then they store 4 bits, allowing you to have only 2 chips per address. Today, with wider data busses, a single element can even be 8 bytes…

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