Home
Matches
Leaderboard
Learn Hub
Store
0
Home
Learn Hub
Technology
How does a computer keep the correct time even when switched off?
💻 Technology

How does a computer keep the correct time even when switched off?

Test yourself first — take the quiz below, then read the full answer.
QUIZ
How does a computer keep the correct time even when switched off?

Time That Survives the Power Going Off

It is easy to take for granted, but it is a small puzzle. When a computer is off, almost everything inside it is dead. The processor stops, the memory clears. Yet the moment you switch it back on, the clock shows the correct time, even days later. So something inside must keep ticking while the rest of the machine sleeps.

A Tiny Clock With Its Own Battery

The answer is a small dedicated chip called the real-time clock. Its only job is to keep track of the time and date, and it is built to sip almost no power. To keep it running while the computer is unplugged, it is paired with a tiny battery, often a flat, coin-shaped cell on the main board. That little battery quietly powers the clock chip for years, so the time keeps advancing even when the computer is completely off.

Keeping in Sync Over the Internet

A small clock left to itself slowly drifts, gaining or losing a little time. To stay accurate, most devices today also correct themselves over the internet. They contact special time servers using a system called the Network Time Protocol, ask what the precise current time is, and adjust their own clock to match. This usually happens automatically in the background, which is why a phone or computer that is online almost never shows the wrong time, and why it can fix itself even after the small battery dies.

Why Accurate Time Matters

Keeping the right time is more important than it first appears. File timestamps, alarms, and calendars all depend on it. So does a great deal that happens out of sight: secure connections rely on accurate clocks to check that security certificates are still valid, and networks use precise time to keep events in the correct order. A clock that is badly wrong can even cause websites to refuse to load securely, which is one reason devices work so hard to keep it correct.

Source

This article was written using information from Wikipedia.