This post will explain what is happening inside the computer when you press a key in a keyboard.
Today whomever using computer, will use a keyboard to give inputs. Whenever a person enters a text, it will reflect in their console/monitor, with that everyone fulfilling their needs. For non IT guy, it’s not necessary or not even a rise of thought how the computer works. Of course, their main Motto is to thrive their business, but a Techie should know.
Some techies wondered this and surfed the internet, and some yet to wonder 😀 . I am one of those who wondered, surfed and here to share the knowledge. However this post doesn’t get into deeper in technical aspect, its just an idea of how the things works. So, let’s get into the topic.
g
Language is a basic thing for humans to interact, likewise a language is necessary to interact between a human and machine. Computer/Machine can understand only two things named 1 and 0. It’s like binary signal ON/OFF aka TRUE/FALSE aka 1/0.
01100111
Combination of these signal will make sense to what we need to view in screen. For example, ‘g’ letter is equals to 01100111. Each key in keyboard has its own combination of binary signals/digits.
So, whenever you press ‘g’ letter in keyboard, it will pass 01100111 to CPU. Now, the brain of the computer need to represent a ‘g’ shaped letter in the screen. For that it seeks the OS help to draw ‘g’ shape in the screen. Operating System is an ocean to learn, which acts as a commander to CPU.
In the machine world, a set of Unicode is following, to represent the human readable character in the screen. Unicode is nothing but a set of binary digits will represent a particular letter which are accepted and following by the world at present. Like this standardized Unicode, there are lot of standards like ASCII, Unicode, etc. Like OS, this character representation is also another ocean.
Our OS, which is having the Unicode list will instruct the CPU to follow the set of instructions in order to draw ‘g’ in screen.
By following OS instructions, CPU will store the results as Pixels in Memory. This pixel result will be represented as binary and send it to Monitor. Monitor which is an output device will convert those pixel’s binary digits to Tiny lights & colors in the screen. Monitor is nothing but the combination of pixels, CPU will instruct them to turn ON which pixel at what color. Finally, these will represent the ‘g’ in the screen.
Some people may faced the situation of a random black dot/code on their laptop screen which indicates, defect of the pixel. In that time, if CPU sends the binary signal to those pixel, it won’t switch ON and remains black.
So, to display a letter, a computer runs nearly 1000 instructions inside. However we doesn’t feel any delay while we typing. Then think how fast it works.
Hope, every reader of this post have gained some knowledge in this topic.