Introduction to Computer: Functional Block Diagram | By Sushant A
Sushant Atram
Founder and CEO- Eversity | Ethical Hacker Data Analyst | Machine Learning Engineer Full Stack Developer | Cyber Security Instructor Bug Bounty hunter | Python | C/C++| JavaScript
INTRODUCTION TO COMPUTER: FUNCTIONAL BLOCK DIAGRAM
INTRODUCTION
A computer is a very powerful and a very special machine invented by mankind. In many ways it works like a human being and at a much faster speed, making our life much simpler. The use of computers in daily life has reduced our labour and enriched it considerably. For example, the use
of computers in communication, transport, medicine and industry has helped to increase the quality of human life.
FUNCTIONAL BLOCK DIAGRAM OF A COMPUTER
Computers are built in variety of sizes, shapes and cost. We will discuss a simple block diagram to explain the internal working of all computers. Let us take a look at the diagram. The diagram shows a general-purpose arrangement of blocks which provide separate and special functions.
The computer contains 4 main blocks:
1. Input
2. Output
3. Memory
4. Central Processing Unit or CPU
Let us first look briefly how the data flows inside a computer and what role each block plays in it. After that we will look at each block in greater details.
The raw data input, as single or multiple elements, flows from Input block to CPU and it is stored in data section of memory. In a next step, the data is brought from memory to Arithmetic & Logic Unit also called as ALU. Here in ALU, the data elements are processed and the results are stored in data memory once again. The processing may include simple arithmetic operations such as add, subtract, multiply etc or logical operations. The results are stored in data memory. As a last step, the results are brought from data memory and sent out to Output block.
All these steps are carried out one by one. Each step is carried out due to a command or an instruction given to the CPU. These commands or instructions are stored in a memory section called Program Memory. The sub block inside the CPU, fetches these instructions, one by one from Program Memory and runs it at appropriate time slots. This block is called Timing and Control unit. Together ALU and Timing & Control unit are called as Central Processing Unit or CPU.
Let us now look at each block in greater detail:
INPUT
This block converts information entered by human beings into computer readable form. The information content may be any of the following form:
1. Text entered by a user
2. Image created by a painter
3. Sound of speech or song sung by a singer
4. Fingerprint or palm print of an employee
5. Image captured by a still camera
6. Video captured by a camcorder
7. Turning a knob to set speed of a fan
8. Measuring temperature inside a room
9. GPS coordinates of location of the user
10. Selecting channel through a TV Remote
For each of the above and many other purposes, human inputs are fed into the computer through various switches, buttons, keyboard, mouse or even a touch screen. These are converted by this block into electrical signals and further as numbers or code and fed to ALU or stored in data memory for future work.
In early days, the input devices were severely limited to paper media such as a punched card or punched paper tape. They were not easy to handle, they were cumbersome and could not be retained for long time.
The advent of handheld and personal devices in last decade has brought forth a new crop of input devices. These devices such as smart phones, MP3 players have added new variety of input devices such as touch screen or a gravity sensor or camera as a scanner.
OUTPUT
The information, contained in text or speech or image is stored inside a computer, in a series of numbers or codes. Those numbers are meaningless to human beings. So to make it easily understandable to human beings this block is provided.
Output block converts information from numerical form to human readable form in an unambiguous manner, such as display on a LCD screen or a printed page from a printer or a song played on a speaker.
In early days, the output devices were very few namely simple lamps to indicate yes or no. For more complex outputs, in those days, the computer used printer or paper tapes which were again neither easy to handle nor worth storing them for longer periods.
In modern computers, the output information may be desired in any of the following form:
1. Text on screen or text on printer
2. Still or Moving images on screen
3. Sound on speaker
4. Vibration on a phone
5. Actuation or movement of physical devices such as electric motor control 6. Simple flashing Lamp or LED indicators or buzzers
Many computers output appropriate data to control speed of electric motors or to operate magnets for opening or closing doors. These devices all perform the function of the output block.
MEMORY
One of the greatest advantages of computers is its gigantic memory. A typical desktop computer can store huge information of the size of say 5000 books or 1 million songs, in its memory, at one time.
The computer memory is internally divided for two purposes. Each purpose is served by a sub block.
The first sub-block is called DATA MEMORY in which the data is stored. This is also called as READ /WRITE memory. The name implies that the contents of this memory can be easily altered by the computer program, under the command given by the user. There is another or more popular name for this memory - RAM or Random Access Memory. This memory is considered volatile in nature i.e., its contents are true or valid as long as computer power is switched on. Once the power is switched off, its contents get erased.
The second sub-block is called PROGRAM MEMORY. It contains a sequence of numbers called as commands or instructions. The CPU fetches these instructions, one at a time, decodes it and then executes it or carries out the desired operation. A collection of such instruction which performs a meaningful task is called a PROGRAM.
As evident, programs change with time, less often than data. You would notice that your programs such as a word processor or browser remain constant over a period of months. In many computers, the program memory is also called as READ ONLY Memory or ROM. The contents of this memory cannot be easily altered by any user program. The contents are non volatile in nature and do not get erased when power is switched off and switched on again.
The word Read/Write and Read Only Memory refer to technology used in the memory construction. A read write memory can also be used for storing the programs as it is been done in most common computers having large operating systems. However, being volatile in nature, if
power is switched off then program residing in Data Memory gets erased and needed to be reloaded into again before it can be used.
领英推荐
Please refer to the block diagram. Notice that data path showing connections between CPU and Data memory is bi-directional. It means that CPU can read data from memory or write data into memory. While the data paths between CPU and Program memory is shown as unidirectional. That means the CPU usually reads instructions from memory – never writes them back or alters them.
The memory mentioned in the block diagram is typically called as Main Memory. In technology terms, this memory is very fast, usually volatile and is made up of electronic circuits. The computers also have long term storage memory called as Secondary Memory. This is non volatile in nature, optical or magnetic in technology, quite slow in speed but relatively inexpensive.
The examples of secondary memory are:
1. Floppy Disk
2. Cassette
3. Hard Disk
4. CD ROM or DVD ROM
5. Semiconductor Flash memory, which we popularly called as (pen drive) The secondary memories are used for storing programs and data and archiving for long term.
CENTRAL PROCESSING UNIT OR CPU
It is considered as the brain of the computer. It is an electronic circuit which is sub-divided into two sub-blocks performing two distinct functions.
The first function is data processing. This is carried out by Arithmetic & Logic Unit or ALU. This unit performs integer operations like add, subtract, multiply, divide, AND, OR, complement etc. Some specialized ALUs provide floating point operations giving huge number crunching speeds. ALU has two attributes – width of the ALU in number of bits and speed of operation. Some small ALUs can perform only 8-bit operation while very large CPUs may have 64-bit or 128-bit or 256-bit ALU, performing bigger calculations in a single cycle. Larger is the ALU word size, faster is its capacity to calculate in one cycle. A 64-bit ALU will perform a 64-bit addition in one cycle. To do the same task, an 8-bit ALU will require eight cycles – 8- bit x 8 times. Hence larger ALU sizes helps to achieve very high processing speeds.
All computers have a basic binary ALU. These can perform all basic binary operations at a high speed. But when we need to manipulate large data elements as in screening movies or playing songs then the performance of basic ALU goes down. To solve this problem, depending upon
the need, we add or plug in, special purpose ALUs to augment basic ALU. For example, if you are very keen on designing graphics or playing video games on your computer, you may use a Graphics ALU card in your computer. That card will help in colouring the objects speedily or manipulating moving objects at high speed. In other case, some computers may use digital signal processing (DSP) ALUs which process sound signal from a mike and video signal from a camera, at a quick speed, on the fly. So we can add special power to ALU at an extra cost.
The second sub-block of the CPU is called Timing & Control Unit. This is a supervisory system which is like heart in a human body. This controls flow of data all over the computer parts. This is run by the computer’s main clock or oscillator. The number of clock pulses per second or frequency of clock is a very important parameter of a CPU. It decides how many operations it can perform in one second. For example, a 3 Giga Hertz clock speed, when utilized fully can give us 3 billion (or 300 crores) calculations per second- assuming one calculation per clock period. The Control & Timing Unit provides the necessary control signals spread all over the computer parts like the nerves in the human body. The control unit can be called as “brain within the brain”.
Many modern computers use what is called as Multi-core processors. A multi-core processor is a single component with two or more independent ALUs (called "cores"), working under a common Control & Timing Unit. Each ALU or core, processes separate instruction. Hence, multiple cores run multiple instructions at the same time, increasing overall speed for programs. All the cores are fabricated into a single chip and to the users it appears as a single CPU while internally it works many times faster than the single-core CPU.
Such Multi-core processors may have 2-, 4- or 8-cores. Multi-core CPUs are expensive and are used for high-performance applications only.
Now using this Block Diagram we will learn how the computer executes a typical program.
HOW DOES A COMPUTER RUN A PROGRAM?
Let us take a simple problem of adding two numbers A & B, store their sum as C in memory and then print the result having A, B and C. In computer language, we call A, B and C as variables. These variables may take different values at different instants of time. However, inside a computer, these are names of actual physical locations or addresses into memory where the “current value” of given variable is stored. For example, A may be stored in location 1000, B in location 1020 and C in location 1130.
To run the program, the following steps will be executed or carried out in the given block diagram:
1. Read first number from Input block (such as a keyboard) into CPU. (Say the number is 5.)
2. Store that number from CPU into Data Memory, in a location referred to as “A”.
3. Read second number from Input block into CPU. (Say the number is 10.)
4. Store second number from CPU into Data Memory, in a location referred to as “B”.
5. Get both numbers from locations A & B into ALU and add them. (The result or sum will be 5 + 10 or 15.)
6. Store that result from CPU into Data Memory, in a location referred to as “C”. (Value 15 gets stored in C.)
7. Write or print data from locations A, B and C onto Output block such as a printer. (Printer prints values 5, 10 and 15).
See that for a simple addition problem, we have to perform several small steps inside a computer. Each such simple step which performs a single unique task is called an instruction. The collection of all instructions which performs some useful function is called a Program.
Note that above 7 steps are stored in program memory while data items A and B and result item C are stored in Data memory. To repeat- Program memory contains 7 steps of the program while data Memory contains 3 data elements – A, B and C.
Interestingly, the program to add two numbers remains the same for any pair of numbers. So, we can store the program once in the Program memory and then run it any number of times we want it – each time for a different pair of input numbers – (5 and 10), (100 and 200), (1000 and 5000) etc.
This tells us that contents of Data Memory are more changeable compared to contents of Program Memory because data values change more often or more frequently.
This model was first proposed by a American Scientist Von Neumann in 1940-1945 while he was teaching in Princeton University in USA. Thus, in his honour, this block diagram is popularly called as Von Neumann Model or PRINCETON architecture.
This block diagram brings forth, one more powerful feature or attribute of a computer – its general purposeness. This block diagram tells us that whatever instructions we store in the program memory, the computer will carry out that task endlessly, until the program memory is modified or rewritten. So, a computer can be made to execute different programs, simply by rewriting a new program in its Program memory. To elaborate, suppose, first user arrives and stores a program to add 2 numbers, uses it for few times and goes away. After some time, second user arrives, stores another program, to multiply 2 numbers and runs it several times. Both consider the computer very useful for their problem solving.
This tells us that same set of hardware has performed once as an adding machine and later as multiplier machine. Hence the computer hardware is general purpose in nature and can perform infinite tasks depending upon which program we store into it and execute.
This is true in modern context where we use our laptop or desktop computer for word processing, browsing websites, chatting, emailing, listening to music as well as playing games on it, without any change in hardware!!
Conclusion
In summary, the Block Diagram of a general purpose Computer contains blocks to input the information, store the information, process the information to generate results and to produce the output the results. This is applicable to almost all computers commonly used today and hence of great interest to Computer students.
Glossary
1. Input: A block of computer which reads information human form into computer readable form or numbers. This usually refers to a number of devices for inputting information inside the computers such as keyboard, mouse or touch screen.
2. Output: A block of computer which converts numerical information stored inside a computer into human readable form such as text on screen or printer. This usually refers to a number of devices for outputting information to user such as speaker, printer etc.
3. CPU: Central processing Unit. It is called “brain” of the computer.
4. ALU: Arithmetic & Logic Unit. It performs calculations and mathematical operations.
5. Timing & Control Unit: It controls the movement of data inside a computer. It carries out various small activities inside the CPU within allotted time slots. It is like a nerve centre inside human body. It is called “brain inside the brain”.
6. Instruction: It is the smallest unit of task or command given by user to computer. It is numeric in nature and stored in program memory.
7. Program: A collection of instructions to perform a useful purpose. Usually stored in program memory and executed by computer.
8. Princeton Architecture: Von Neumann’s model of a stored program general purpose computer in which data and programs both reside in the same memory area, but in different partitions.
9. Read/Write Memory: Used to store data values which can be easily modified by any program.
10. ROM: Read only memory whose contents cannot be easily altered by program. It is usually non-volatile in nature.
11. RAM: Random Access Memory. It is usually used to store data or variables. It is usually volatile in nature. In many large computers such as desktop PC, it is also used to store programs.
12. Main memory: The program and data memory accessed by CPU is also refereed as Main memory. This is made up of electronic circuits and is very fast in speed.
13. Secondary memory: This comprises of magnetic (Hard disk drive) or optical circuits (CD ROM drive) and is very low cost and slow. It is non-volatile in nature and used for long term storage
Attended Women's college
8 个月Control unit?