How tf does binary code work.

620 views

it’s just a bunch of 0’s and 1’s.. like I can just put a bunch of them and somehow make a sentence??? like what does this mean -> 010100101001010010 (i legit just spammed 0’s and 1’s)

In: 0

26 Answers

Anonymous 0 Comments

Binary is just another way of writing numbers.

Binary is based on powers of two instead of powers of ten. So instead of ‘how many ones, tens, hundreds, thousands… are in this number?’ it’s ‘how many ones, twos, fours, eights, sixteens… are in this number?’

For example, ‘10010’ from left to right means ‘one sixteen, no eights, no fours, one two, no ones’. So that’s binary for eighteen. In regular numbers, that would be ’18’ (one ten, one eight).

Anyway so they’re just numbers. Now how do you write stuff with numbers? Any way you’d like! You could assign a number to each letter, for example. But you’ll also need ways to encode punctuation, and special characters, and emojis…

The most common solution in use for text is called [Unicode](https://en.wikipedia.org/wiki/Unicode), which is an encoding we’ve agreed to use that maps numbers to all of these characters.

But computers don’t really ‘read’ characters, they just need to read instructions so that they can run programs. These instructions are encoded as numbers in what’s known as [machine code](https://en.wikipedia.org/wiki/Machine_code). Like Unicode, it’s just a code we’ve agreed on that connects numbers to meanings – in this case, stuff like ‘change this bit, or read me this piece of your memory’. That’s how computers can run programs from binary!

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