Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.
Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.
Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.
What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.
So how does the mschine differentiate between the various impulse lengths to cause different effects?
Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.
Problem is, that would require an absurd number of switches like millions. So its not really practical.