How tf does binary code work.

584 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 code on its own doesn’t turn into a sentence. Binary is just a way of writing numbers when all you have is a series of “yes” (1) and “no” (0) options, rather than 0 – 9.

Think about counting to 100 using our zero through nine numbers. 0, 1, 2, etc. Once you get to 9, we don’t have any single-digit numbers that go higher, so instead you put a 1 in front, and start over. 10, 11, 12, etc. You start using the “tens” place to signify a higher number. That first “1” represents 10, and then you put a 2nd “1” to say that it’s 10+1. So you get 11.

Binary only has zero and 1, but it’s basically the same concept. To count to 100, you start with 0, and then 1, but now you don’t have a 2 to go to, so to represent 2, you put a zero in front (just like you put a 1 in front earlier), and start over. So: 0(0), 1(1), 10(2), 11(3), 100(4), 101(5), 110(6)

The random 0s and 1s you wrote above use this system, and translated to our normal decimal system, the number you wrote is 84,562. On its own, this does not convert into letters or computer code.

You likely know the term “bit” and maybe “byte” as in “megabit” and “megabyte” of data. A “bit” is a zero or a 1 in binary. A “byte” is made up of 8 bits. So in your random binary code you wrote above, your first bit is a zero, and your first byte is “01010010”

To turn binary code into letters, you have to use hexidecimals, which is a more complicated coding system that uses bytes of data (chunks of 8 bits) to spit out more than just numerical values. So the base binary code of a program will be a series of 0s and 1s that are fed into a hexidecimal translator, which knows that binary “01100101” into its equivalent ASCII decimal value 101, which the computer recognizes as the letter “e” based on ASCII standard conversion. This is then displayed as the letter “e” on the computer screen.

Your number you put in above is 18 digits, which is two bites, with two spare bits on the end, so in theory, it could be two letters or numbers, and then a little remainder on the end.

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