1. An apparatus for measuring a remaining power of a battery unit, comprising: a first memory unit, for storing a first program code; a second memory unit, for storing a second program code, wherein the second memory unit is accessed at a second speed that is lower than a first speed at which the first memory unit is accessed; a processor, electronically coupled to the first memory unit and the second memory unit, for reading the first program code from the first memory unit to execute calculation for current of the battery unit during a normal operation mode, and for reading the second program code from the second memory unit to execute an exception during the normal operation mode if required; wherein the first program code is a routine code, and the second program code is an exception code; and, the processor switches from accessing the first memory unit to accessing the second memory unit to read out and execute the second program code during the normal operation mode if required, for handling the exception.