16.8: Input and Output
-
- Last updated
- Save as PDF
Overview
Input and output , or I/O is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system. Inputs are the signals or data received by the system and outputs are the signals or data sent from it. [1]
Discussion
Every task we have the computer do happens inside the central processing unit (CPU) and the associated memory. Once our program is loaded into memory and the operating system directs the CPU to start executing our programming statements the computer looks like this:
Our program now loaded into memory has basically two areas:
- Machine instructions – our instructions for what we want done
- Data storage – our variables that we using in our program
Often our program contains instructions to interact with the input/output devices. We need to move data into (read) and/or out of (write) the memory data area. A device is a piece of equipment that is electronically connected to the memory so that data can be transferred between the memory and the device. Historically this was done with punched cards and printouts. Tape drives were used for electronic storage. With time we migrated to using disk drives for storage with keyboards and monitors (with monitor output called soft copy) replacing punch cards and printouts (called hard copy).
Most computer operating systems and by extension programming languages have identified the keyboard as the standard input device and the monitor as the standard output device . Often the keyboard and monitor are treated as the default device when no other specific device is indicated.
Key Terms
- device
- A piece of equipment that is electronically connected to the memory so that data can be transferred between the memory and the device.
- escape code
- A code directing an output device to do something.
- extraction
- Aka reading or getting data from an input device.
- insertion
- Aka writing or sending data to an output device.
- standard input
- The keyboard.
- standard output
- The monitor.