CF Unit 1
CF Unit 1
WHAT IS A COMPUTER?
If we look at it in a very broad sense, any digital computer carries out the following five
functions −
Step 1 − Takes data as input.
Step 2 − Stores the data/instructions in its memory and uses them as required.
Step 3 − Processes the data and converts it into useful information.
Step 4 − Generates the output.
Step 5 − Controls all the above four steps.
CHARACTERISTICS AND Advantages of computers
• All the data received by the computer goes through the input unit.
• The input unit comprises different devices like a mouse, keyboard, scanner, etc.
• In other words, each of these devices acts as a mediator between the users and the computer.
• The data that is to be processed is put through the input unit.
• The computer accepts the raw data in binary form.
• It then processes the data, and produces the desired output.
• The 3 major functions of the input unit are-
Take the data to be processed by the user.
Convert the given data into machine-readable form.
Transmit the converted data into the main memory of the computer.
This creates easy communication between the user and computer.
2) CPU – Central Processing Unit
The Arithmetic Logic Unit is made of two terms, arithmetic and logic. There are two major functions that
this unit performs.
• Data inserted through the input unit into the primary memory. Performs the basic arithmetical
operation on it. Like addition, subtraction, multiplication, and division. It performs all sorts of
calculations required on the data. Then sends back data to the storage.
• The unit is also responsible for performing logical operations like, AND, OR, Equal to, Less than, etc. In
addition to this it conducts merging, sorting, and selection of the given data.
b) CU – Control Unit
• The control unit as the name suggests is the controller of all the activities/tasks and
operations.
• All this is performed inside the computer.
• The memory unit sends a set of instructions to the control unit.
• The control unit converts instructions into control signals.
• These control signals help in prioritizing and scheduling the activities.
• Thus, the control unit coordinates the tasks inside the computer in sync with the input
and output units.
c) Memory Unit
• All the data that has to be processed or has been processed is stored in the memory
unit.
• The memory unit acts as a hub of all the data.
• It transmits it to the required part of the computer whenever necessary.
• The memory unit works in synchronization with the CPU.
• This helps in faster accessing and processing of the data.
• Thus, making tasks easier and faster.
There are two types of computer memory-
Primary memory – This type of memory cannot store a vast amount of data. Therefore,
it is only used to store recent data. The data stored in this is temporary. It can get erased
once the power is switched off. Therefore, is also called temporary memory.
RAM and ROM are the examples of primary memory. This memory is directly accessible
by the CPU. RAM is used for reading and writing purposes. For data to be processed, it
has to be first transferred to the RAM and then to the CPU.
Secondary memory – As explained above, the primary memory stores temporary data.
For permanent storage purposes, secondary memory is used. It is also called as
permanent memory or the auxiliary memory. The hard disk is an example of secondary
memory. Even in a power failure data does not get erased easily.
3) Output
• All the information sent to the computer once processed is received by the user
through the output unit.
• Devices like printers, monitors, projector, etc. all comes under the output unit.
• The output unit displays the data either in the form of a soft copy or hard copy.
• The printer is used to get the hard copy and the monitor displays the output.
• The output unit accepts the data in binary form from the computer.
• It then converts it into a readable form for the user.
What Is A System Bus?
• A bus is a set of electrical wires (lines) that connects the various hardware components
of a computer system.
• It works as a communication pathway through which information flows from one
hardware component to the other hardware component.
• A bus that connects major components (CPU, memory and I/O devices) of a computer
system is called as a System Bus.
Components Of A System Bus-
• Data Bus
• Address Bus
• Control Bus
1) Data Bus-
• Data bus is used for transmitting the data / instruction from CPU to
memory/IO and vice-versa.
• It is bi-directional.
• The width of a data bus refers to the number of bits (electrical wires)
that the bus can carry at a time.
• Each line carries 1 bit at a time. So, the number of lines in data bus
determine how many bits can be transferred.
• The width of data bus is an important parameter because it
determines how much data can be transmitted at one time.
• The wider the bus width, faster would be the data flow on the data
bus and thus better would be the system performance.
2) Control Bus-
• Control bus is used to transfer the control and timing signals from one
component to the other component.
• The CPU uses control bus to communicate with the devices that are
connected to the computer system.
• The CPU transmits different types of control signals to the system
components.
• It is bi-directional.
• Control signals are generated in the control unit of CPU.
• Timing signals are used to synchronize the memory and I/O operations
with a CPU clock.
Typical control signals hold by control bus-
02. Source code is high level code. Object code is low level code.
Source code is written in plain text by using Object code is translated code of source
03.
some high level programming language. code. It is in binary format.
04. Source code is human understandable. Object code is not human understandable.
Source code is not directly understandable by Object code is machine understandable and
05.
machine. executable.
It contains comments for better understanding It does not contain comments for
08.
by programmer. understanding by machine.
It contains less number of statements than It contains more number of statements than
09.
object code. source code.
Source code is input to compiler or any other Object code is output of compiler or any
11.
translator. other translator.
12. Source code is not system specific. Object code is system specific.
Source code needs to be compiled or translated
14. It can be changed over time. by any other translator to get modified object
code.
Compiler Interpreter
A compiler is a program that converts the entire
source code of a programming language into An interpreter takes a source program and runs it
executable machine code for a CPU. line by line, translating each line as it comes to it.
Compiler Assembler
Compiler converts the source code written by the Assembler converts the assembly code into the
programmer to a machine level language. machine code.
It shows the whole program error after the It detects errors in the first phase, fixes them,
whole program is scanned. and then the second phase is start to execute.