How does a CPU choose a path?
What do you mean by saying "choose a path"?

All a modern CPU is, is a fancy hardware interpreter. It starts like this:

You issue a command in a high level language like:

i = 5 + 6;


This gets translated to machine instructions (and pseudo instructions), commonly known as assembly, by the compiler:

mov ebx, 5
mov eax, 6
add eax, ebx


This gets translated to bytes, the direct equivalent of assembly that the cpu can understand, by another class of translators known as assemblers:

01010111 00110101 00000101
01010111 00110111 00000110
01111111 00110101 00110111


The Control Unit of the CPU, then reads the first byte of the instruction, rougly known as opcode. Depending on the opcode, the control unit asserts control signals to different parts of the cpu, such as enabling one register to send its contents to the ALU, or reading from the instruction store to a register, etc, depending on the instruction.

For instance, in the above example, 01010111 or what you know as mov instruction, might
signal passthrough of the immediate value 5 through the ALU to the register known as 00110101 or eax.

The internals of the interpreter, or the control store, or however it's called in different implementations, differ from implementation to implementation. For example, in a microcode
storing implementation, there might be a small memory mapping opcodes to corresponding signals, likewise:

01010111 -&gt; enable_ALU_passthrough, reg, immediate_val
01111111 -&gt; enable_ALU_add, reg, reg


That's a rough example of how a cpu might work. Values are approximate and almost certainly are not correct. If you want to dig through, I recommend the excellent Structured Computer Organization by Tanenbaum which walks you through building a simple CPU interpreting java bytecode in the first few chapters.