r/computerscience • • Dec 13 '25

Binary Confusion

I recently learnt that the same binary number can be mapped to a letter and a number. My question is, how does a computer know which to map it to - number or letter?

I initially thought that maybe there are more binary numbers that provide context to the software of what type it is, but then that just begs the original question of how the computer known which to convert a binary number to.

This whole thing is a bit confusing, and I feel I am missing a crucial thing here that is hindering my understanding. Any help would be greatly appreciated.

33 Upvotes

49 comments sorted by

View all comments

Show parent comment

-1

u/Bright-Historian-216 Dec 13 '25

an example, in case my explanation is too complicated:

python: the user wants a + b so i call the add method linked to the variable a, the add method should at run time check the type of b and act accordingly.

c++: compiling the program. the user wants a + b, so i look at the instructions defined by a to add things to it and insert it directly where i need it. depending on type of b, i may insert different code so i don't have to spend time calculating it later