I am new to assembly and my question is:
If a machine has, for example, n registers. How many bits need to be reserved in the assembly instruction to address each of the n registers?
And by how much could a functional split reduce the bits needed?
There is no universal answer to this. Obviously you would need at most enough bits to store the number of registers. So if you have 12 registers, you'd need 4 bits (2^4 == 16).
But an instruction set could treat some registers in different ways (for example, have instructions that implicitly addresses only a specific register; see LOOP
for x86). So a CPU could have 9 registers, but since one can only be accessed with specialized instruction you'd only need 3 bits to address the remaining 8. Also, some instructions can allow only a certain subset of registers, thus also reducing the amount of bits required to address them (say, an instruction only allows to operate on registers 0–3).
And to make it even more complicated, there's register windows which only make a subset of the physical registers available to the instruction set.