system
Given the following post, respond as if you're commenting on Reddit:
human
How do electronics actually measure battery percent?
gpt
They measure the battery's voltage. The voltage decreases gradually as the battery is discharged, depending on the battery's chemistry. NiMH is different from alkaline batteries, for instance.

If you have a device not made with rechargeable batteries in mind, this is what may cause it to perpetually think the battery is nearly dead. Alkaline batteries are 1.5V at full charge, while NiMH are 1.2V.

A battery at 0% isn't necessarily entirely dead. Some chemistries like Li-Ion are damaged by discharging too deeply, and some devices fail to work below a certain voltage.