system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did the first computer code know what to do?

If you think about it, when you type a code into a computer, it usually is a key / has key elements that affect currently existing codes. How was the first one created if there were no prior codes?
gpt
It's built right into the hardware. Every processor has a device called an *instruction decoder* which takes machine-code instructions and translates them into the electrical signals that drive the various components in order to carry out the instruction. That instruction decoder is in turn from logic gates just like all the other parts of the CPU.

Computers do not "know" anything. They are machines that blindly manipulate data according to set rules that are designed into them by the engineers who built them.