Okay anons. Legit. How do computers work?

Okay anons. Legit. How do computers work?

No no no I don't mean some bullshit answer like: "Oh the hard drive does this and connects with that and does this." No fuck you. break it down further.

"Yeah well it does things in the terms of 0s and 1s where 0 is an off and 1 is an on" no also fuck you. I mean really. How do computers work?

"user wtf are you talking about."
So when I break it down and look at not an entire component but just an individual logic chip... it is a chip that has an input and then an output. it inputs, does a function based on some assembly logic and then applies the output.

SO THEN HOW THE FUCK DOES IT UNDERSTAND ASSEMBLY?! Who coded this and why does nobody know this outside of super-genius level people in the fucking 50s/60s working with vacuum tubes and shit. None of us understand this shit and if you do, please... educate me. how does assembly work and who coded the logic so these chips understand assembly. What is below assembly? Just binary? Someone coded an entire working language in assembly and made a chip understand wtf it's saying based off of a single transistor? Where is the fucking connection and it's driving me insane thinking about it.

Lets say I gave you some fucking wires and some damn transistors to play with, can we make a piece of code to make the wires and transistors talk in a way that is meaningful?

Attached: file.png (200x214, 48K)

Other urls found in this thread:

youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBypGqImE405J2565dvjafglHU
nand2tetris.org
f.javier.io/rep/books/The Elements of Computing Systems.pdf
nandgame.com/diagram
twitter.com/NSFWRedditImage

Sounds like you need an into course in digital electronics. Those usually walk you through building logic gates out of simpler logic gates, simple memory and machines using them (counters adders, etc), more complex out of those, all the way up to instruction memory and a trvial calculator circuit or cpu.

Elements of a modern computing system is good. any deeper is digital electronics

cables go into monitors and benis into bagina :D

so a digital electronics course is the way to go? I'm genuinely curious as this is the type of shit that future civilizations will think of us as this magical godlike beings of intellect making artifacts of pure magic. We need to have this shit written down on a big ass stone and planted in the middle of the White House or another monument where people will dig it up and find it like we did with the Rosetta stone understanding Egyptian.

Right now as far as what I understand in computers is pretty much it is fucking magic and impossible to understand currently.

Do you know how logic gates work, OP? If yes, then learn how to make counters and ALUs. A microprocessor consists of ALUs and memory controllers, more or less, and are able to fetch instructions from memory and feed it to the ALUs.

ALUs are basically just logic gates that interpret input (opcodes and operands) and give you an output value.

If you don't understand how logic gates work, start by learning how logic gates work.

Look up Crash Course Computer Science in YouTube. It describes computers from binary, to logical circuits, to instructions and programs.

Attached: 1532101700188.png (506x662, 312K)

>inb4 what is memory
Here is where transistors come in to play, transistors can store a state.

>ehh fucking learn

yeah thank you for the guide and I plan on following up with it but is there anybody that can give even a piece of a synopses to this?

You literally stated in OP that you don't want bullshit explanations. If you want an in-depth explanation, you have to put in some effort to understand yourself.

"Assembly" is just loading instructions (machine code) into registers which are then interpreted by the microprocessor by reading the value (opcode) and additional input (operands). If you want to understand how registers are implemented physically, you need to dig into digital circuits.

it's pretty easy to learn if you look up how things like older 8bit computers worked
modern computers aren't magic, they just have a LOT of transistors running VERY fast, they perform complex tasks though sheer brute force (complex tasks are just comprised of many, many elementary tasks)

No bullshit explanation? Don't think I'd be able to fit that in a post (but I plan to explain it in a blog post someday), but I can recommend some nice resources for you:
Read "Computer organization and design" by Patterson, it's my favorite book on the topic.
You can also play nandgame.com, it walks you through simple circuits into a simple CPU that's able to understand opcodes.

Youre probably a troll or retarded but ill bite

Basically you have "instructions" that tell a processor to use certain circuits inside a processor. Think of it like a selector switch. You put the instruction "add", it takes 2 values from registers and then lets the add circuit run.

Very simple. Assembly just corresponds to circuits insude the processor.

so you tell it to ADD and it does its 2 + 2 = 4 -3 thats 1 quick maths. Now... how does it understand that code?

At a basic level it understands that 0+0 =0, 0+1=1, 1+0=1, and 1+1 = 1 plus carry the 1.
bigger numbers just use more this operation in parallel i.e. 0000+0001=0001 etc

your welcome

youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBypGqImE405J2565dvjafglHU

Attached: topkek.jpg (900x648, 145K)

This will teach you everything you want to know and more, for free.

nand2tetris.org

Why do you lazy faggots just link random shit? WHY CAN'T YOU JUST EXPLAIN IT SIMPLY TO ME?! REEEEEEEEE

Attached: pepe-reeeee.jpg (225x225, 4K)

Computers are a series of tubes. Electricity goes in, electricity comes out.

I don't know about the US but in non shit parts of europe in basically any university course that deals with electronics in some way (cs, ce, ee, physics etc) you are almost guaranteed to have one semester of digital electronics where you go from simple circuitry, gates and registers to ALUs and controllers.
Basically OP, save yourself the expense and grab a good book on the topic.

Why do you lazy faggot expect us to do all work if you're not willing to put in any?

Because it's too complex for a 4chin post. You start with logic gates and build a full adder (4 bit recommended) which lets you do binary addition, then you add some memory so you can store some numbers, have a way to load them into your adder, and create an instruction set so you don't have to manually switch stuff for every step of a program. That vid series doesn't take very long to watch, and you'll learn new stuff with each chapter.

>call others lazy
>be too lazy to learn
Dump frogposter, don't come back.

its a series of tubes.

>this is what haskell fags unironically believes
Functional programming rots your brain.

damn that is pretty cool.

They are right though.

Read a book about digital electronics and computer architecture.

so far the most digestible thing I have seen so far thanks user.

The ALU is built out of logic chips and has a number of wires coming into it, some being data and some being instructions and it has wires going out of it indicating data and flags, the state of the ALU is evaluated according to the oscillator clock. You can make a truth table of the possible states of the ALU and the underlying logic just needs to fulfill that table.

Assembly instructions stored in ROM are just a series of states the CPU control pins are at certain instruction, on the first instruction these wires are high and these are low and so on, you can somewhat safely ignore the actual implementation with transistors for now as you can build this with any sort of logic

Attached: 74181aluschematic.png (918x694, 22K)

>"duuuude... what if... what if computers were, like, connected, right? like connected, like a series of garden hoses... like tuuuubes... like dude, you could just connect more tubes to it, like pipes"

Read this book

Attached: code.jpg (320x475, 13K)

God you are retarded.

Says the person replying "computers are series of tubes" when OP asks how computers work....

> HOW THE FUCK DOES IT UNDERSTAND ASSEMBLY

Assembly is just notation for the underlying machine code. An assembler translates assembly to raw binary instructions.

If you have an n-bit machine, each raw instruction is n bits. Each of the bits in the instruction are representations of voltage applied to different parts of the underlying circuit to make the circuit do different things.

check this book
f.javier.io/rep/books/The Elements of Computing Systems.pdf
it gets you from digital gates to software

Because computers aren't simple.

and the game-styled version I found recently
nandgame.com/diagram

It's actually pretty simple. Assembly instruction are actually stored as opcodes, which are essentially 2 byte numbers that are in memory. Loaded into memory by another process, or whatever. The processor reads the memory and then reads the 0s and 1s where the opcode should be, goes 'ah that's instruction 010001011...' and then performs that operation on the sequence of memory next in line (or whereever ,it depends on the opcode)
Not too hard, really.

Go read about building a state machine from an EEPROM and a latch. It's just about the simplest circuit you could reasonably consider "programmable".

On the most basic level you can get a CPU consisting mainly of an ALU, a program counter and some registers. Some memory connected to that one, a set of instructions that the ALU can understand. How the ALU understands these instructions is a principle of design in the end its just how you connect the individual logic gates.

beyond that: how does it understand assembly? machine code can just be represented by fixed length instructions in binary and that is fed into the cpu and works on its logic. the kind of instructions are cpu dependent and can differ between types of cpu. x86 assembly is very common today though.

if you want to know how memory and address space works thats beyond the scope of a single post, but its all out there to look it up if youre motivated.

Because it's not simple, especially for someone that doesn't know any digital logic. You might as well ask us to explain calculus to someone that doesn't even know algebra.

nand2tetris.org

people make computers in shit like minecraft all the time go look it up on youtube

s t a t e s

But you can't just say "add memory"...what does that mean on the most basic physical level?

have you ever looked at a circuit diagram? you can build circuits that store memory, circuits that add and preform other mathematical operations, your computer is millions of those

Magic.

How do computers work?

Datapath, Control, Memory, Input, Output.

Came to post this

A transistor is a switch that turns on when it receives power.

A trivial form of memory is connecting the switch to itself, so that once it's turned on, it remains on.

This is a write-once bit of memory.

Not Op, but thanks for the suggestion. I'm watching these videos right now

Attached: effective.png (400x119, 3K)

I have exactly what you need.

Basically but with a typical microprocessor the instructions are etched into a small silicon wafer using photo resist techniques that involve layering of materials and exposure to light and acids. If all goes well, you have a computer. Also keep in mind that an instruction set architecture should not be thought of as what's actually on the silicon, but what can actually accessed by the user in software, because that's all that really matters. There's a lot of internal stuff that goes on in modern chips that's proprietary, but x86 chips and the like will always expose common interfaces for software to utilize. Maybe you should focus on these instructions first.

And when you're done, realize that RISC is superior in every single way because software can be rewritten and hardware cannot.

Attached: 8e7.jpg (528x404, 20K)

Take a course on computer engineering.
At the most basic level a Computer is a circuit that can do some very basic instructions such as "read the thing written here" or "add these numbers together".

>Lets say I gave you some fucking wires and some damn transistors to play with, can we make a piece of code to make the wires and transistors talk in a way that is meaningful?
If you give me sufficient amount of time and a book on computer engineering as reference I could.

> WHY CAN'T YOU JUST EXPLAIN IT SIMPLY TO ME?! REEEEEEEEE
Computers are the most complex things Humanity has ever created, there is no simple explanation.

This.

>You start with logic gates
So how the fuck do logic gates work?

Read this book, and check out Ben Eater on Youtube.

Attached: 41mUjO6TGkL._SX331_BO1,204,203,200_.jpg (333x499, 30K)

>How do computers work?
Pretty well, all things considered.
And far better than they used to.

Detect high or low voltage (0 or 1)

What about the physics that makes computers work/possible? How do I learn that?

Read SICP and CODE
>tl;dr transistors