If digital data is stored in 0s & 1s, how does the reader know how many of the digits to take into consideration?

906 views

Must be a very basic and dumb question. But ‘1001’ can be 9 and also 2 & 1 if ’10’ & ’01’ is taken seperately. I’m confused.

In: 49

48 Answers

Anonymous 0 Comments

You’re completely correct that it could either be 9 or a 2 then a 1. The issue is that you’re assuming that the is no context.

In storage, there are conventions (e.g. ASCII) that say that basic text is 8 bits per letter. Similarly, other data is stored in fixed-length intervals.
In RAM, whoever is writing to it determines how it is used. It could be any length. The program (and programmer) using it needs to make sure they’re using it correctly.

There are also ways to compress things like text, where bit length is dynamic. But that’s a bit complex, so let me know if you want that explanation as well.

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