r/computerscience • u/Zapperz0398 • 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.
View all comments
Show parent comment
5
u/tblancher Dec 13 '25
I'd like to add that this context is usually set by the operating environment. Like if you receive a file that is not ASCII/UTF-8, and your environment is set to UTF-8, your system may misinterpret the file so you'll get gobbledegook on the screen, or the program interpreting it will error out or crash, if the file contains invalid characters for your environment.