"Assuming you are using a multi-tasking operating system like Windows, 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." -PCGuide
I'm wondering if the ASCII is stored in the Operating System? [because that's where it will look up the binary (10000001) and convert it base on ASCII (capital leter "A" in ASCII)] If so, where is the Operating System Stored? Is it in ROM, BIOS?
3 Answers
The Operating System is stored on the Hard Disk, but on boot, the BIOS will start the Operating System, which is loaded into RAM, and from that point on, the OS is accessed while it is located in your RAM.
I'm wondering if the ASCII is stored in the Operating System?
ASCII is a standardized code that maps letters, digits, punctuation marks, and other symbols to numeric values.
FYI the PC keyboard does not generate ASCII codes, but rather scan codes.
It's up to the keyboard driver (which is part of the OS) to convert the scan codes of the key that was pressed (and released) into an ASCII code.
Such data is processed by the operating system; such data is not "stored in the Operating System".
If so, where is the Operating System Stored? Is it in ROM, BIOS?
The executable image of the operating system is stored in a mass storage device.
For PCs that is typically a HDD or SSD.
But historically floppy diskettes have also been used.
The OS could also be booted from CD, DVD, or USB flash drive.
In a broader context (i.e. beyond the ubiquitous Wintel PC), a computer could load (i.e. transfer the OS image into main memory, RAM) from any number of sources, including another network host, or SDcard, or raw flash chips.
The method/source of loading an OS image is limited primarily by the capabilities of the bootloader program.
ROM is memory whose contents are "written" when the semiconductor is masked during fabrication. IOW the code is permanent for the life of the chip.
Since the contents of ROM cannot be changed, and an OS is rarely ever bug-free and therefore requires updates, don't expect to find an OS image stored in ROM.
The BIOS is code for performing configuration, initialization, and a first-stage boot program.
It is not a storage device.
Note that the (typical) CPU requires that the code that it executes must reside in main memory. Therefore the (image of the) operating system must be transferred (aka loaded) into main memory for execution.
So for operational use of the computer, the OS resides in RAM.
Addendum
I've noticed that marketing blurbs for tablets and smart phones may have specifications for the device's "RAM and ROM" capacities. Apparently the RAM capacity is for the (traditional) main memory available for use by the CPU, and the "ROM" capacity actually refers to nonvolatile storage (e.g. some type of NAND flash) for firmware.
This "ROM" specification has nothing to do with actual read-only memory. It is actually writeable memory, and its purpose is a storage device.
ASCII is intrinsic to the PC - handled at the CPU/GPU level, and as well as the OS, with extended character sets and interpretations very often are up to the OS. The OS can probably also map ASCII characters to other ones.
As you have deduced, ASCII is simply a representation of 8 bits - These bits can be stored in BIOS or on any kind of storage, including - temporarily CPU registers.
Very commonly basic functionality built into pretty much any GPU is used in the early stages of booting, typically replaced by fancy fonts and rendering in more graphically ways by a combination of the OS and GPU (this provides for flexible fonts and alternative languaged for example). In servers which don't use GUIs, text output is typically done with basic OS calls which in turn map to video card calls.