eli5 How do people code with binary?

1.25K viewsOtherTechnology

Like I get that it can be a 1 or a 0, and that stores information, but how do you get information out of that? And how do people code with it? Seems like all it could store is numbers

Edit: Thank you all, this is very helpful

In: Technology

26 Answers

Anonymous 0 Comments

So it is true that nobody really codes directly in binary nowadays, but it is absolutely how things used to be done. The key thing you need to understand is that the processor is built to understand a set of instructions, and the people writing the programs know what these instructions are and how they work. Also, the instructions are fixed length. So the very basic loop of how a computer works is “load the right number of zeroes and ones from memory, look at the first so many zeroes and ones to see what my instruction in, execute it, now load the next hunk of zeroes and ones from memory.”

So for example, you the first 8 zeroes and ones might tell say “we’re going to put something into a register, which is like a little storage box that can hold a number.” The computer would then know to look at the next so many zeroes and ones to identify which register, and then the next so many for the actual number. The next instruction could then load another number into another box, and the third instruction could tell the processor to add the values in the two boxes together.

Edit: Oh and as the other comment says, letters are in fact stored as numbers. We just develop standards for, “If I tell the computer to treat this number as a letter, it will use this agreed-upon table to determine which number means which letter.” So operations that work on letters are really just operations that work on numbers with an extra step once we go to display said letters.

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