A main battery used as an electric power unit for a computer is provided with
a
memory that stores capacity information denoting the total capacity of a battery
and compensation information representing the total capacity of the battery as
a function of a battery charging cycle count. A CPU detects a cycle count of the
battery according to an integrated charged capacity of the battery, thereby obtaining
the total capacity with respect to this cycle count from the compensation information
so as to compensate the capacity information according to the obtained total capacity.