You have to look at the entire image processing chain. Here is a block diagram of the overall process.
The light hits the sensor, which when the shutter is tripped the sensor is read (pixel by pixel), the ISO as an amplification is applied (as an analog signal), which then goes through an Analog to Digital Converter (ADC). This is a piece of hardware, that quantizes the analog signal into a set of digital bits. The ADC has a specific output (8, 10 12, 14, 16, ... etc.) bits wide. Then the now digital word that represents that pixel in terms of how much light it collected is passed to the digital signal processor and the general processor for further processing and saving to the SD card.
The ADC is done in hardware due to the speed required. To do it in software (which would still use hardware for a large part of the operation) would be cumbersome, slow, and just consume a lot of power. So, no it would not be a change that could be done in firmware.
Here is a simplified high level block diagram for a digital camera.
When you think about it, you are taking a 16MP sensor - 16 million pixels (or what ever size - 50MP is even worse), taking each one, processing it into a image, and then storing it. Doing this 7 or so times a second. That's a lot of bits flying around. Then there is the battery that powers the whole shebang for about 600 images at a wack. It really is a wondrous Ruth Goldberg contraption - that you can hold in your hand....