4 Answers

  1. Yes, what is there to the computer, he can do a lot of things. But how did they “explain” to grandma's cuckoo clock what time is?

    They explained it very simply. They hung up a pendulum that oscillated with a certain frequency. This pendulum controls the speed at which one gear turns. And this gear, through other gears, with different gear ratios, is connected to the hands and other mechanisms inside the watch.

    In computers, everything is almost the same, only without moving parts. Various oscillators act as a pendulum, which generate a signal with a certain frequency. If you know the frequency of the signal, say 16 kHz, then the case remains small, monitor the pulse and increase the value of the variable “milliseconds” by one every 16 pulses. magic.

    Oscillators are different. Usually these are metal cylinders or boxes, inside which there is a quartz crystal. Yes, most computers have regular quartz watches inside them.

    Here, for example, is what I found on my desk:

    16 megahertz” pendulum ” Arduino (actually a Chinese clone, but not the point).

    The same garbage from the desktop electronic clock. Well, this watch is also a computer, in fact, with a microprocessor and registers, only for a very special purpose: it can count the time and display it on the display.

    There is another option, almost legendary chip timer NE555. When used correctly, it can also generate a signal of a certain frequency. Its advantage is that by hanging it with the right resistors and capacitors, you can achieve a very wide frequency range from it. It was invented back in the 70s, and is still widely used today. It is arranged in general elementary:�


    PS: The computer does not “understand” what time is. He simply believes that the impulses follow the rules defined by us. That's all. We humans don't really understand the nature of time, either. But that's a slightly different story.

  2. On hardware, there is an answer. I'll be responsible for the programs now.

    Time/date for the program – the number of seconds/days from a certain reference point specified in the program code, for which you need to specify a separate translation algorithm in a human-friendly version.

  3. Think for yourself, how can an electronic machine know the time? This is just a set of schemas. The obvious answer is that everything is God's will. Time is reported to the computer by none other than the Lord God.

  4. Various resonators are used in electrical appliances. Their meaning is that under the influence of electricity, they begin to pulse at a stable frequency. The counter counts the number of these fluctuations and measures the time.

Leave a Reply