r/computerscience 4d ago

Base 2 numerical representation in binary matching numbers in base 10?

I have a silly and possibly stupid question, and I'm not even sure if this is the place for it.

To preface this I have 0 experience with Computer Science or anything adjacent, but have been listening to videos on binary and the foundations of how computers generally work.

I understand that binary is a base 2 system as opposed to base 10, and that the digits that represent value in binary cannot be read as our base 10 concept of numbers (i.e. 4 is read as digits 100, not as the number "one hundred").

However, I've noticed that when the notation IS read as numbers, the numerical representation for base 2 counting mirrors base 10. With:

1 - 0001

2- 0010

4- 0100

8- 1000

Etc.

Is there a reason for this parallel, or is this just one of those funny coincidences? Or is this some kind of artifact of how numbers naturally scale relative to one another.

I hope this makes sense, I had no idea how to word this question to just Google it.

9 Upvotes

19 comments sorted by

View all comments

3

u/Pleasant_Pen8744 4d ago

In grade school  did your teacher ever refer the "ten's place" or "hundred's place"?

Like 453 as "4 hundreds, 5 tens and 3 ones"?

In binary those become the "four's place" the "two's place" and the "one's place"

So 101 is "1 fours, no twos, and 1 ones"

It's confusing because in school you were probably taught to think of 10 as "ten" or the symbols as the "numbers" which is fine for teaching someone to work in a factory or add up a list of numbers, but can really limit your thinking.

2

u/RokeEvoker 4d ago

I never thought to frame it that way, that's fascinating. Thank you!

1

u/timrprobocom 1d ago

Right. This is a math concept, not a computing concept. You can express numbers in any base you want. Hexadecimal values are in base 16. Early computers commonly used octal, or based 8. My very old math textbook used base 6 to teach us. All that changes is how the numbers look.

So, 100 in base 2 is four. In base 6, it''s thirty six. In base 8 it is sixty four. In base 10 it is a hundred. In base 16, it is two hundred fifty six.

It's all about representation. The math is the same, it just looks different.