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

968 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 are 100% right about your question.

I developed on slow CPU (think about microwave, remote control, …) and desktop.

There is two parts you need to know.

The first one, what everyone will repeat in this thread, everything work as a multiple of 8 bits. (8 to 64 nowday). Like, you can’t send 7 or 9 bits, you need to ask a multiple of 8. See it like a box. You have specific boxes size to ship your stuff and worst case fill it with garbage.

Then, it is where you are right, the meaning on those numbers all depends on the CPU or software.

You need to read the CPU manual (called datasheet) to know how those bits will be interpreted because they could be 3 numbers within that 8 bits (like your example).

As for the software, well somebody (like me) programmed it to read it in a specific way to interpret part of that 8bits as I would like. So, the software know how to read it and interpret it.

For the ELI5, you can also see CPU as a software… Running human software

For desktop applications, except when size (bandwidth, space storage, …) may become big really fast, you don’t bother at all to try to squeeze as many numbers into one of those 8 bits multiple. We prefer readability over space nowday.

As for CPU… It can be quite common to have bits different meanings like your question. Again, you must read the datasheet (CPU manual).

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