It's probably analog first, until it runs out of ability to increase it any more, then after that point it's digital IDK. This is how ISO works though, the "main" ISOs below 1600 (3200 on some nicer cameras) are analog gain applied to the elctrical signal, after that point the ISOs are digital gain (multiplcation) applied to the captured image. This is why you shouldn't use digital gain, you can just do it in post later (it's easy for a computer to multiply!), and you have precise control over it, so you're not loosing any data by potentially clipping (multiply large enough numbers together and your result will be greater than what can be stored in a specific number of bits, so it must be clipped to the maximum).