Secondary Storage: Permanent Data
Input devices capture user actions and send data into the computer; output devices receive data from the computer and present it to the user.
From Action to Result
When you interact with a computer, your action begins a cycle. You use an input device, the computer processes the resulting data, and an output device presents a result that you can perceive. This cycle is the input-process-output pipeline. Secondary storage becomes important when the processing needs data that was saved for later use, such as the contents of a file.
Input devices send data into the computer. Output devices receive data from the computer and present it to the user.
Input and Output Roles
An input device captures a user's action and sends data into the computer. A keyboard, mouse, touchscreen, microphone, or sensor can provide input. An output device receives data from the computer and presents it to the user. A screen, speaker, or printer can provide output. A network connection is also described as a possible destination for program output.
| Role | What it does | Examples from the source |
|---|---|---|
| Input device | Captures user actions and sends data into the computer | Keyboard, mouse, touchscreen, microphone, sensor |
| Output device | Receives data from the computer and presents it to the user | Screen, speaker, printer, network connection |
The key distinction is the direction of data flow.
The physical devices do not normally pass raw physical actions directly to a program. Input controllers and output controllers translate between physical signals and digital information. This translation lets the CPU and the program work with data while the devices handle actions such as clicks, key presses, display, and sound.
Tracing a Saved File
Opening a file after a mouse click
Trace what happens when a user clicks a mouse button and the program decides that the click should open a file.
1. Capture: The mouse hardware detects the click and converts it into electrical signals.
2. Receive: The signals travel through a cable or wireless connection to the computer's input controller.
3. Process: The input controller passes the information to the CPU. The CPU is running the program, which interprets the click.
4. Retrieve: If the program determines that the click should open a file, it sends instructions to retrieve the file's data from storage.
5. Present: The program sends formatted data to the graphics card, which drives the monitor to display the file's contents.
A single click has moved through input capture, controller translation, CPU processing, storage retrieval, and output to the monitor.
Software Between Components
Software connects the hardware components into one interaction. A program tells the CPU what to do when input arrives and what data to send to output devices. The operating system and hardware drivers handle low-level communication with devices, so the programmer does not need to understand every electrical detail of a keyboard or monitor.
The Programmer as Coordinator
The programmer orchestrates the computer's resources rather than directly controlling the physical devices. The program specifies what the CPU should do with incoming data and what data should be sent to an output device. In a text editor, for example, the programmer provides the logic that reads a key press, updates the document, and tells the graphics card to redraw the screen.
A Key Press Through the System
Consider a text editor and the moment when you press the letter A on the keyboard. The keyboard detects the key press and sends the input into the computer. The input controller passes the information to the CPU. The text editor interprets the key press, updates the document, and sends instructions for the display to be redrawn. The monitor then presents the updated document to you.
What do you think happens?
Which part decides what should happen to the letter A after the keyboard sends the key press into the computer?
Reveal answer
Answer: The program running on the CPU
The source describes the program as interpreting the key press, updating the document, and telling the graphics card to redraw the screen. The keyboard captures the input and the monitor presents the output, but the program coordinates the response.
This sequence can happen in milliseconds. The user experiences it as a responsive interaction because the result quickly returns through an output device. After perceiving the result, the user may perform another action, beginning the cycle again.
Mistakes to Avoid
Treating input and output as the same role
The keyboard captures the user's action and sends data into the computer. The screen presents data from the computer back to the user.
Fix:
Classify the device by the direction of the data it handles: into the computer is input; from the computer to the user is output.Thinking that storage is the final output
Storage supplies the file data to the processing steps. In the source example, the graphics card and monitor present the file's contents.
Fix:
Separate retrieval from presentation. Storage provides data; an output device presents the result.Assuming that the programmer directly controls the physical device
The source explains that programmers write instructions for the CPU, while the operating system and hardware drivers handle low-level device communication.
Fix:
Describe the programmer's role as coordinating resources through software.Describing the pipeline as one-way
The user perceives the output and may respond with another input, creating a continuing interaction cycle.
Fix:
Trace the return to the user and recognize that a new user action can begin another cycle.
Practice the Data Path
A user presses a key in a text editor, and the editor displays the updated document. Explain the path in order. Identify the input device, the controller that passes the information onward, the processing program, the output device, and the programmer's role.
Hints
- Start with the device that captures the user's action.
- Include the CPU and the program's interpretation of the input.
- End with the device that presents the updated document.
Explain why opening a file can involve both storage and output without making storage an output device.
Hints
- Use the distinction between supplying data and presenting data.
- Identify where the file data is retrieved and where its contents are displayed.
What to Remember
- Input devices capture user actions and send data into the computer.
- The CPU and the running program process incoming data and decide what should happen next.
- Storage supplies saved file data when processing needs to retrieve it for an interaction.
- Output devices receive data from the computer and present the result to the user.
- Programmers orchestrate input, processing, storage, and output through software; the operating system and hardware drivers handle low-level device communication.
Key Takeaways
- Input-process-output is the basic cycle of computer interaction.
- Input controllers and output controllers help translate between physical signals and digital information.
- Secondary storage participates by supplying saved data when a program retrieves a file.
- The programmer uses software instructions to coordinate the CPU and computer resources.
- Output returns a result to the user, who may respond with another input and continue the cycle.