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

Discussion in 'General Electronics Chat' started by PG1995, Oct 16, 2011.

  1. PG1995

    Thread Starter Distinguished Member

    Apr 15, 2011

    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.

  2. Kermit2

    AAC Fanatic!

    Feb 5, 2010

    That is how it is done. The computers of today don't use a 'ROM' chip anymore. They do however create something that functions the same way, by loading a font file into a memory location which thereafter functions in the same way as the described ROM chip.
    PG1995 likes this.
  3. samin


    Oct 14, 2011
    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.
    PG1995 likes this.
  4. MrChips


    Oct 2, 2009
    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?
  5. VoodooMojo

    Active Member

    Nov 28, 2009
    or, as my wife points out, "Its f***ing magic....I don't give a s**t how it does just isn't doing it FIX it!!!!!"
  6. eblc1388

    AAC Fanatic!

    Nov 28, 2008
    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: Oct 22, 2011