0% found this document useful (0 votes)
42 views11 pages

CProgchap 1notes

Computers are electronic devices that can perform tasks like data processing, calculations, and communication. They consist of hardware and software components. Hardware refers to physical parts like the CPU and memory, while software includes programs and data that run on the hardware. There are three main types of software: system software that manages hardware resources and runs other programs, application software designed for specific tasks, and utility software that helps maintain the system. Computer languages allow programmers to write instructions for computers and develop software.

Uploaded by

raghav
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)
42 views11 pages

CProgchap 1notes

Computers are electronic devices that can perform tasks like data processing, calculations, and communication. They consist of hardware and software components. Hardware refers to physical parts like the CPU and memory, while software includes programs and data that run on the hardware. There are three main types of software: system software that manages hardware resources and runs other programs, application software designed for specific tasks, and utility software that helps maintain the system. Computer languages allow programmers to write instructions for computers and develop software.

Uploaded by

raghav
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/ 11

Open Elective – I Year B.

Com, BBA,BDA
Journey to Fundamentals and C Programming concepts
Chapter – 1
Introduction to Computers
Computers are electronic devices that can perform various tasks, including data processing, calculations, and
communication.
They consist of both hardware and software components, which work together to execute tasks.
Computers have become an integral part of modern life, used in various fields like business, education,
entertainment, and science.
Hardware:
Hardware refers to the physical components of a computer system. These components are tangible and include
items such as the central processing unit (CPU), memory (RAM), storage devices (hard drives, SSDs),
input/output devices (keyboard, mouse, monitor), and more.
Hardware is responsible for the execution of software and performing tasks as instructed by the software.
Software:
Software refers to the intangible programs and data that run on a computer system. It is a set of instructions
that tell the hardware how to perform specific tasks.
There are three primary types of software: system software, application software, and utility software.
1. System Software:
System software is essential for managing and controlling computer hardware. It includes the operating
system and various system utilities.
The operating system (OS) is the core system software that manages hardware resources, provides a user
interface, and runs and manages applications.
System utilities are tools used to maintain and optimize the computer system. Examples include disk
defragmenters, antivirus software, and device drivers.
2. Application Software:
Application software is designed to perform specific tasks or applications for end-users. It includes a wide
range of programs, from word processors to graphic design tools, web browsers, and games.
Application software can be classified into different categories, such as productivity software, entertainment
software, and educational software, based on their intended use.
3. Utility Software:
Utility software is a set of programs that serve various maintenance and optimization functions. It helps users
manage and maintain their computer systems.
Examples of utility software include antivirus software, backup tools, disk cleanup utilities, and system
optimization programs.

System Software
System software is a crucial component of a computer system that manages and controls hardware and
provides a platform for running application software. It acts as an intermediary between the user and the
computer hardware, ensuring the efficient and reliable operation of the system. System software plays a vital
role in managing tasks such as memory, file management, input/output operations, and more. There are
several types of system software, each with its specific functions and purposes.
Types of System Software:
Operating System (OS): The operating system is the core software that controls and manages the hardware
resources of a computer, enabling the execution of application programs.
Examples: Windows, macOS, Linux, Unix, Android.
1. Compiler: A compiler is a software tool that translates high-level programming code into machine
code or an intermediate language, making it executable by the computer's hardware.
2. Assembler: An assembler is a software tool that converts assembly language code into machine code,
allowing for low-level programming and hardware-specific operations.
3. Linker: A linker is a system software component that combines multiple object files, libraries, and
dependencies into a single executable program.
4. Loader: A loader is responsible for loading executable files into memory, preparing them for
execution, and managing dynamic linking and relocation.
5. Device Drivers: Device drivers are software components that facilitate communication between the
operating system and hardware devices such as printers, graphics cards, and network adapters.
6. Utility Programs: Utility programs are system software tools designed to perform various maintenance
and system-related tasks, enhancing the efficiency and functionality of a computer system.

Application Software:
Definition of Application Software: Application software, often referred to as apps, is a set of computer
programs designed to perform specific tasks or functions for end-users. Unlike system software, which
manages and supports the hardware and basic computer operations, application software is user-oriented and
serves various purposes, from productivity to entertainment.
Types of Application Software:
1. Word Processing Software:
Examples: Microsoft Word, Google Docs, LibreOffice Writer.
Purpose: Word processors are used for creating, editing, formatting, and printing documents. They are widely
employed for writing reports, letters, essays, and other text-based content.
2. Spreadsheet Software:
Examples: Microsoft Excel, Google Sheets, LibreOffice Calc.
Purpose: Spreadsheet applications enable users to create, manage, and analyze data in tabular format. They are
valuable for tasks like financial calculations, budgeting, and data analysis.
3. Presentation Software:
Examples: Microsoft PowerPoint, Google Slides, LibreOffice Impress.
Purpose: Presentation software allows users to create and deliver multimedia presentations. It's essential for
business presentations, educational lectures, and public speaking.
4. Database Software:
Examples: Microsoft Access, MySQL, Oracle Database.
Purpose: Database software helps users store, retrieve, and manage data efficiently. It is commonly used in
business for tasks such as customer relationship management (CRM), inventory management, and data
analysis.
5. Graphics and Multimedia Software:
Examples: Adobe Photoshop, Adobe Premiere Pro, CorelDRAW.
Purpose: Graphics and multimedia software are used for creating and editing images, videos, and other
multimedia content. They are valuable in the fields of graphic design, video editing, and digital art.
6. Web Browsers:
Examples: Google Chrome, Mozilla Firefox, Microsoft Edge.
Purpose: Web browsers allow users to access and navigate the World Wide Web. They are essential for
browsing websites, conducting online research, and accessing web-based applications.
7. Communication Software:
Examples: Microsoft Outlook, Skype, Slack.
Purpose: Communication software facilitates various forms of communication, including email, instant
messaging, and video conferencing. It is crucial for staying connected in both personal and professional
contexts.
8. Entertainment Software:
Examples: Video games, media players, streaming apps.
Purpose: Entertainment software provides users with leisure and enjoyment. Video games offer interactive
experiences, while media players and streaming apps allow users to consume music, movies, and TV shows.

Utility Software and its Types


Utility software refers to a category of software programs designed to perform various essential tasks that
enhance the overall functionality and efficiency of a computer system. These tools are not directly involved in
the execution of specific user tasks but instead help manage and maintain the computer's resources and
software. Utility software plays a crucial role in optimizing system performance, ensuring data security, and
simplifying routine tasks. In this article, we will discuss utility software and its different types.
Types of Utility Software
Utility software can be categorized into several types based on their functions and purposes. Here are some of
the most common utility software types:
1. Antivirus Software
Antivirus software is designed to protect a computer system from malware, including viruses, worms, Trojans,
and spyware. It scans files and programs for malicious code, quarantines or removes infected files, and
provides real-time protection against threats. Popular antivirus programs include Norton, McAfee, and Avast.
2. Disk Cleanup and Optimization Tools
These tools help maintain the health and performance of your computer's hard drive by removing unnecessary
files, such as temporary files, cache files, and old backups. They also defragment and optimize the storage to
improve access times. Examples include CCleaner and Disk Cleanup (built into Windows).
3. Disk Defragmentation Software
Disk defragmentation software rearranges fragmented data on the hard drive to reduce file access times and
improve system performance. Windows includes a built-in defragmentation tool, and third-party options like
Defraggler are also available.
4. Backup and Recovery Software
Backup and recovery software is essential for creating and restoring backups of data and system files. It helps
protect against data loss due to hardware failures or accidental deletions. Popular backup software includes
Acronis True Image and Windows Backup.
5. File Compression and Archiving Tools
File compression software allows users to reduce the size of files or folders, making it easier to store and share
them. ZIP, RAR, and 7-Zip are common compression formats, and software like WinRAR and 7-Zip are used
to create and extract compressed files.
6. System Maintenance and Cleanup Software
These tools help users maintain and optimize their system by removing unnecessary files, cleaning the
registry, and managing startup programs. Examples include Advanced SystemCare and CCleaner.

Computer Languages
Computer languages, also known as programming languages, are specialized methods of communication that
humans use to instruct computers. These languages play a crucial role in the development of software,
allowing programmers to write code and create applications, games, websites, and much more. Computer
languages can be categorized into several types based on their characteristics and usage.
Programming Languages
Programming languages can be broadly categorized into the following types:
1, Low Level Language 2. High Level Language
1. Low Level Language are categorised into following types :
1. Machine Language:
Machine language is the lowest-level programming language.
It consists of binary code (0s and 1s) that directly corresponds to the computer's hardware.
Programs written in machine language are highly efficient but challenging to read and write, as they require a
deep understanding of the computer's architecture.
2. Assembly Language:
Assembly language is a low-level programming language that uses mnemonics and symbols to represent
machine code instructions.
It is more human-readable than machine language and is often used for system-level programming and
hardware interactions.
2. High-Level Languages:
High-level languages are designed to be more human-friendly and abstracted from the hardware.
They offer a higher level of abstraction and are easier to learn and use.
Examples of high-level languages include Python, Java, C++, and Ruby.

Translators and its types


A translator takes a program written in high level language as input and converts it into machine language.
It also detects and reports the error during translation.
Roles of translator are:
• Translating the high-level language program input into an equivalent machine language program.
• Providing diagnostic messages wherever the programmer violates specification of the high-level language
program.
Different type of translators
1. Compiler
Compiler is a translator which is used to convert programs in high-level language to low-level language. It
translates the entire program and also reports the errors in source program encountered during the translation.

2. Interpreter
Interpreter is a translator which is used to convert programs in high-level language to low-level language.
Interpreter translates line by line and reports the error once it encountered during the translation process.
It directly executes the operations specified in the source program when the input is given by the user.
It gives better error diagnostics than a compiler.
Differences between compiler and interpreter

Sl. No Compiler Interpreter


1 Performs the translation of a program as a Performs statement by statement translation.
whole.
2 Execution is faster. Execution is slower.
3 Requires more memory as linking is needed Memory usage is efficient as no intermediate
for the generated intermediate object code. object code is generated.
4 Debugging is hard as the error messages are It stops translation when the first error is met.
generated after scanning the entire program Hence, debugging is easy.
only.
5 Programming languages like C, C++ uses Programming languages like Python, BASIC, and
compilers. Ruby uses interpreters.

3. Assembler
Assembler is a translator which is used to translate the assembly language code into machine language code.
Assembly language is a low-level human-readable language that is specific to a particular computer
architecture.
Assemblers are used to develop system software, device drivers, and embedded systems.

Computer Virus :
A computer virus is a kind of malicious computer program, which when executed, replicates itself and inserts
its own code. When the replication is done, this code infects the other files and program present on your
system.
These computer viruses are present in various types and each of them can infect a device in a different
manner.

What is a Computer Virus?


A computer virus is a program which can harm our device and files and infect them for no further use. When a
virus program is executed, it replicates itself by modifying other computer programs and instead enters its
own coding. This code infects a file or program and if it spreads massively, it may ultimately result in
crashing of the device.

Since the computer virus only hits the programming of the device, it is not visible. But there are certain
indications which can help you analyse that a device is virus-hit. Given below are such signs which may help
you identify computer viruses:
 Speed of the System – In case a virus is completely executed into your device, the time taken to open
applications may become longer and the entire system processing may start working slowly
 Pop-up Windows – One may start getting too many pop up windows on their screen which may be
virus affected and harm the device even more
 Self Execution of Programs – Files or applications may start opening in the background of the system
by themselves and you may not even know about them
 Log out from Accounts – In case of a virus attack, the probability of accounts getting hacked increase
and password protected sites may also get hacked and you might get logged out from all of them
 Crashing of the Device – In most cases, if the virus spreads in maximum files and programs, there are
chances that the entire device may crash and stop working

Types of Computer Virus

Discussed below are the different types of computer viruses:

 Boot Sector Virus – It is a type of virus that infects the boot sector of floppy disks or the Master Boot
Record (MBR) of hard disks. The Boot sector comprises all the files which are required to start the
Operating system of the computer. The virus either overwrites the existing program or copies itself to
another part of the disk.
 Direct Action Virus – When a virus attaches itself directly to a .exe or .com file and enters the device
while its execution is called a Direct Action Virus. If it gets installed in the memory, it keeps itself
hidden. It is also known as Non-Resident Virus.
 Resident Virus – A virus which saves itself in the memory of the computer and then infects other files
and programs when its originating program is no longer working. This virus can easily infect other
files because it is hidden in the memory and is hard to be removed from the system.
 Multipartite Virus – A virus which can attack both, the boot sector and the executable files of an
already infected computer is called a multipartite virus. If a multipartite virus attacks your system, you
are at risk of cyber threat.
 Overwrite Virus – One of the most harmful viruses, the overwrite virus can completely remove the
existing program and replace it with the malicious code by overwriting it. Gradually it can completely
replace the host’s programming code with the harmful code.
 Polymorphic Virus – Spread through spam and infected websites, the polymorphic virus are file
infectors which are complex and are tough to detect. They create a modified or morphed version of the
existing program and infect the system and retain the original code.
 File Infector Virus – As the name suggests, it first infects a single file and then later spreads itself to
other executable files and programs. The main source of this virus are games and word processors.
 Spacefiller Virus – It is a rare type of virus which fills in the empty spaces of a file with viruses. It is
known as cavity virus. It will neither affect the size of the file nor can be detected easily.
 Macro Virus – A virus written in the same macro language as used in the software program and
infects the computer if a word processor file is opened. Mainly the source of such viruses is via emails.

Protecting Computer from Virus

The most suitable way of making your computer virus-free is by installing an Anti-virus software. Such
software help in removing the viruses from the device and can be installed in a computer via two means:

 Online download
 Buying an Anti-virus software and installing it

Planning a Computer Program :

1. Define the Problem/Understand the Problem.


Clearly understand the problem you're trying to solve.
Gather requirements and specifications from stakeholders.
2. Set Objectives:
Define the objectives of the program.
Identify what you want to achieve with the algorithm.
3. Determine Input and Output:
List the data that the program will take as input.
Specify the expected output or results.
4. Algorithm Design:
Outline the high-level steps to solve the problem.
5. Flowchart Design:
Create a flowchart that visually represents the algorithm.
Use standard flowchart symbols (start/end, process, decision, input/output) to illustrate the program's logic.
6. Coding:
Write the Program/code in any of the Programming languages
7. Testing Plan:
Develop a plan for testing the program.
Include unit testing, integration testing, and user acceptance testing.
8. Implementation :
Actual use of the Program and any further changes/Updating, repeat from coding process.

What is an Algorithm?

In computer programming terms, an algorithm is a set of well-defined instructions to solve a particular


problem. It takes a set of input(s) and produces the desired output. For example,

An algorithm to add two numbers:

1. Take two number inputs


2. Add numbers using the + operator
3. Display the result
Qualities of a Good Algorithm

 Input and output should be defined precisely.


 Each step in the algorithm should be clear and unambiguous.
 Algorithms should be most effective among many different ways to solve a problem.
 An algorithm shouldn't include computer code. Instead, the algorithm should be written in such a way
that it can be used in different programming languages.

Algorithm 1: Add two numbers entered by the user

Step 1: Start
Step 2: Declare variables num1, num2 and sum.
Step 3: Read values num1 and num2.
Step 4: Add num1 and num2 and assign the result to sum.
sum←num1+num2
Step 5: Display sum
Step 6: Stop

Algorithm 2: Find the largest number among three numbers

Step 1: Start
Step 2: Declare variables a,b and c.
Step 3: Read variables a,b and c.
Step 4: If a > b
If a > c
Display a is the largest number.
Else
Display c is the largest number.
Else
If b > c
Display b is the largest number.
Else
Display c is the greatest number.
Step 5: Stop

Flowchart :

A flowchart is a diagrammatic representation of an algorithm. A flowchart can be helpful for both writing
programs and explaining the program to others.

Symbols Used In Flowchart

Symbol Purpose Description


Flow line Indicates the flow of logic by connecting
symbols.

Terminal(Stop/Start) Represents the start and the end of a flowchart.

Input/Output Used for input and output operation.

Processing Used for arithmetic operations and data-


manipulations.
Decision Used for decision making between two or
more alternatives.

On-page Connector Used to join different flowline

Off-page Connector Used to connect the flowchart portion on a


different page.

Predefined Represents a group of statements performing


Process/Function one processing task.

Examples of flowcharts in programming

1. Add two numbers entered by the user.

2. Find the largest among three different numbers entered by the user.
Rules For Creating Flowchart :
A flowchart is a graphical representation of an algorithm.it should follow some rules while creating a
flowchart
Rule 1: Flowchart opening statement must be ‘start’ keyword.
Rule 2: Flowchart ending statement must be ‘end’ keyword.
Rule 3: All symbols in the flowchart must be connected with an arrow line.
Rule 4: The decision symbol in the flowchart is associated with the arrow line.

Advantages of Flowchart:
 Flowcharts are a better way of communicating the logic of the system.
 Flowcharts act as a guide for blueprint during program designed.
 Flowcharts help in debugging process.
 With the help of flowcharts programs can be easily analyzed.
 It provides better documentation.
 Flowcharts serve as a good proper documentation.
 Easy to trace errors in the software.
 Easy to understand.
 The flowchart can be reused for inconvenience in the future.
 It helps to provide correct logic.

Disadvantages of Flowchart:
 It is difficult to draw flowcharts for large and complex programs.
 There is no standard to determine the amount of detail.
 Difficult to reproduce the flowcharts.
 It is very difficult to modify the Flowchart.
 Making a flowchart is costly.
 It makes software processes low.
 If changes are done in software, then the flowchart must be redrawn

You might also like