How does machine code work?

How does machine code work?

Attached: Assembly-Language-vs-Machine-Language-1.png (802x444, 50.99K)

Other urls found in this thread:

simplecpudesign.com/simple_cpu_v1/index.html
en.wikipedia.org/wiki/Punched_tape
twitter.com/NSFWRedditGif

You ask too many questions

You get too many answers

It doesn't.

exactly like pic related computer just reads 0 and 1

But how do those 1 and 0 work

Like this simplecpudesign.com/simple_cpu_v1/index.html

Later you can add pipelining, Tomasulo's algorithm, etc.

The machine code data bits toggle the CPU integrated circuit switches directly. The completed circuit carries out a single operation the result of which is more data bits.

fueled by the power of cunny.

>At its lowest level every operation in the computer is performed by logic gates

I thought that's just FPGAs lmao

lots of logic gates in the CPU

it's assembly but instead of being readable, each instruction is mapped to a number

CPUs are breadboarded using FPGAs. An integrated circuit found in a CPU is essentially just a frozen (and optimized) circuit that you'd use in an equivalent FPGA.

then, how did you think CPUs computed? what concept was in your head?

en.wikipedia.org/wiki/Punched_tape

It's the same idea except without the actual physical tape.

I wouldn't want to know. You couldn't even understand hard drives in 2011, they wrote to the disk in nontrivial proprietary sectors (unlike in a CD like you would imagine). CPUs should be even further codegolfed

memory has a bunch of values in it. CPU starts up, has an internal counter of which value in memory it's executing. CPU reads that value in memory, interprets it as an instruction (as in, if the value is 1, add some numbers, if it's 2, subtract some numbers, if it's 3, jump to the instruction specified in the next byte, etc). CPU writes values back to memory sometimes as it goes. That's pretty much it. That behavior is implemented using logic gates. If you're wondering how that's possible, think about it for a bit. If you're having trouble, read nand2tetris or go look at monster6502.

Then what is the difference between FPGAs and ICs?

What equipment would I have to have to reverse engineer a modern CPU? Is it even possible?

they don't use logic gates. they use circuits using transistors, what logic gates are made out of, for logic. logic gates are a subset of integrated transistor circuits and CPUs/ALUs/etc. are separate subsets. a CPU made out of logic gates would be very wasteful in nearly every way. the "logic gates" used in logic diagrams do not represent physical logic gates.

FPGAs consist of lots of logic elements that are connected to each other with an interconnect that you can configure. It's functionally equivalent to building stuff with discrete logic ICs on a breadboard but everything happens within the chip. ICs on the other hand have a fixed purpose, you can't reconfigure them. Manufacturers prototype their designs on FPGAs first and then use the design to manufacture ICs.

Thank you very much for your informative replies, frens.

Love to learn more about this stuff from more knowledgable people