Eli5 Where exactly do computers make decisions?

751 views

I understand the concept of coding, that it’s a bunch of if/then/unless kind of hardwired decisions. But where, PHYSICALLY, and how does this happen? This one I need actually explained like I’m five. I’ve never understood how code physically implements itself into fruition.

In: 1

10 Answers

Anonymous 0 Comments

A processor has a “program counter”. This is basically a number that says which instruction is next. The CPU reads and executes the instruction at that location then increases the program counter.

A jump simply changes the program counter to a completely different number.

We also have conditional jumps. We can jump if the result of the previous instruction was zero, or negative.

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