[go: up one dir, main page]

0% found this document useful (0 votes)
23 views24 pages

unit 1

Uploaded by

Abhinav Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views24 pages

unit 1

Uploaded by

Abhinav Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

MAHARANA PRATAP GROUP OF INSTITUTIONS

KOTHI MANDHANA, KANPUR


(Approved by AICTE, New Delhi and Affiliated to Dr. AKTU, Lucknow)

Digital Notes
[Department of Computer Applications]
Subject Name : Fundamental of Computers&
Emerging Technologies

Subject Code :KCA-101


Course :MCA
Branch : MCA
Semester :Ist
Prepared by : Mr. Yogendra Singh

Reference No./MCA/Yogendra Singh/KCA-101/1/1

P age |1
Unit-1: Introduction to Computer Fundamentals

Introduction to Computer

A computer is an electronic device that takes raw data as input from the user and processes it
with a set of instructions (called program) to produce the result as output. The term "computer"
is derived from the Latin word "computare" which means to calculate. Computer cannot do
anything without a Program.
A computer that includes the hardware, operating system and peripheral equipment needed used
for full operation. A computer system will only follow the instructions that the user inputs.
It is believed that the Analytical Engine was the first computer which was invented by Charles
Babbage in 1837. It uses read-only memory in the form of punch cards. Charles Babbage is also
known as the ‘father ‘of the computer.
Therefore, we may define a computer as an electronic device that transforms data into
information. Data can be anything like marks obtained by you in various subjects; it can also be
name, age, sex, weight, height, etc. of all the students in your class or income, savings,
investments, etc. of a country.

[Figure 1: Block Diagram of Computer]

P age |2
Characteristics of Computer

Let us now identify the major characteristics of a computer. These are:

1. Accuracy
 In addition to being very fast, computers are very accurate.\
 The calculations are 100% error free.
 Computers perform all jobs with 100% accuracy provided that correct input has been given.
2. Diligence
 A computer is free from tiredness, lack of concentration, fatigue, etc. It can work for
hours without any error.
 It can work continuously without any error.
 It can do repeated work with same speed and accuracy.
3. Versatility
 A computer is a very versatile machine.
 A computer is very flexible in performing the jobs to be done.
 This machine can be used to solve the problems related to various fields.
 At one instance, it may be solving a complex scientific problem and the very next moment it
may be playing a card game.

4. Storage:
The computer has an in-built memory where it can store huge amount of data. You can also store
data in secondary storage devices such as CDs, DVDs, and pen drives which can be kept outside
the computer and can be carried to other computers

5. Speed:
As you know computer can work very fast. It takes only a fraction of a second for calculations
that manually take hours to complete. It takes few minutes for the computer to process huge
amount of data and give the result.

P age |3
1.3 Components of computer

1. Input Unit

 Input devices can send data or information to a computer. The input device is usually a
keyboard where programs and data are entered into the computers.
 Data entered through the input device is temporarily stored in the main memory of the
computer system.
 Following are few of the important input devices which are used in a computer:

Examples:
1. Keyboard
2. Mouse
3. Joy Stick, etc

2. CPU (Central Processing Unit)

CPU is considered as the brain of the computer. CPU performs all types of data
processing operations. It stores data, intermediate results, and instructions (program). It
controls the Operation of all parts of computer.
CPU itself has following three components
1. ALU (Arithmetic Logic Unit)
2. Memory Unit
3. Control Unit

1. Arithmetic Logical Unit (ALU)

 The processing of the data and instructions are performed by Arithmetic Logical Unit.
The major operations performed by the ALU are addition, subtraction, multiplication,
division, logic and comparison.

P age |4
 For processing, data is transferred from storage unit to ALU. After processing, the output
is returned back to storage unit for storing purpose.

2. Control Unit (CU): The control unit controls and coordinates the functioning of all parts of
computer.

3. Memory Unit:

 The memory unit is a component of a computer system. It is used to store data,


instructions and information. It is also known as a primary memory.
 It temporarily stores data, instructions and final results for processing.

Output Unit –Output unit consists of devices with the help of which we get the information
from computer. Devices like printer and visual display unit that are used to provide information
to the user in desired format are called output unit.

P age |5
Computer Systems:
A computer is a system made of two major components: hardware and software. The computer
hardware is the physical equipment. The software is the collection of programs (instructions) that
allow the hardware to do its job.

Computer Hardware
Hardware represents the physical and tangible components of a computer i.e. the components
that can be seen and touched.
Examples of Hardware are following:
Input devices -- keyboard, mouse etc.
Output devices -- printer, monitor etc.
Internal components -- CPU, motherboard, RAM etc.
Primary storage-

Input Devices:
Input devices can send data or information to a computer or another device. The input device is
usually a keyboard where programs and data are entered into the computers. The input devices
translate the information into the form understandable by computer.
Examples:
4. Keyboard
5. Mouse
6. Joy Stick, etc

CPU - Central Processing Unit


CPU is considered as the brain of the computer. CPU performs all types of data processing
operations. It stores data, intermediate results and instructions. Sometimes it is also called

P age |6
processer, central processor and microprocessor. It stores all important programs like operating
system and application software.
CPU itself has following three components
1. ALU (Arithmetic Logic Unit)
2. Control Unit
3. Memory Unit
1. Arithmetic Logical Unit (ALU)
The processing of the data and instructions are performed by Arithmetic Logical Unit. The major
operations performed by the ALU are addition, subtraction, multiplication, division, logic and
comparison. For processing, data is transferred from storage unit to ALU. After processing, the
output is returned back to storage unit for further processing or for storing purpose.

2. Control Unit (CU)


The control unit controls and coordinates the functioning of all parts of computer.

3. Memory Unit
The memory unit is a component of a computer system. It is used to store data, instructions and
information. It is also known as a primary memory.
It temporarily stores data, instructions and final results for processing.

P age |7
Computer Memory
 Computer memory is any physical device capable of storing information temporarily
like RAM (random access memory), or permanently, like ROM (read-only memory).
 A computer memory is used to store data and instructions that the computer is currently
using. Computer memory is the storage space in computer where data is to be processed
and instructions required for processing are stored. The Memory is divided into large
number of small parts called cells.
 Each cell has a unique address which varies from zero to memory size minus one.

[Figure 4: Hierarchy of Computer Memory]

Computer storage can be divided into:


Memory is primarily of three types −
1. Cache Memory
2. Primary Memory/ Main Memory
3. Secondary Memory

P age |8
Cache Memory:

Figure: cache memory


 The Cache Memory is the volatile memory which is very nearest to the CPU , all the
Recent Instructions are Stored into the Cache Memory.
 It can be accessed by the CPU at much faster speed than main memory
 Cache memory lies on the path between the CPU and the main memory.
 It facilitates the transfer of data between the processor and the main memory at the speed
which matches to the speed of the processor.
 The CPU searches cache before it searches main memory for data and instructions. Cache
is physically located close to the CPU and hence access to cache is faster than to any
other memory.

Advantages: The advantages of cache memory are as follows −


1. Cache memory is faster than main memory.
2. It stores the program that can be executed within a short period of time.
3. It consumes less access time as compared to main memory.
4. It stores data for temporary use.
Disadvantages: The disadvantages of cache memory are as follows −
1. It is very expensive.
2. Cache memory has limited capacity.

P age |9
Primary Memory (Main Memory)
Primary memory holds only those data and instructions on which the computer is currently
working. It has a limited capacity and data is lost when power is switched off. It is generally
made up of semiconductor device. These memories are not as fast as registers.

The main memory is used to store data and instructions contently required for processing.
Primary Memory is divided into two subcategories:

1. Random Access Memory (RAM)


2. Read Only Memory (ROM)

RAM (Random Access Memory)

1. RAM (Random access memory) – Random Access Memory (RAM) is a type of data
storage used in computers that is generally located on the motherboard. Typically,
programs are transferred from storage on a disk drive to RAM.

2. RAM is a volatile memory because all data that was stored in RAM is lost when the
computer is turned off.

3. It is very expensive.

Types of RAM
RAM is available in several different types
1. Static RAM (SRAM)
2. Dynamic RAM (DRAM)

1. Static RAM (SRAM)


 SRAM stands for Random Access Memory. Data remains in SRAM as long as there is
power supply.
 It does not need to be refreshed on a regular basis.
 SRAM is also used as cache memory and has very fast access.

P a g e | 10
 Uses multiple transistors(4 to 6) for each memory cell
 Doesn't have capacitor in each cell
 More expensive

Characteristic of the Static RAM


1. It has long life
2. There is no need to refresh
3. Faster
4. Used as cache memory
5. Large size
6. Expensive
7. High power consumption.

2. Dynamic RAM (DRAM)


1. DRAM stands for Dynamic Random Access Memory. Data can be stored in the DRAM
only when it is refreshed frequently (DRAM, unlike SRAM, must be continually
refreshed in order to maintain the data).
2. Uses capacitors
3. Capacitor holds information as bits

Characteristics of the Dynamic RAM


1. It has short data lifetime
2. Need to be refreshed continuously
3. Slower as compared to SRAM
4. Used as RAM
5. Lesser in size
6. Less expensive
7. Less power consumption

P a g e | 11
Difference between DRAM and SRAM

s.no SRAM DRAM


1 SRAM stands for Static Random DRAM stands for Dynamic Random Access
Access Memory Memory
2 SRAM consists of internal flip-flops. DRAM consists of transistor & capacitors.
3 SRAM have high speed than DRAM DRAM speed are less than SRAM
4 Low storage density than DRAM High storage density than DRAM
5 Used as cache memory. Used as main memory.
6 Do not refreshes the memory cell Need to refreshes the memory cell

ROM (Read Only Memory)


 ROM is non-volatile memory, which means the information is permanently stored on the
chip.
 Non-volatile memory is used for parts of the computer that do not change, such as the
initial boot-up portion of the software.
 Turing off the computer does not have any effect on ROM.
 Non- volatile memory cannot be changed by users.
Types of ROM
ROM is available in several different types, including PROM, EPROM, and EEPROM.
1. PROM: PROM is Programmable Read Only Memory. These are ROMs which can be
programmed. A special PROM programmer is used to enter the program on the PROM.
Once the chip has been programmed, information on the PROM cannot be altered/
changed. PROM is non volatile i.e. Data is not lost when power is switched off.

2. EPROM: EPROM stands for Erasable Programmable Read-Only Memory, and as the
name suggests, data stored in an EPROM can be erased and the EPROM reprogrammed.
Erasing an EPROM involves removing it from the computer and exposing it to ultra
violet light before re-burning it.

P a g e | 12
3. EEPROM: EEPROM stands for Electrically Erasable Programmable Read-Only
Memory, and the distinction between EPROM and EEPROM is that the latter can be
erased and written to by the computer system it is installed in. In that sense EEPROM is
not strictly read-only. However in many cases the write process is slow, so it is normally
only done to update program code such as firmware or BIOS code on an occasional basis
not strictly read-only. However in many cases the write process is slow, so it is normally
only done to update program code such as firmware or BIOS code on an occasional basis

Differences between RAM and ROM

RAM ROM
RAM stands for Random Access Memory. ROM stands for Read Only Memory.
It is volatile memory. it is non- volatile memory
RAM is a temporary memory of the computer. It is the permanent memory of the
computer.
It is faster than ROM It is slower than the RAM.
It is used as Cache memory. It is used as main memory.
It is read/write memory It is read only memory.
Types of RAM: Types of ROM:
1. DRAM 1. PROM
2. SRAM 2. EPROM
3. EEPROM

Secondary Memory Types:


Secondary memory comprises many different storage media which can be directly attached to a
computer system. These include:
 Hard Disk Drives
 Solid State Drives (SSDs)
 Pen Drive, Memory Cards, etc.

P a g e | 13
Software:
Software is a set of instructions or programs that perform a specific task of a computer.
Examples of software are:
Google Chrome, Photoshop, MS-Word, VLC Player, UC Browser, etc

There are major types of software:


1. System Software
2. Application Software
3. Utility Software
1. System Software
 The system software is a set of programs used to control and coordinate the hardware and
other application software.

 System software provides basic functionality to the computer. System software is


required for the working of computer itself.
Example: Disc Operating System (DOS), Windows, Unix/Linux etc.
Devices driver:
A Devices driver is a software program that controls a particular type of hardware device that is
attached to a computer.
Application software
Application software is a set of programs used to solve a specific task.
Example: MS office
Utility software
 Utility software is a collection of one or more programs that helps the user in system
maintenance tasks and in performing tasks of routine nature.
 The job of utility programs is to keep the computer system running smoothly.
 Now days many utility software are part of the operating system itself.
 Even if there is no utility software on your computer, the computer works but with the
right kind of utility software loaded, the computer becomes more reliable and even its
processing speed increases.

Example: ANTI-VIRUS

P a g e | 14
Programming Languages

A programming language defines a set of instructions that are compiled together to perform a
specific task by the CPU (Central Processing Unit). The programming language mainly refers to
high-level languages such as C, C++, etc.
Based on the levels of abstraction, they can be classified into two categories:
1. Low-level languages.
2. High-level languages.

Low-level programming languages

Low-Level programming language programs are faster than High-Level programming language
programs as they have fewer keywords, symbols and there is no need to convert it into Machine
Code.

1. Machine-level language
The machine-level language is a language that consists of a set of instructions that are in the
binary form 0 or 1, which can be directly understood by the computer without translating them,
is called a machine language or machine code.
All instructions use binary notation and are written as a string of 1s and 0s.

A program instruction in machine language may look something like this:


Example: 10010101100101001111101010011011100101

P a g e | 15
2. Assembly Language
The assembly language contains some human-readable commands such as mov, add, sub, etc.
As we know that computers can only understand the machine-level instructions, so we require a
translator that converts the assembly code into machine code. The translator used for translating
the code is known as an assembler.

It can be called the second generation language.


Example terms like MOVE, ADD, SUB and END.

High-Level Language
The high-level language is a programming language that allows a programmer to write the
programs which are independent of a particular type of computer. The high-level languages are
considered as high-level because they are closer to human languages than machine-level
languages. A compiler is required to translate a high-level language into a low-level language.

The examples of high-level languages are:


 Fortran
 COBOL
 Pascal
 C
 C++
 Java, etc.

Advantages of a high-level language


o The high-level language is easy to read, write, and maintain as it is written in English like
words.
o The high-level languages are designed to overcome the limitation of low-level language,
i.e., portability. The high-level language is portable; i.e., these languages are machine-
independent.

P a g e | 16
Differences between Machine-Level language and Assembly language

Machine-level language Assembly language

The machine-level language comes at The assembly language comes above the machine
the lowest level in the hierarchy, so it language means that it has less abstraction level from
has zero abstraction level from the the hardware.
hardware.

It cannot be easily understood by It is easy to read, write, and maintain.


humans.

The machine-level language is written The assembly language is written in simple English
in binary digits, i.e., 0 and 1. language, so it is easily understandable by the users.
Example terms like MOVE, ADD, SUB and END.

It does not require any translator as the In assembly language, the assembler is used to convert
machine code is directly executed by the assembly code into machine code.
the computer.

It is a first-generation programming It is a second-generation programming language.


language.

P a g e | 17
What is Language Processor or Translator?
Language processor or translator is software that converts the code written in high level language
or assembly language into machine language.

Why need language processor


A program written in high level language or assembly language cannot be run on a computer
directly. It must be converted into machine language before execution.

Types of Language Processor


Different types of language processors are as follows:
1. Compiler
2. Interpreter
3. Assembler

1. Compiler
A compiler is a program that converts source code written in a high-level language into machine
language as a whole.
A program written in high level language is known as source program. Compiler converts source
program into machine code. This machine code is known as an object program.
Examples: C, C++, Java etc.

P a g e | 18
2. Interpreter

An interpreter is a program that converts one statement of a program at one time. It executes this
statement before translating the next statement of the source program. If there is an error in the
statements, the interpreter stops working and displays the error message
Examples: Python and Matlab.

3. Assembler
An assembler is translating program that translates instructions of an assembly language
programs into machine language.
Difference between Compiler and Interpreter

Compiler Interpreter
Compiler converts a program into machine Interpreter converts the program into machine
code as a whole code statement by statement
Compiler creates object code file Interpreter does not create object code file
A compiler converts a high-level program that An interpreter converts high-level program
can be executed many times each time it is executed.
Program execution is fast Program execution is slow
Compiler displays syntax errors after Interpreter displays syntax error on each
compiling the whole program statement of program
Example: C, C++, etc. Example: python, Ruby etc

P a g e | 19
Algorithm
An algorithm is a combination of sequence of finite steps to solve a given problem.
or
Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a
certain order to get the desired output.

Example: Write the algorithm to find the sum of given two numbers
Solution:
Algorithm
Step 1: start
Step 2: Input a, b
Step 3: sum a+b
Step 4: print sum
Step 5: stop

Characteristics of an Algorithm
An algorithm should have the following characteristics −

1. Input − An algorithm should have 0 or more well-defined inputs.

2. Output − An algorithm should have 1 or more well-defined outputs, and should match
the desired output.
3. Unambiguous − Algorithm should be clear and unambiguous.

4. Finiteness − Algorithms must terminate after a finite number of steps.

5. Effectiveness –Every steps must be basic and essential.

Advantages and Disadvantages of Algorithm

1 Advantages of Algorithm

1. It is a step-wise representation of a solution to a given problem, which makes it easy to


understand.
2. An algorithm uses a definite procedure.

P a g e | 20
3. It is not dependent on any programming language, so it is easy to understand for anyone even
without programming knowledge.
4. Every step in an algorithm has its own logical sequence so it is easy to debug.
5. By using algorithm, the problem is broken down into smaller pieces or steps hence, it is easier
for programmer to convert it into an actual program

3.2 Disadvantages of Algorithm.


1. Writing algorithm takes a long time.
2. It is not executable.
3. Error cannot be detected.

Defining Pseudo-code
Pseudo-code is an informal language that helps programmers to develop algorithms. Pseudo-
code is a "text-based" detail (algorithmic) design tool.
Some significant points you need to know about pseudo-code are:
1. It is not a actual programming language.
2. It is used for creating an outline of a program.
3. Pseudo-code cannot be executed or compiled by any compiler, interpreter, or assembler.
4. Unlike programming language code, pseudo-code does not follow a strict structure and
syntax.

Examples of Pseudo-code
Create a program to add 2 numbers together and then display the result.
Start Program
Enter two numbers, A, B
Add the numbers together
Print Sum
End Program

Advantage of Pseudo-code
 The best approach to represent how the actual program will be written.
 It is fairly easy to understand, even for non-programmers.

P a g e | 21
Flow Chart
A flowchart is a graphical representation of steps. It shows steps in sequential order and is
widely used in presenting the flow of algorithms, workflow or processes. Typically, a
flowchart shows the steps as boxes of various kinds, and their order by connecting them with
arrows.
Some of the common uses of flowcharts include:
 Planning a new project
 Documenting a process
 Modeling a business process
 Managing workflow
 Auditing a process
 Mapping computer algorithms
 Data management
 Chemical and process engineering

Flowchart Notation
Different flow chart symbols have different meanings. The most common flow chart symbols are:
i. Terminator: Elongated circles, which signify the start or end of a process.
ii. Process: A rectangular flow chart shape indicating a normal process flow step
(instructions or actions).
iii. Decision: A diamond flow chart shape indication a branch in the process flow decisions
that must be made
iv. Connector: A small, labeled, circular flow chart shape used to indicate a jump in the
process flow.
v. Data: A parallelogram that indicates data input or output (I/O) for a process.
vi. Document: Used to indicate a document or report

Flowchart Symbols
Different flowchart shapes have different conventional meanings. The meanings of some of the
more common shapes are as follows:
i. Terminator
The terminator symbol represents the starting or ending point of the system.

P a g e | 22
ii. Process
A box indicates some particular operation.

iii. Decision
A diamond represents a decision or branching point. Lines coming out from the diamond
indicate different possible situations, leading to different sub-processes.

iv. Data
It represents information entering or leaving the system. An input might be an order from a
customer. Output can be a product to be delivered.

v. On-Page Reference
This symbol would contain a letter inside. It indicates that the flow continues on a matching
symbol containing the same letter somewhere else on the same page.

Lines represent the flow of the sequence and direction of a process.

P a g e | 23
Difference between Algorithm and Flowchart

Algorithm Flowchart
It is a procedure for solving problems. It is a graphic representation of a process.
The process is shown in step-by-step The process is shown in block-by-block information
instruction. diagram.

It is complex and difficult to understand. It is intuitive and easy to understand.


It is convenient to debug errors. It is hard to debug errors.
The solution is showcased in natural The solution is showcased in pictorial format.
language.

It is somewhat easier to solve complex It is hard to solve complex problem.


problem.

It costs more time to create an algorithm. It costs less time to create a flowchart.

P a g e | 24

You might also like