unit 1
unit 1
Digital Notes
[Department of Computer Applications]
Subject Name : Fundamental of Computers&
Emerging Technologies
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.
P age |2
Characteristics of Computer
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
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
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:
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
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.
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.
P age |8
Cache Memory:
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. 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)
P a g e | 10
Uses multiple transistors(4 to 6) for each memory cell
Doesn't have capacitor in each cell
More expensive
P a g e | 11
Difference between DRAM and SRAM
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
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
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
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 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.
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.
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.
P a g e | 16
Differences between Machine-Level language and 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.
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.
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.
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 −
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.
1 Advantages of Algorithm
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
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.
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 costs more time to create an algorithm. It costs less time to create a flowchart.
P a g e | 24