how does computer display/draw "A" on the screen?

Thread Starter

PG1995

Joined Apr 15, 2011
832
Hi

When I press the key "A" on the keyboard, it is interpreted as "1000001" where "1" stands for high voltage and "0" for low voltage. In other words, pressing the "A" key generates a square wave having two high levels and five low levels. But how does computer display/draw "A" on the screen after getting this signal? Does it have some built-in function which tells it how to spread pixels on the screen so that the spreading suggests the shape "A"? Thanks for your help.

Regards
PG
 

samin

Joined Oct 14, 2011
32
Hi

When I press the key "A" on the keyboard, it is interpreted as "1000001" where "1" stands for high voltage and "0" for low voltage. In other words, pressing the "A" key generates a square wave having two high levels and five low levels. But how does computer display/draw "A" on the screen after getting this signal? Does it have some built-in function which tells it how to spread pixels on the screen so that the spreading suggests the shape "A"? Thanks for your help.

Regards
PG
Then, the operating system software decides which window you pressed the key in and sends a message to that window telling it a key was pressed.
The window decides what to do with the keypress. Since in this case it's your word processor window, and the key you pressed was an ordinary letter, the word processor will add that letter to its working area for the file you have open. The letter will take one byte of your computer's memory (RAM). Other keys could be handled differently (for example, if you pressed the key to tell the word processor to exit).
The window will then call the operating system to display the letter on the screen.
The operating system will display the letter on the screen by adding it to your video card's video memory.
The next time the video card refreshes your monitor (re-displays what is in its video memory) the letter will appear on the screen. Most video cards refresh the monitor between 60 and 100 times per second.
 

MrChips

Joined Oct 2, 2009
30,808
There are probably a dozen answers to this question. Kermit2 gave you the answer from a digital hardware guy. Samin gave you the software systems approach. Ask a TV repairman and he might give you the analog answer. A font typeface designer will give you an different answer. An assembler programmer's answer will differ from that of a C++ programmer. Which one do you want to hear?
 

VoodooMojo

Joined Nov 28, 2009
505
There are probably a dozen answers to this question. Kermit2 gave you the answer from a digital hardware guy. Samin gave you the software systems approach. Ask a TV repairman and he might give you the analog answer. A font typeface designer will give you an different answer. An assembler programmer's answer will differ from that of a C++ programmer. Which one do you want to hear?
or, as my wife points out, "Its f***ing magic....I don't give a s**t how it does it....it just isn't doing it NOW....so FIX it!!!!!"
 

eblc1388

Joined Nov 28, 2008
1,542
In other words, pressing the "A" key generates a square wave having two high levels and five low levels.
Definitely not.

Pressing the key marked "A" on the keyboard will signal to the keyboard processor that the specific key(which is key no. 1C on a PS/2 keyboard) is closed/pressed. The keycode is then sent to the PC.

The keycode 1C = key is make(closed).

If you release the key, the break code(F0) and keycode 1C will be sent.

Now the software running on the PC will decide on what keycode "1c" means on various locale keyboard definitions and calls up the pixel information of it. For English and US keyboard, "1C" means "a" so the pixel information of "a" will be displayed. If you have also pressed the shift key, the software knows and then even if the keycode is still 1C but then "A" will be display instead.
 
Last edited:
Top