You are on page 1of 7

PPS – 3110003 Prepared By: Prof.

Jigar Dalvadi

UNIT-1 - Introduction to computer and programming


Basic block diagram of Computer and its Component

Computer is an electronic device which performs tasks given by user with extremely fast speed
and accuracy. Like any other device or machine, a computer system has also a number of parts.
A computer system can be blocked into mainly three parts:

1. Input Unit
2. Central Processing Unit
3. Output Unit

1. Input unit – Input unit is a unit that accepts any input device. The input device is used to
input data into the computer system.

Function of input unit:

 It converts inputted data into binary codes.

1|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

 It sends data to main memory of computer.

2. Central Processing Unit (CPU) – CPU is called the brain of a computer. An electronic
circuitry that carries out the instruction given by a computer program.

CPU can be sub classified into three parts.

i .Control unit (CU)

ii. Arithmetic & Logic unit (ALU)

iii.Memory Unit (MU)

ii. Arithmetic & Logic unit (ALU) – The arithmetic logic unit (ALU), which performs simple
arithmetic operation such as +,-, *, / and logical operation such as >, <, =<, <= etc.

iii. Memory Unit (MU)- Memory is used to store data and instructions before and after
processing. Memory is also called Primary memory or internal memory. It is used to store data
temporary or permanently.

Function of CPU-

 It controls all the parts and software and data flow of computer.
 It performs all operations.
 It accepts data from input device.
 It sends information to output device.
 Executing programs stored in memory
 It stores data either temporarily or permanent basis.
 It performs arithmetical and logical operations.

3. Output Unit –Output unit is a unit that constituents a number of output device. An output
device is used to show the result of processing.

Function of Output unit:

 It accepts data or information sends from main memory of computer


 It converts binary coded information into HLL or inputted languages.

Terms Hardware and Software

2|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

Hardware

 The term hardware hardware refers to mechanical device that makes up computer.
 Hardware consists of the physical components of a computer, also referred to as the
equipment of a computer.
 The user may not be able to see all the hardware devices because they are internal to the
computer’s casing.

 Examples of hardware are CPU, keyboard, mouse, hard disk, etc

Software

 A set of instructions that drives computer to do stipulate tasks is called a program.


 Software refers to the set of instructions a computer uses to complete any instructed task.
 Software is the program that is operated by the hardware.

The two most important types of software are:

1. System software (including the operating system)


2. Application software.

3|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

System Software

 The software that runs the computer by activating, controlling, and coordinating the
hardware is system software.
 They also control the application programs on the computer.
 They differ according to the function they need to perform in the computer system.

Application Software

 This type of software is for specific tasks related to end-users and their ease.
 Unlike system software, a computer doesn’t need them to function.
 The users can install and uninstall this software according to their needs.

Difference between Computer Hardware and Software


Hardware Software
It is internal to the computer that uses a set of
It is the physical part of the device that takes
instructions to command the device for different
care of data processing.
tasks.
It is made by manufacturing. It is made by developers and engineers.
Relies on high-level programming languages to
Uses binary codes to function.
function.
Monitors machine-level tasks. Monitors the hardware functioning.
It depends on the software to execute the It depends on hardware to process the
task. information.
They are tangible and thus we can see and They are intangible and thus we can’t see and
touch hardware. touch software.
Works for most of the computers in general Is designed according to the computer system
as they have uniform architecture. and updates according to user preference.
It mainly consists of input devices, output System software and Application software are
devices, storage, and internal components. two of its major types.
Integrated Circuits, diodes, registers, crystals,
Numbers, alphabets, symbols, keywords, etc.
insulators, etc.
The viruses cannot attack the hardware
The viruses can attack the software system.
system.
Usually have something to do with the system
They are very random and hard to find.
and troubleshoots automatically.
Their electric transmission is possible from
They can easily transfer from different locations
one place to another electrically using a
using the network.
network.
Depreciates over time. Keeps updating with time.
In case of damage, a new device replaces the
In case of damage, it undergoes reinstallation.
hardware.
Keyboard, Monitor, Printer, CPU, Hard disk, Ms Word, Operating system, Photoshop,
ROM, etc. MySQL, etc.

4|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

Compiler and interpreter


Interpreter Compiler
Interpreter translates just one statement of the Compiler scans the entire program and
program at a time into machine code. translates the whole of it into machine code at
once.
An interpreter takes very less time to analyze A compiler takes a lot of time to analyze the
the source code. However, the overall time to source code. However, the overall time taken
execute the process is much slower. to execute the process is much faster.
An interpreter does not generate an A compiler always generates an intermediary
intermediary code. Hence, an interpreter is object code. It will need further linking. Hence
highly efficient in terms of its memory. more memory is needed.
Keeps translating the program continuously till A compiler generates the error message only
the first error is confronted. If any error is after it scans the complete program and hence
spotted, it stops working and hence debugging debugging is relatively harder while working
becomes easy. with a compiler.
Interpreters are used by programming Compliers are used by programming languages
languages like Ruby and Python for example. like C and C++ for example.

Concepts of Machine level, Assembly level and high level


programming
Low-Level Language

 Low-level languages are referred to as 'low' because they are very close to how different
hardware elements of a computer actually communicate with each other.
 Low-level languages are machine oriented and require extensive knowledge of computer
hardware and its configuration.
 There are two categories of low-level languages: machine language and assembly
language.

Machine language

 Machine language, or machine code, is the only language that is directly understood by
the computer, and it does not need to be translated.

Assembly language

 An assembly language consists of a set of symbols and letters.


 A translator is required to translate the assembly language to machine language. This
translator program is called the 'assembler.'

High-Level Languages

5|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

 A high-level language is a programming language that uses English and mathematical


symbols, like +, -, % and many others, in its instructions.
 When using the term 'programming languages,' most people are actually referring to
high-level languages.

Flowcharts and Algorithms


Definition of Flowchart
 A flowchart is the graphical or pictorial representation of a process or a program with the
help of different symbols, shapes, and arrows to demonstrate.
 The main purpose of using a flowchart is to analyze different methods

Several standard symbols are applied in a flowchart:

Advantages of flowchart

 Proper debugging
 Effective analysis
 Efficient coding
 Proper documentation
 Efficient program maintenance

6|Page
PPS – 3110003 Prepared By: Prof. Jigar Dalvadi

Disadvantages of flowchart

 Time-consuming
 Complex
 Difficult to modify
 It has no standard

Definition of Algorithm
 Writing a logical step-by-step method to solve the problem is called the algorithm
 In other words, an algorithm is a procedure for solving problems. In order to solve a
mathematical or computer problem, this is the first step in the process.
 An algorithm includes calculations, reasoning, and data processing. Algorithms can be
presented by natural languages, pseudo code, and flowcharts, etc.

Advantages of algorithm

 Algorithms are easy to write.


 There is a use of human-readable techniques to understand logic.
 For big problems, algorithms can be written with moderate steps.

Disadvantages of algorithm

 Algorithms are difficult to debug.


 It is hard to show branches and loops using an algorithm.
 Jumping (or go to statements) makes the algorithm hard to trace the problems.

7|Page

You might also like