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

Yes, the only thing it can store is numbers, but you can represent different things with numbers. For example, the numbers will correspond to different instructions on the CPU. So if the CPU sees 100110 at the start of an instruction, that could correspond to “add these two numbers together” or “write this value to this register”. The CPU is designed to check the next few blocks of bits to figure out which two numbers we’re adding or which register we’re writing to, and then anything after that is the next instruction.

For other kinds of data, we’ve found different ways to turn numbers into other things. For example, we’ve assigned numbers to every character you can type on a computer. So an A is 65 and 😀 is 128,512. When you are writing code to deal with text, you’ll know to treat those values as text rather than numbers. 

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