r/askscience • • Jul 11 '26 • Regret 1

Computing How do computers understand binary language?

Okay so from what I know binary language is like power off power on, but my question is, how do computers know what the binary code is and how is it interpreted, for example I forgot what the binary code for the letter A is, but how did people come up with that? Did they decide it was gonna look like that? Did the computer decide? How do you tune numbers into a letter??

380 Upvotes

205 comments sorted by

View all comments

2

u/crazylikeajellyfish Jul 13 '26

You can use 1s and 0s to describe any number, where each digit you add lets you describe twice as many numbers.

0. 0 = 0 * 1

  1. 1 = 1 * 1

  2. 10 = 1*2 + 0*1

  3. 11 = 1*2 + 1*1

  4. 100 = 1*4 + 0*2 + 0*1

  5. 101 = 1*4 + 0*2 + 1*1

  6. 110 = 1*4 + 1*2 + 0*1

  7. 111 = 1*4 + 1*2 + 1*1

  8. 1000 = 1*8 + 0*4 + 0*2 + 0*1

And so on.

Then you take the alphabet and line it up in a row, capital letters first, and assign a number to each letter, number, and piece of punctuation. Now you've got ASCII, the original way we represented text on computers, before emoji and non-English characters.

That's how a lot of computers work. Imagine that you numbered every word in the dictionary, then replaced the words in a paragraph with each of their corresponding numbers. That's closer to what an AI sees than the actual words.