In computing, I/O stands for input/output and describes any program, device or operation that transfers data to or from a computing system. In other words, I/O is the way we transfer data from the system to the user and vice versa. I/O devices can include peripherals like keyboards, mice, monitors and printers, or systems like databases and networks.
What Is I/O?
I/O, or input/output, is the communication between input devices (like keyboards) and output devices (like computer monitors). Input is the data we send to the computer system, while output is the data that is processed and comes from the system. For example, typing on a keyboard is an input to a computer system, where the text on the monitor is the processed output.
Signals from input and output devices often travel through a computer’s central processing unit (CPU), which executes these signal instructions and allows machines to share data with each other.
The I/O process is how computers are able to communicate with the outside world and respond to human interaction. Without I/O, there would be no way for us to interact with our many computing and technological systems.
Types of I/O
We can split I/O into two broad categories: hard I/O and soft I/O.
Hard I/O
Hard I/O refers to data transfer between a computer and a physical device, like a keyboard or mouse.
Soft I/O
Soft I/O refers to input and output that occurs over a network, for example, when a computer communicates with other computers, streams media or transfers files.
I/O Control Methods
In order for a system to communicate with external devices and other computers, it uses controllers to transfer data between the various components of a computer. Within a computer system, a controller is a device or program that manages or directs the operations of other devices or programs. Typical computer systems contain both hardware- and software-based controllers that serve as intermediaries between I/O devices.
There are four control method types.
1. Programmed I/O
With programmed I/O, the processor executes a program instruction for every I/O data transfer. This control method is the slowest but simplest to program.
2. Interrupt-Driven I/O
A processor is interrupted when an I/O device needs to transfer data. The processor will halt its normal processing to execute the device’s instructions, then resume normal processing afterward. In this case, a processor, also known as CPU, interprets and executes instructions it receives from a computer program. Processors are physical devices within a computer system that perform calculations and process input data. Processors act as the brains of the computer and supply the computing power needed for a system to manage the constant stream of instructions it receives.
This control method is faster than programmed I/O, but also is more difficult to program.
3. Direct Memory Access (DMA)
This occurs when the processor only has to initiate the data transfer and the DMA controller takes over to complete it. This control method is very fast compared to programmed and interrupt-driven I/O, and also more efficient because it requires minimal processor involvement.
4. Advanced Programmable Interrupt Controller (APIC)
In this method, when the processor receives notification that a device is ready to transfer data, it sends a signal to the APIC. The APIC then sends an interrupt to the processor so it can execute the program. This control method is the fastest of the four, but is most complex in terms of programming.
Examples of I/O
There are several different examples of input/output. Here are some of the most common ones:
- Keyboard Input: When a user enters data into a system using a keyboard
- Mouse Input: When a user interacts with a system through a mouse
- Touchscreen Input: When a user interacts with a system by touching the screen
- Voice Input: When a user speaks into a system to enter data or perform an action
- Printer Output: When a system sends data to a printer
- Speaker Output: Used to send data from a system to a user through an audio output
- Video Output: When a system sends data to a monitor or TV for display
As you may have noticed, I’ve described the above I/O examples as either input or output but it’s important to note that some devices may support both. While keyboards and mice are input-only devices, there are other examples of I/O that can send data to a system and also receive it. Consider voice-activated systems on smart devices like Siri, Amazon Alexa or Google Home. These devices can receive voice commands (input) and respond back to the user (output).
Other examples of devices that are both input and output include hard drives and writable CD-ROMs. These can each receive data from a system (when they’re being written to) or send data to the system (if they have data loaded on them already).
As technology has become more integrated with our lives, the amount of I/O devices continues to grow. Although the concept of I/O has been around since the inception of the computer, it remains important to understand due to its importance for modern-day technology. Without I/O devices, we wouldn’t be able to do simple things like participate in video conference calls, remotely lock our cars or ask Alexa to add eggs to our shopping list.
Frequently Asked Questions
What is I/O in computing?
I/O, or input/output, describes the communication of data between a computer system and external devices like keyboards, mice and other peripherals. Input refers to data sent to a computer, and output refers to data that has been processed and comes from the computer. I/O enables computers to communicate with the outside world and for users to interact with them.
What is an example of input and output?
Keyboards are an example of input devices, and monitors are an example of output devices. Typing on a keyboard sends input data to a computer system, which is then processed and displayed on a monitor as output data.
What is IO vs. CPU?
I/O is the process of how devices or programs transfer data between computers, and vice versa. A CPU (central processing unit) is a hardware component in a computer that can process I/O signals and allow input and output devices to communicate with each other.