A method of charging a battery of an electronic device, the method comprising: performing one or more operations of the electronic device; detecting a connection of a charger to the electronic device (operation 411; 511); determining a type of the connected charger (operation 413; 513, 531); determining whether the charger is a high speed type charger based on the type of the charger (operation 415; 533); charging, if the charger is the high speed type charger, the battery with output of the charger (operation 417, 431; 517, 535); and, if the charger is not the high speed type charger: determining a charging power and a discharging power (operation 435; 537), wherein the charging power is a power received from the charger, and the discharging power is a power provided for operations of the electronic device; determining whether the electronic device is in a normal charging state or an abnormal charging state according to a difference between the charging power and discharging power (operation 437; 539); when the electronic device is determined to be in an abnormal charging state, determining whether a residual capacity of the battery is equal to or less than a capacity threshold value (operation 541); when the residual battery capacity is equal to or less than the capacity threshold value, restricting a supply of operation power from the battery according to the difference between the charging power and discharging power such that the one or more operations of the electronic device are still performed, but the power consumption of at least one of the one or more operations of the electronic device is reduced (operation 439; 543); and when the electronic device is determined to be in a normal charging state, supplying the operation power (operation 441; 545), wherein the normal charging state is a state in which the difference between the charging power and the discharging power is greater than a predetermined threshold, and the abnormal charging state is a state in which the difference is less than or equal to the predetermined threshold and wherein, if a high speed charger is connected, the control unit controls such that the normal operation power is supplied in the charging mode (operation 417). performing one or more operations of the electronic device; detecting a connection of a charger to the electronic device (operation 411; 511); determining a type of the connected charger (operation 413; 513, 531); determining whether the charger is a high speed type charger based on the type of the charger (operation 415; 533); charging, if the charger is the high speed type charger, the battery with output of the charger (operation 417, 431; 517, 535); and, if the charger is not the high speed type charger: determining a charging power and a discharging power (operation 435; 537), wherein the charging power is a power received from the charger, and the discharging power is a power provided for operations of the electronic device; determining whether the electronic device is in a normal charging state or an abnormal charging state according to a difference between the charging power and discharging power (operation 437; 539); when the electronic device is determined to be in an abnormal charging state, determining whether a residual capacity of the battery is equal to or less than a capacity threshold value (operation 541); when the residual battery capacity is equal to or less than the capacity threshold value, restricting a supply of operation power from the battery according to the difference between the charging power and discharging power such that the one or more operations of the electronic device are still performed, but the power consumption of at least one of the one or more operations of the electronic device is reduced (operation 439; 543); and when the electronic device is determined to be in a normal charging state, supplying the operation power (operation 441; 545), determining a charging power and a discharging power (operation 435; 537), wherein the charging power is a power received from the charger, and the discharging power is a power provided for operations of the electronic device; determining whether the electronic device is in a normal charging state or an abnormal charging state according to a difference between the charging power and discharging power (operation 437; 539); when the electronic device is determined to be in an abnormal charging state, determining whether a residual capacity of the battery is equal to or less than a capacity threshold value (operation 541); when the residual battery capacity is equal to or less than the capacity threshold value, restricting a supply of operation power from the battery according to the difference between the charging power and discharging power such that the one or more operations of the electronic device are still performed, but the power consumption of at least one of the one or more operations of the electronic device is reduced (operation 439; 543); and when the electronic device is determined to be in a normal charging state, supplying the operation power (operation 441; 545), wherein the normal charging state is a state in which the difference between the charging power and the discharging power is greater than a predetermined threshold, and the abnormal charging state is a state in which the difference is less than or equal to the predetermined threshold and wherein, if a high speed charger is connected, the control unit controls such that the normal operation power is supplied in the charging mode (operation 417).