What is a computer operation?
A computer is an electronic machine that processes data by performing operations on it. Computer operations are actions performed by the computer to complete a given task. A computer can take input, store values/ information, process information and produce output.
For instance, if an instruction to add two numbers is passed to the computer, it will take input from the user, processes it by performing an arithmetic operation, and displays the output to the user.
A computer performs certain advanced operations. However, there are five basic operations that every computer performs. They are:
- Input
- Processing
- Output
- Storing
- Controlling
Input
As the name suggests, an input operation involves entering data and instructions into the computer system. A computer consists of an input unit that takes input from the user in the required format. Since the central processing unit (CPU) cannot understand human language, the input unit is also responsible for encoding the data into a CPU-understandable language (in bit format).
However, some instructions do not require to be encoded. These instructions are sent to the CPU directly. Devices that pass data directly to the CPU (without encoding) are called direct entry input devices. Examples of such devices are scanners. Devices that encode the data before feeding into the CPU are called indirect entry input devices. Examples of such devices are keyboards.
There are several types of input devices such as keyboard, scanner, mouse, touchpad, trackball, webcam, joystick, graphics tablet, lightpen, pointing device and so forth.
Processing
The processing operation is done to process data. This process is accomplished using the central processing unit. The CPU consists of a control unit (CU), arithmetic and logic unit (ALU), and a memory/ storage unit.
The processing operation is done by the arithmetic and logic unit. This unit performs arithmetic operations like addition, subtraction, multiplication, and division. It also conducts logic operations like comparison, AND, OR, Bitwise AND, and Bitwise OR.
The ALU receives instructions from the input unit through the input operation and processes the data accordingly. It also uses the memory unit to store intermediary results or data. After the data is processed, the ALU returns it to the storage unit.
Output
The output operation is the opposite of the input operation. The output unit of a computer accomplishes this operation. The output unit takes the processed data from the processing unit and returns or displays it to the user in a user-understandable format.
The data or information generated by the computer will be in bit format. The output unit decodes this information to convert it into a user-understandable format.
For instance, when a computer scans an image, the processing unit processes the image and displays the scanned image on the computer screen.
The output unit can generate a soft copy output or a hard copy output. A soft copy output is normally a temporary output that exists until the output device is switched on. Examples of devices that produce soft copy output are monitors.
A hard copy output is permanent. It does not vanish after the output device is turned off. Generally, it can be a printout on paper. Examples of devices that generate a hard copy output are printers.
There are several types of output devices, including monitors, speakers, projectors, plotters, and printers.
Storing
The storing operation is carried out in the storage unit. This operation stores data or instructions in digital form. The computer requires a storage unit to store information before and after processing it. It can store the data temporarily or permanently.
The storage unit mainly comprises two types of memories: primary memory and secondary memory. The primary memory is the main memory and is inbuilt in a computer system. It can be a permanent memory like read-only memory (ROM) or temporary memory like random access memory (RAM).
The secondary memory is often externally connected to the computer system. It is non-volatile. That means the data stored in it is permanent. Examples of secondary memory devices include floppy disks, compact disks, digital versatile disks, pen drives, flash drives, and hard disks.
Controlling
The controlling operations are handled by the control unit located within the CPU. This unit is an essential part of the computer system. It basically combines the four operations mentioned above. For instance, it takes input, processes it, stores the processed data, and finally sends the output.
The other units like input, output, storage, and arithmetic and logic units cannot determine what to do with data. Therefore, the control unit manages and coordinates these units and informs them how to handle the data.
The operations carried out by the control unit are as follows:
- It controls data transfer between different components in a computer system.
- It manages all the other units (input, output, storage) of a computer.
- It fetches data from the computer memory and passes commands on how to process the information.
- It manages the communication between input and output devices.
- It controls the operations occurring in the computer but does not save or process the data itself.
Arithmetic and logic operations
The ALU in computers performs several arithmetic and logic operations. These include:
Arithmetic operations
Computers perform arithmetic operations on binary numbers. This means the decimal numbers are converted into binary form. Then operations are performed on the number. Common arithmetic operations done by computers are:
Add
The addition operation sums two numbers and stores the result and the carry-out.
Rules for binary addition are as follows:
1 + 1 = 0 and carry 1 is added to the next column
1 + 0 = 1
0 + 1 = 1
0 + 0 = 0
Example: The addition for the decimal values 11 and 9 will be done as follows:
This is equal to 11 + 9 = 20 in decimal form.
Subtract
Rules for binary subtraction are as follows:
1 - 1 = 0
1 - 0 = 1
0 - 1 = 1 with a borrow from the next column.
0 - 0 = 0
Example: To subtract 9 from 20, the following process will be used:
This will be equivalent to 20 - 9 = 11.
Multiplication
The process of multiplication in binary numbers works like that of decimal numbers. Two numbers are multiplied by partial products, and for each digit in the second number, the product of that digit in the first number is computed, and the result is mentioned in a new line. It is then shifted leftward, so the rightmost digit comes in line with the second number’s digit that was used. Finally, the sum of the partial products produces the final answer.
The rules in multiplication are:
- When the digit in the second number is 0, the partial product will be 0.
- When the digit in the second number is 1, the partial product will be the first number.
Example: Multiply 1011 and 1010
Division
Binary division is similar to decimal division. The rules for dividing binary numbers is as follows:
- Begin from the left of the dividend.
- Continuously subtract the divisor from the dividend.
- If subtraction is possible, place 1 in the quotient and subtract the divisor from the correspondent digits in dividend. Otherwise, place 0 in the quotient.
- Bring down the following digit to the digits that are left. Then continue dividing in the same manner as long division in decimal.
Logical operations
Logical operations are used to connect two or more phrases of information based on a specific condition. Logical operators are used for logical operations. Examples of logical operations in computers include:
AND
AND operation returns the result as true only if both inputs are true. Otherwise, it will return false. The && (two ampersands) symbol is used to denote AND operation. In boolean algebra, AND operation is represented as A.B. The truth table for AND operator is shown below.
A | B | A.B |
0 | 0 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 1 |
OR
The OR operation returns the result as true if either its inputs or both are true. Otherwise, it will return false. The OR operation is denoted by the symbol (||). In boolean algebra, OR is given as A + B. The truth table for OR operator is shown below.
A | B | A+B |
0 | 0 | 1 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 0 |
NOT
The NOT operation returns true as a result if the input is false. Otherwise, it will return false. The NOT operation is denoted by ! (exclamation mark) symbol. In boolean algebra, NOT of A is represented as A̅. The truth table for NOT operation is given below.
A | A̅ |
0 | 1 |
1 | 0 |
Context and Applications
The basic computer operations topic is an essential concept, especially in the computer organization subject. The topic is equally important for students preparing for competitive exams. Basic operations are studied by students studying graduate and postgraduate courses like:
- Bachelors in Computer Science
- Masters in Computer Science
- Bachelors in Information Technology
- Masters in Information Technology
Practice Problems
Q1. Which type of device feeds data and instructions into the computer system?
- Software devices
- Processing unit
- Input device
- External memory devices
Answer: Option c
Explanation: Input devices are used to enter data into the computer system by performing the input operation.
Q2. Which of the following is not a basic computer operation?
- Storing data
- Controlling
- Printing output
- Compiling a computer program
Answer: Option d
Explanation: There are only five basic computer operations which include input, processing, output, storing, and controlling. Compiling a computer program is not a basic computer operation.
Q3. Where is the control unit located?
- Outside the central processing unit
- Inside the central processing unit
- Inside the arithmetic and logic unit
- Inside the storage unit
Answer: Option b
Explanation: The central processing unit consists of the arithmetic and logic unit, control unit, and storage unit. Hence, the control unit is located in the central processing unit.
Q4. Which type of memory is attached to the computer externally?
- Primary memory
- Secondary memory
- Intermediate memory
- None of the above
Answer: Option b
Explanation: The secondary memory is often attached to the computer externally. Hence, it is also called external memory.
Q5. Which of the following is the output device that generates soft copy?
- Monitor
- Mouse
- Printer
- Keyboard
Answer: Option a
Explanation: The output generated by soft copy output devices gets deleted after the device is turned off. That means they give temporary output. Monitor an example of a soft copy output device. The result displayed on the monitor will disappear once the machine shuts down.
Common Mistakes
Ideally, most students believe that there are four computer operations. The basic operation controlling is known as a combination of the rest of the four operations.
Related Concepts
- History of computer
- Types of computer
- Components of computer
- Types of computer languages
- Computer operating systems
- Types of computer memory
- Motherboard
- Computer networking
Want more help with your computer science homework?
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Search. Solve. Succeed!
Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.
Search. Solve. Succeed!
Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.