A battery pack and a method of operating a battery system. The battery pack includes a rechargeable battery and a processor for monitoring the battery during charging and discharging. The processor receives data values representing the battery voltage, temperature and current, and the processor performs a series of calculations using those data values. The processor is part of a hybrid integrated circuit, which also includes an analog-to-digital converter, a ROM and a RAM. Preferably, the integrated circuit comprises a multitude of layers, upper layers of the circuit form the ROM, and lower layers of the circuit form the RAM.