A computer is an electronic device that has the ability to perform mathematical operations at an enormous speed. The computer performs these mathematical operations on some information or data. This data is provided to the computer either from the user using the input devices or data that the computer generates for its own operation. To be able to process the data the computer is made from various functional units that perform some specified task.
The functional units of the computer are what make the block diagram of the computer. The computer divides its task among these major functional units that are present in the block diagram of the computer.
Block Diagram of Computer System
The major components of the block diagram of the computer are
1. Input Unit
2. Output Unit
3. Central Processing Unit (CPU)
a. Control Unit (CU)
b. Arithmetic And Logic Unit (ALU)
c. Processor Register
4. Memory Unit
a. Primary memory
b. Secondary memory
The Input Unit is required by the computer to receive the data and information and then use it for problem-solving. The input of data and information to the computer is provided by the user or ‘us’. We provide the input of data and information with the help of input devices. The input unit consists of various input devices. Keyboard and Mouse are the input devices that have been in use since the 1970s. The other commonly used input devices are Scanner, Microphone, joystick, camera, etc.
The computer can process instructions in the CPU, these instructions are provided to the CPU by the application programs running on the monitor. For a user to interact with these application programs the input devices are required. When a user provides the data to the application program through input devices, at that instance the CPU halts the instructions given by the application program and starts receiving input signals. When the CPU receives the input signals, it utilizes these input signals data when it restarts the processing of the instruction from the application program.
The major functions of the Input Unit are
- Receive the data from the user with the help of input devices
- Convert the data from electrical signals to machine language that the computer understands
- Signal the CPU to receive the data from the input devices
- Supply the converted data to the CPU via memory unit for further processing
The output unit of the computer provides the results of computation and information to the outside world. The output unit generally performs the reverse process of the input unit and it converts the machine language digitized information to electronic impulses that are readable by the output devices. The most commonly used output devices are the Visual Display Unit (VDU) also known as the monitor. Other common output devices are a projector, headphone, speaker, etc.
Central Processing Unit (CPU)
In the computer, the arithmetic logic unit (ALU), control unit (CU), and processor register are integrated into a single block known as the Central Processing Unit (CPU). The CPU is considered as the brain of the computer and it performs all the processing operations.
The major functions of the CPU are –
- Reading instructions from memory
- Controlling the sequence of instruction
- Communicate to peripheral devices
- Control the flow of data and instruction from one component to another.
- Performs the computation required by the application program.
Let’s see each Component of CPU in detail –
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU) is a major component of the Central Processing Unit (CPU) of the computer. The Arithmetic Logic Unit (ALU) is that part of the Central Processing Unit (CPU) that handles all the calculations that are required by the Central Processing Unit.
The ALU performs all the operations that are related to arithmetic and logic operations. The Arithmetic Logic Unit (ALU) can perform comparisons with the help of logical operators and therefore is capable of making decisions on the basis of comparisons. Also, most of the operations that are performed in ALU are logical in nature.
When there is a requirement for some calculations to be performed then the Control Unit (CU) transfers the data from the memory unit to the Arithmetic Logic Unit (ALU). And once the computation is done and the results are generated by the ALU, then CU transfers that data of computation back to the memory unit.
It depends on the design of the Arithmetic Logic Unit (ALU) that how powerful is the Central Processing Unit (CPU). The ALU can make the CPU more powerful but at the same time, it will consume more energy and produce more heat. Therefore the faster the CPU the more power it consumes and more heat it dissipates.
The various operations that are carried out by the Arithmetic Logic Unit are –
- Logical Operations – The main logical operations are AND, OR, and NOT. Other logical operations such as NAND, NOR, XOR, XNOR, etc are all made from combinations of main logical operations.
- Arithmetic operations – The main arithmetic operations are addition, subtraction, multiplication, and division. These are the four basic arithmetic other operations can be derived by using these four operations. The arithmetic operations are generally performed on binary and decimal data.
- Bit-shifting operations – This operation refers to the shifting of bits in the binary representation of the number either towards the left or towards the right. The left shift is represented by the << operator and the right shift is represented by the >> operator. These operators help to perform many mathematical operations. They are also known as bitwise operations.
Control Unit (CU)
Control Unit (CU) is another major component of the Central Processing Unit (CPU) of the computer. The control unit is also referred to as the central nervous system of the computer as it controls and synchronizes other functional units of the computer. CU controls all CPU operations including ALU operations and movement of data within the CPU.
Their Control Unit (CU) plays an important role in the Central Processing Unit (CPU) and has many responsibilities –
- The control unit instructs the input unit, where to store the data when the input unit receives it from the users via some input devices.
- During the execution of a program, the control unit (CU) fetches one instruction at a time from the memory and then executes the instruction at ALU, therefore the Control unit also helps to control the flow of data and instruction from memory to ALU.
- The result of execution ALU provides after the calculation is handed over to CU which directs it back to the memory and also to the output unit for displaying the result on the screen. The Control Unit (CU) controls the flow of results from ALU to the memory unit and output unit.
The Processor register can be thought of as the CPU’s working memory. Remember, the Processor register is not part of the memory unit. Registers are high-speed temporary storage locations in the CPU.
The question that I found very confusing in the block diagram of the computer. – MUST-READ (recommended)
How does the Central Processing Unit (CPU) interact with memory? Does the memory unit or any part of the memory unit lie inside the Central Processing Unit (CPU) or outside the Central Processing Unit (CPU)?
Why I did this small discussion is because I found many sites providing incorrect information that whether the memory unit is a part of the Central Processing Unit or not.
In the above quote, the processor registers as a principal component of the Central Processing Unit (CPU), the processor register is also the only principal memory component of the CPU. Let’s again see what Wikipedia quotes about processor registers.
So, it becomes very clear that the processor register does not belong to the main memory (or primary memory). So, why does the CPU not use main memory (or primary memory ) for its operations?
CPUs are very fast in the execution of instructions and a CPU with 2 GHz of clock speed can carry out two billion cycles (or two billion instructions if each instruction took one cycle) per second.
Whereas Main memory (or primary memory) such as dynamic or static RAM is slower than CPU it takes up to 60-70 nanoseconds per instruction to fetch it to CPU. As a result, the CPU will remain idle for many of its cycles.
So, modern computers use a hierarchy of memories (caches) so that frequently used information is accessible to the CPU without going to memory.
The WHOLE point of the above question discussion is that – Main memory (or Primary memory ) which is a part of the memory Unit does not lie inside the Central Processing Unit (CPU). The Control Unit communicates with the memory unit to request data from the memory unit to the CPU, but this does not make the memory Unit a part of the Central Processing Unit (CPU).
Memory Unit (or Storage Unit)
The Memory Unit is responsible for holding data and information for the other functional units of the computer. The memory unit of the computer holds the data and information that it receives from the input unit before they are processed by the Central Processing Unit (CPU). a memory unit is also referred to as a memory unit.
- The memory unit performs various task such as –
- the memory unit stores the data that it received from the input unit.
- Provides the data and information to the CPU for further processing.
- Holds any data or instructions that are generated by the CPU at intermediate processing.
- Holds the final result that comes after processing of the data in the CPU.
- At the end provides the results of the processed data to the output devices.
- It also saves the data and information for later use
The memory unit is classified into two categories –
Primary memory (or Main memory )
The primary memory is the fastest memory unit. The time taken by these memories to receive and send data for processing is very minimal. The primary memory is also near to the Control Unit and Arithmetic Logic Unit.
This memory is generally used to hold the program that is currently in execution in the CPU, the data is being received by the input unit and the intermediate and final results of the program are being stored and sent from memory to CPU and back and forth.
The primary memory is temporary and volatile in nature. It means if the computer is switched off then the data will be lost permanently. Therefore it does not hold data for a long period of time. In order to save the data from being lost the primary memory transfers the data to the secondary memory of the computer. The secondary memory can hold the data for a long period of time.
The primary memory is expensive because the technology that allows it to be highly usable by the CPU comes at a cost. Hence computers have a very limited primary memory as compared to secondary memory.
Secondary memory (or Auxiliary memory )
The secondary memory capacity can go from some gigabytes to terabytes, they act as an archive to the computer system. The secondary memory can store application programs, documents, videos, audios, databases, etc. The sending and receiving of data and information are comparatively slower than the primary memory.
The Central Processing Unit (CPU) is the place where the program execution takes place. And even before the CPU starts its execution of the program it has to request the secondary memory to load the essential instructions and information related to the program that is residing into the secondary memory to load into the primary memory, and then the program execution begins.
If the CPU fails to receive the required information from secondary memory then it will prompt the user with the error of ‘file not found’. Also, the results that are generated by the execution of the program are stored in secondary memory.
The secondary memory is less expensive than the primary memory. They are non-volatile in nature. Unlike primary memory, if some data is saved on secondary memory if not lost if the computer systems shut down, they are permanent in nature.
The common examples of secondary memory are Hard Disk, CD, Floppy Disk, Pen Drive, Solid State Drive, etc.
Also, Read Basic Structure of Computer this will help you gain more clarification in block diagram of computer.