4 = 2^2 therefore log2 0f 4 is 2
8 = 2^3 therefore log2 0f 8 is 3
16 = 2^4 therefore log2 of 16 is 4
32 = 2^5 therefore log2 of 32 is 5
etc.
So,
if you are dividing by 4 then you would put 2 (which is log2 0f 4) in the input register R13
if you are dividing by 8 then you would put 3 (which is log2 0f 8) in the input register R13
if you are dividing by 16 then you would put 4 (which is log2 0f 16) in the input register R13
if you are dividing by 32 then you would put 5 (which is log2 0f 32) in the input register R13
etc.