BCA First Semester Computer Fundamentals & C Programming
COMPUTR
SYSTEM A Computer is an Electronic Device which accepts the Data, Process it,
stores in its memory and gives out the result. The word computer is derived from
UNIT Latin word compute which means to calculate or manipulate.
BLOCK DIAGRAM OF A COMPUTER
A computer is designee using four basic units. They are:
1. Input Unit
2. Central Processing Unit(CPU)
• Control Unit
• Arithmetic and Logic Unit (ALU)
3. Memory Unit
4. Output Unit
INPUT UNIT
Computers need to receive data and instructions in
order to solve a problem. The Input unit performs this
operation. The Input Unit basically links the external
world or environment to the computer system. The input
unit may consist of one or more input devices. The
Keyboard and mouse of a computer are the most
commonly used input devices. Some of the input devices
are given in the picture:
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
Regardless of the input accepted all inputs have to be converted to its binary form if it is to be
understood by the computer. The input unit consists of circuits, which perform this operation
before it is sent for processing.
CENTRAL PROCESSING UNIT (CPU)
It is the main part of a computer system like the heart of a
human being. Most computers are identified by the type of CPU
that is present in them. The function of the CPU is to interpret the
instructions in the program and execute them one by one. It consists
of two major units.
h n u n h p n pu d n
1. Control Unit: How does the input unit know it is time to input data? How does the
computer know that the execution of a job is complete? Why is it that, only the required
output is displayed on the output unit and noteverything?
Control Unit: Control Unit refers to functioning unit which carries out four basic
operations, these are (1) fetches an instructions.(2) Decodes the instructions (3)
executes the instruction (4) It stores the result.
All this possible because of the control unit. It controls and dire cts the transfer of
program instructions and data between various units. The main activity of the control
unit is to maintain order and direct the operations of the entire system.
2. Arithmetic and Logic Unit (ALU): The ALU of a computer system is the place where
the actual execution of the instructions takes place during the processing operation.
Arithmetic operations like addition, subtraction, multiplication and division (+,-,*,/) and
logical operations like AND, OR, NOT and relational operations like (<,>,<=,>=) are
being carried out in this unit.
ALU: Arithmetic and Logic Unit performs arithmetic and logical operations and
controls the speed of these operations.
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
MEMORY UNIT
The data and the instructions required
for processing has to be stored in the memory
unit before the actual processing starts. In a
similar manner the results generated from
processing has to be preserved before it is
displayed. The memory units thus provide
space to store input data, intermediate results
and the final output generated.
Secondary storage devices are additional memory (storage) devices
such as floppy disks, magnetic tapes, Hard Disk Drive (HDD) and Compact
Disk (CD) etc., which are used to store huge information for future use. The
input unit, output unit and secondary storage devices are together known as
Peripheral Devices.
OUTPUT UNIT
It is used to print or display the
results, which are stored in the memory unit.
The actual function of the output unit is just
the reverse of the input unit. Thus the output
unit links the computer to the outside world.
As the computer works with binary values
the output generated will also be in this
form. The output unit converts the data form
binary to the human understandable form
before it displays the results. Some of the
Output devices are given below.
COMPUTER MEMORY
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
A computer contains a number of components such as CPU, input
devices, and Output devices and so on. We also use a number of other things
such as instructions, programs and so on. All these are no use if you do not
have data to work with. Data can be stored only in the memory of the
computer.
Input and Output Devices
Input Devices
An input device can send data to another device, but it cannot receive data from
another device. Examples of input devices include the following.
Following are some of the important input devices which are used in a computer
✓ Keyboard
✓ Mouse
✓ Joy Stick
✓ Light pen
✓ Track Ball
✓ Scanner
✓ Graphic Tablet
✓ Microphone
✓ Web Camera
✓ Digital Camera
✓ Magnetic Ink Card Reader(MICR)
✓ Optical Character Reader(OCR)
✓ Bar Code Reader
✓ Optical Mark Reader(OMR)
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
Keyboard
✓ Keyboard is the most common and very popular input device which helps to input data to the
computer.
✓ The layout of the keyboard is like that of traditional typewriter, although there are some
additional keys provided for performing additional functions.
✓ Keyboards are of two sizes 84 keys or 101/102 keys, but now keyboards with 104 keys or 108
keys are also available for Windows and Internet.
Mouse
✓ Mouse is the most popular pointing device.
✓ It is a very famous cursor-control device having a small palm size box with a round ball at its
base, which senses the movement of the mouse and sends corresponding signals to the CPU
when the mouse buttons are pressed.
✓ Generally, it has two buttons called the left and the right button and a wheel is present
between the buttons.
✓ A mouse can be used to control the position of the cursor on the screen, but it cannot be used to
enter text into the computer.
Joystick
✓ Joystick is also a pointing device, which is used to move the cursor position
on a monitor screen.
✓ It is a stick having a spherical ball at its both lower and upper ends. The lower
spherical ball moves in a socket. The joystick can be moved in all four
directions.
✓ The function of the joystick is similar to that of a mouse. It is mainly used in
Computer Aided Designing (CAD) and playing computer games.
Light Pen
✓ Light pen is a pointing device similar to a pen. It is used to select a
displayed menu item or draw pictures on the monitor screen.
✓ It consists of a photocell and an optical system placed in a small tube.
✓ When the tip of a light pen is moved over the monitor screen and the pen
button is pressed, its photocell sensing element detects the screen location
and sends the corresponding signal to the CPU.
Scanner
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
✓ Scanner is an input device, which works more like a photocopy machine.
✓ It is used when some information is available on paper and it is to be transferred to the hard
disk of the computer for further manipulation.
✓ Scanner captures images from the source which are then converted into a digital form that
can be stored on the disk. These images can be edited before they are printed.
Digitizer
A digitizer is a hardware device that receives analog information, such as sound or light, and records
it digitally. Usually, the information is stored in a file on a computing device. This process is
called digitization.
For example, a digital camera is a digitizer. Light enters through the camera lens, and
the hardware and software inside the camera converts that information to binary data, and stores it an
image file. The user may then transfer the file to a computer, where he or she can edit the image, print it
out, or share it online.
Output Devices
An output device can receive data from another device and generate output with that data, but it cannot
send data to another device.
Following are some of the important output devices used in a computer.
✓ Monitors
✓ Printer
✓ Graphic Plotter
Monitors
A computer monitor is a hardware device that displays visual information generated by a computer. It is
an output device that allows users to view digital content, such as text, images, video, and graphical user
interfaces, produced by a computer’s software applications. Monitors come in a variety of sizes,
resolutions, and types, including technologies such as LCD (liquid crystal display), LED (light -emitting
diode), and OLED (organic light-emitting diode).
Printers
Printer is an output device, which is used to print information on paper.
There are two types of printers
✓ Impact Printers
✓ Non-Impact Printers
Impact Printers
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
✓ Impact printers print the characters by striking them on the ribbon, which is then pressed on the
paper.
✓ Characteristics of Impact Printers are the following
✓ Very low consumable costs
✓ Very noisy
✓ Useful for bulk printing due to low cost
✓ There is physical contact with the paper to produce an image
These printers are of two types
✓ Character printers
✓ Line printers
Character Printers
✓ Character printers are the printers which print one character at a time.
These are further divided into two types
✓ Dot Matrix Printer(DMP)
✓ Daisy Wheel
Dot Matrix Printer
✓ In the market, one of the most popular printers is Dot Matrix Printer.
✓ These printers are popular because of their ease of printing and economical price.
✓ Each character printed is in the form of pattern of dots and head consists of a Matrix of Pins of size
(5*7, 7*9, 9*7 or 9*9) which come out to form a character which is why it is called Dot Matrix
Printer.
Daisy Wheel
✓ Head is lying on a wheel and pins corresponding to characters are like petals of Daisy (flower) which
is why it is called Daisy Wheel Printer.
✓ These printers are generally used for word-processing in offices that require a few letters to be sent
here and there with very nice quality.
Line Printers
✓ Line printers are the printers which print one line at a time.
These are of two types
✓ Drum Printer
✓ Chain Printer
✓
Drum Printer
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
✓ This printer is like a drum in shape hence it is called drum printer. The surface of the drum is divided
into a number of tracks.
✓ Total tracks are equal to the size of the paper, i.e. for a paper width of 132 characters, drum will have
132 tracks.
✓ A character set is embossed on the track.
✓ Different character sets available in the market are 48-character set, 64 and 96 characters set. One rotation
of drum prints one line.
✓ Drum printers are fast in speed and can print 300 to 2000 lines per minute.
Chain Printer
✓ In this printer, a chain of character sets is used, hence it is called Chain Printer.
✓ A standard character set may have 48, 64, or 96 characters.
Non-impact Printers
✓ Non-impact printers print the characters without using the ribbon.
✓ These printers print a complete page at a time, thus they are also called as Page Printers.
These printers are of two types −
✓ Laser Printers
✓ Inkjet Printers
Characteristics of Non-impact Printers
✓ Faster than impact printers
✓ They are not noisy
✓ High quality
✓ Supports many fonts and different character size
Laser Printers
✓ These are non-impact page printers.
✓ They use laser lights to produce the dots needed to form the characters to be printed on a page.
Inkjet Printers
✓ Inkjet printers are non-impact character printers based on a relatively new technology.
✓ They print characters by spraying small drops of ink onto paper. Inkjet printers produce high quality
output with presentable features.
✓ They make less noise because no hammering is done and these have many styles of printing modes
available.
✓ Color printing is also possible. Some models of Inkjet printers can produce multiple copies of
printing also.
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
Plotter
✓ A plotter is a computer hardware device much like a printer that is used for printing vector graphics.
✓ Instead of toner, plotters use a pen, pencil, marker, or another writing tool to draw multiple,
continuous lines onto paper rather than a series of dots like a traditional printer.
✓ Though once widely used for computer-aided design, these devices have more or less been phased
out by wide-format printers.
✓ Plotters are used to produce a hard copy of schematics and other similar applications.
Advantages of plotters
✓ Plotters can work on very large sheets of paper while maintaining high resolution.
✓ They can print on a wide variety of flat materials including plywood, aluminium, sheet steel,
cardboard, and plastic.
✓ Plotters allow the same pattern to be drawn thousands of times without any image degradation.
Disadvantages of plotters
✓ Plotters are quite large when compared to a traditional printer.
✓ Plotters are also much more expensive than a traditional printer.
Secondary storage devices
If we need to store large amount of data or programs permanently, we need a cheaper and permanent memory.
Such memory is called secondary memory. Here we will discuss secondary memory devices that can be used
to store large amount of data, audio, video and multimedia files.
Characteristics of Secondary Memory
✓ It is non-volatile, i.e. it retains data when power is switched off
✓ It is large capacities to the tune of terabytes
✓ It is cheaper as compared to primary memory
✓ Depending on whether secondary memory device is part of CPU or not, there are two types of
secondary memory – fixed and removable.
Types of Secondary Memory
Hard Disk Drive
✓ Hard disk drive is made up of a series of circular disks called platters arranged one over the other
almost ½ inches apart around a spindle.
✓ Disks are made of non-magnetic material like aluminium alloy and coated with 10-20 nm of magnetic
material.
✓ Standard diameter of these disks is 14 inches and they rotate with speeds varying from 4200 rpm
(rotations per minute) for personal computers to 15000 rpm for servers.
✓ Data is stored by magnetizing or demagnetizing the magnetic coating.
✓ A magnetic reader arm is used to read data from and write data to the disks. A typical modern HDD
has capacity in terabytes (TB).
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
CD-ROM
✓ A CD-ROM, which stands for Compact Disc Read-Only Memory, is an optical disc with audio or
software data that has read-only memory.
✓ The tool that is used to read data from it is a CD-ROM drive or optical drive.
✓ The speed of a CD-ROM drive can range from 1x to 72x, which means it reads the CD roughly 72
times faster than the 1x version.
✓ These drives can read and play data from CDs, including CD-R and CD-RW discs, as well as audio
CDs, as you might expect.
Optical Disc
✓ An optical disc is an electronic data storage medium that is also referred to as an optical disk, optical
storage, optical media, Optical disc drive, disc drive.
✓ which reads and writes data by using optical storage techniques and technology.
✓ An optical disc, which may be used as a portable and secondary storage device, was first developed
in the late 1960s. James T. Russell invented the first optical disc, which could store data as micron-
sized light and dark dots.
✓ An optical disc can store more data and has a longer lifespan than the preceding generation of
magnetic storage medium.
✓ To read and write to CDs and DVDs, computers use a CD writer or DVD writer drive, and to read
and write to Blu-ray discs, they require a Blu-ray drive.
✓ MO drives, such as CD-R and DVD-R drives, are used to read and write information to discs
(magneto-optic)
Software
Software is a collection of programs, data, and instructions that enable a computer system and its hardware’s
to do the tasks. A program is a set of instructions or programming statements.
Classifications of Software
Software’s are classified in to below two types as below.
The classification criteria are on which the software is operating and end users.
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
✓ Systems software
✓ Application software
Systems software
✓ Systems software includes the programs that are dedicated to managing the computer itself, such as
the operating system, file management utilities, and disk operating system (or DOS), translators like
assemblers, complier and interpreters.
✓ System software is software that provides platform to other software’s.
✓ Some examples can be operating systems, antivirus software’s, disk formatting software’s, Computer
language translators etc.
✓ These are commonly prepared by the computer manufacturers.
✓ This software’s consists of programs written in low-level languages, used to interact with the
hardware at a very basic level. System software serves as the interface between the hardware and the
end users.
The most important features of system software include
✓ Closeness to the system
✓ Fast speed
✓ Difficult to manipulate
✓ Written in low level language
✓ Difficult to design
Application Software
✓ An application is any program, or group of programs, that is designed for the end
user.
✓ Application software is a term which is used for software created for a specific
purpose.
✓ It is generally a program or collection of programs used by end users.
✓ It can be called an application or simply an app.
✓ Various examples of application software are as fallows
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
• Word processing software(MS WORD,ATOM)
• Database programs(MSSQL,MYSQL,COUCH BASE,MANGO DB)
• Entertainment software(TICK TALK,YOU TUBE)
• Business software(TALLY,SARAL TAX OFFICE)
• Educational software(BYJUS,GLOBAL SHIKSHA)
• Computer-aided design(CAD) software
• Spread sheet software(MS EXCEL)
Difference between System and Application Software’s
System Software Application Software
System software is used for operating computer Application software is used by user to perform
hardware specific task.
System software’s are installed on the computer Application software’s are installed according
when operating system is installed. to user’s requirements.
In general, the user does not interact with In general, the user interacts with application
system software because it works in the software’s.
background.
System software can run independently. It Application software can’t run independently.
provides platform for running application They can’t run without the presence of system
software’s. software.
Some examples of system software’s are Some examples of application software’s are
compiler, assembler, debugger, driver, etc. word processor, web browser, media player,
etc.
Computer languages
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
To communicate with the computers, we need some languages. These are computer languages.
There are mainly three different languages with the help of which we can develop computer programs. And
they are –
• Machine Level language
• Assembly Level Language and
• High Level Language
Machine Level Language
Computer can understand only the language of Digital Electronics. Digital Electronics deals with presence
and absence of voltages. Within the computer there are two logics can play their role. These logics are –
• Positive Logic – Here presence of voltage will be denoted by 1 and absence of voltage will be denoted
by 0
• Negative Logic – Here presence of voltage will be denoted by 0 and absence of voltage will be
denoted by 1
But obviously computer can follow anyone of the logics at a time, not both the logics simultaneously. To
make the computer understand, a program can be written using only 0s and 1s. The data can also be specified
and represented using only 0s and 1s. Such a program is called Machine Language program. Machine
language was the first in the evolution of computer programming languages. Computer directly understands
a program written in the machine language. So as a result, machine language program does not require any
translator to convert from one form to another. In fact, even to this day, basically computers understand only
the 0s and 1s.
Assembly Level Language
After machine level language, the next level of development in the evolution of computer languages was the
Assembly Language. Machine level language uses only the binary language. But on the other hand, assembly
language uses mnemonics or symbolic instructions in place of a sequence of 0s and 1s. As example, we can
consider that, to add register A and B in a particular computer, assembly language uses the mnemonic ‘ADD
B’ in place of 10001111. In assembly language, we use symbolic names to denote addresses and data. A
number of such examples are dealt with in the successive chapters. Thus writing a program in assembly
language has advantages over writing the same in a machine language.
High Level Language
High level language is the next development in the evolution of computer languages. Examples of some high-
level languages are given below –
• PROLOG (for “PROgramming LOGic”);
• FORTRAN (for ‘FORrmula TRANslation’);
• LISP (for “LISt Processing”);
• Pascal (named after the French scientist Blaise Pascal).
High-level languages are like English-like language, with less words also known as keywords and fewer
ambiguities. Each high level language will have its own syntax and keywords. The meaning of the word
syntax is grammar
Types of Language Processors
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
The language processors can be any of the following three types:
1. Compiler
The language processor that reads the complete source program written in high-level language as a whole in
one go and translates it into an equivalent program in machine language is called a Compiler. Example: C,
C++, C#.
In a compiler, the source code is translated to object code successfully if it is free of errors. The compiler
specifies the errors at the end of the compilation with line numbers when there are any errors in the source
code. The errors must be removed before the compiler can successfully recompile the source code again the
object program can be executed number of times without translating it again.
2. Assembler
The Assembler is used to translate the program written in Assembly language into machine code. The source
program is an input of an assembler that contains assembly language instructions. The output generated by
the assembler is the object code or machine code understandable by the computer. Assembler is basically the
1st interface that is able to communicate humans with the machine. We need an assembler to fill the gap
between human and machine so that they can communicate with each other. code written in assembly
language is some sort of mnemonics(instructions) like ADD, MUL, MUX, SUB, DIV, MOV and so on. and
the assembler is basically able to convert these mnemonics in binary code. Here, these mnemonics also
depend upon the architecture of the machine.
For example, the architecture of intel 8085 and intel 8086 are different.
3. Interpreter
The translation of a single statement of the source program into machine code is done by a language processor
and executes immediately before moving on to the next line is called an interpreter. If there is an error in the
statement, the interpreter terminates its translating process at that statement and displays an error message.
The interpreter moves on to the next line for execution only after the removal of the error. An Interpreter
directly executes instructions written in a programming or scripting language without previously converting
them to an object code or machine code. An interpreter translates one line at a time and then executes it.
Example: Perl, Python and Matlab.
GFGC, Nyamathi
BCA First Semester Computer Fundamentals & C Programming
Difference Between Compiler and Interpreter
Compiler Interpreter
A compiler is a program that converts the entire
An interpreter takes a source program and runs it line
source code of a programming language into
by line, translating each line as it comes to it.
executable machine code for a CPU.
The compiler takes a large amount of time to analyze An interpreter takes less amount of time to analyze
the entire source code but the overall execution time the source code but the overall execution time of the
of the program is comparatively faster. program is slower.
The compiler generates the error message only after
scanning the whole program, so debugging is Its Debugging is easier as it continues translating the
comparatively hard as the error can be present program until the error is met.
anywhere in the program.
The compiler requires a lot of memory for generating It requires less memory than a compiler because no
object codes. object code is generated.
Generates intermediate object code. No intermediate object code is generated.
The interpreter is a little vulnerable in case of
For Security purpose compiler is more useful.
security.
Examples: C, C++, C# Examples: Python, Perl, JavaScript, Ruby.
GFGC, Nyamathi