When you're learning to code, you might have people talk about computers and say, "It's all just ones and zeros."

But what does that mean?

Thread. 👇
Everything you interact with on your machine runs on binary.

All of the things--a website, a graphical user interface, an app, everything--they're all abstractions, built on something that your computer understands as ones and zeros.

But why?
The answer to this can be found when you look into the history of computing.

With early circuits & transistors, there were 2 states you could ever have: on & off.

They let you transmit electrical signals in different ways, usually from an origin to a destination point.
You can think of a transistor as like a room where you have a bunch of switches.

If you need to send an electrical signal from one point to another, you can say, ok, if this switch is on, then an electrical signal can pass through here--but if it's off, then it can't.
Doing this, you're controlling the flow of data and information.

Circuits and transistors at their core were on and off switches, and a nice way of representing on and off is saying, "Okay, if it's off, it's zero. If it is on, it is 1."

In other words, we use the binary system
At this point you might be thinking, how can two states make up all of these incredible things on the internet?

One or zero are just two choices, right?

We represent things not just as one or zero, but as combinations of ones and zeros.
Bits and bytes are parts of how binary gets built up and how it is used. Binary is the counting system.

for every digit in binary, you can only have a 1 there, or a 0 there. That's it.

It's a number system where you are limited to only two possible values in any digit.
A bit is just one digit.

One bit on its own can store 2 possible values, and what makes binary powerful is the fact that a certain number of bits combined together can actually increase how many things you can store.

So 8 binary digits (8 bits) makes one byte of information.
Humans aren't used to binary, as binary is a number system that uses a base 2 and we use a base 10 system.

But for computers, binary is the language they speak.
This entire thread is a summary of the episode Bits, Bytes & Binary from @basecspodcast, my favorite podcast for learning CS.

If you're a beginner and want to learn more (such as how to count in binary) I highly recommend listening:

https://www.codenewbie.org/basecs/3 
You can follow @Madisonkanna.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: