How does the computer know time?

Tram Ho

When we boot up the computer, we can see the time is displayed correctly on the clock in the right corner. This is a completely normal and obvious thing, but have you ever wondered, how the computer knows the time to display correctly ? Why does it still display correctly even when the device is turned off ? What is the mechanism behind this ?

How the computer recognizes the current time

Most modern operating systems today use the internet to synchronize with time servers ( time servers ). So the computer can recognize the time and display it correctly.

For example, Windows 10 uses a server from the National Institute of Standards and Technology (NIST) to get an exact time. If you visit the NIST time tracking website, you can see it tracks the time in the United States. Of course if you live in another country, the watch on your computer may use a different website, because NIST is only managed by the US government.

1.National_Institute_of_Standards_And_Technology_Website.jpg

Why can we trust NIST or similar organizations in different regions ? Because organizations manage this time using atomic clock Cesium (Cesium atomic clock) to keep track of time. These watches are very accurate, because they do not have moving parts that can cause deviations (such as a wall clock) or data that can be corrupted or altered (like a digital clock). In fact, one second is determined by Cesium’s 9,192,631,770 cycles, meaning that these watches use the same technology that scientists used to define a unit of seconds from the start.

2.Cesium_Atomic_Clock.jpg

How computers remember time?

Take a specific case, when your home internet is lost, it means that the PC can no longer synchronize time. You decide to go to bed, wake up to see that there is no network, you boot up the PC, although not able to synchronize, the computer still displays the exact time.

This is because, even without the internet, your computer can still remember and track the time itself . In fact, your PC is capable of remembering the time in UEFI / BIOS. This is a type of pre-operating system program, it will launch before you boot into the OS and you can see the system clock running when accessing the UEFI / BIOS screen. This is a mechanism that explains the ability of a PC to remember time without the synchronization feature of the operating system.

3.BIOS_clock_Boot.jpg

How does the computer remember the time after it is turned off ? That’s because there is still a clock inside our computer, which helps keep track of time. When the computer is off, the clock will continue to run even when the computer is unplugged. That’s because the motherboard of the computer has a CMOS battery ( Complementary Metal Oxide Semiconductor battery ), which keeps this hidden watch running even when the computer is without power.

4.CMOS_Battery.jpg

This CMOS battery usually lasts about 10 years, and if one day you boot up the computer, and the display time is incorrect, the battery may be dead. You may also receive a CMOS error message on startup.

Above is the mechanism that the computer recognizes and displays the correct time for us.

Share the news now

Source : Techtalk