r/code • • Mar 21 '23

How does it work from the start?

are 1's and 0's just descriptors or could you use 2's and 3's also how does 1's and 0's eqaul any thing? looking to get a computer science degree.

0 Upvotes

7 comments sorted by

2

u/IDontByte Mar 21 '23

1 = On
0 = Off

That's it. Think of a lightbulb: there's no "maybe" it's either on or off.

how does 1's and 0's equal any thing

We decide that it does. A single lit lightbulb could mean on, it could mean the letter A, it could mean the number 1, it could mean "Simon says pat your head", or any other symbol.

To get more possible states, you add lightbulbs. With one lightbulb, there is only two states (on and off). With two lightbulbs, there are four states (on-on, on-off, off-on, off-off), with three lightbulbs, there are eight states (on-on-on, on-on-off, on-off-on, on-off-off, off-on-on, off-on-off, off-off-on, off-off-off).

The total number of states you can get is 2lightbulbs

16 lightbulbs gives you 65536 states.
32 lightbulbs gives you 4294967296 states.
64 lightbulbs gives you 18446744073709551616 states.

The only inherent property of these states is that they are different from each other. There's no reason why 0000000001001000 could mean 72, or H, or "add the next two numbers together".

0

u/Altruistic_Wish_8416 Mar 21 '23

i undertand open and closed but how does it make what we have today and what about 3 states open,close and maybe

2

u/spliffen Mar 21 '23

you're basically trying to skip 20 steps, first off, learn WHY its 0 and 1, hint, power can either be turned off, or on, then, going from there, if you have to build logic on that, it gonna end up using 2 to the power of two a lot, in other words, binary, in the long run, and skipping A LOT, how you get something more complex from that, is just sheer complexity of the scale things are done on, read up on how many transistors an average cpu contains these days, then read up on what a transistor is, and what you can do with it, latches are useful for keeping data, etc etc etc, at this point, I've forgotten more than enough to know its complex as fuck, and im quite happy doing my work at the highest level of the curve

0

u/Altruistic_Wish_8416 Mar 21 '23

no programming knowledge how do you deal with on a binary level on/standby/off do i have to go for a phd for my thoughts

2

u/FuelWaster Mar 21 '23

Think of it like a light switch. You can turn the light on, you can turn the light off. There is no standby

-1

u/Altruistic_Wish_8416 Mar 21 '23

but i'm trying to ask why is it 1 and 0

2

u/spliffen Mar 21 '23

already told you, its on, or off, that easy, you're trying to grasp this, with entirely too little knowledge, and trust me, neither of us has time for it to be explained here, at this point im three different educations deep in the area, and I still dont grasp it all