0% found this document useful (0 votes)
6 views

FY_BSCIT_SEM-1 UNIT 1 Fundamentals of Computers & Problem Solving in C

Uploaded by

kirtanjaviya102
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

FY_BSCIT_SEM-1 UNIT 1 Fundamentals of Computers & Problem Solving in C

Uploaded by

kirtanjaviya102
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

VIDHYADEEP UNIVERSITY

Stream: B.Sc IT 1st Sem


Subject:INTRODUCTIONS TO PROGRAMMING USING C [006302101]

www.RNWMULTIMEDIA.com Page | 1
Unit - 1 | Fundamentals of Computers & Problem Solving in C

1.1. Fundamentals of Computers

1.2. Introduction – History of Computers - Generations of Computers

1.3. Classification of Computers

1.4Basic Anatomy of a Computer System

1.5 Input Devices

1.6 Processor Output Devices

1.7 Memory Management

1.8 Types of Software

1.9 Overview of Operating System Programming Languages

1.10 Translator Programs Problem Solving Techniques

1.11 Overview of C

www.RNWMULTIMEDIA.com Page | 2
1.1 Fundamentals of Computers
What is Computer?
The computer is a super-intelligent electronic device that can perform tasks,
process information, and store data. It takes the data as an input and processes that
data to perform tasks under the control of a program and produces the output.
A computer is like a personal assistant that follows instructions to get things
done quickly and accurately. It has memory to store information temporarily so that
the computer can quickly access it when needed.

1.2 Introduction – History of Computers - Generations of


Computers

www.RNWMULTIMEDIA.com Page | 3
Vacumn Tube

www.RNWMULTIMEDIA.com Page | 4
Third Generation of Computer

www.RNWMULTIMEDIA.com Page | 5
www.RNWMULTIMEDIA.com Page | 6
www.RNWMULTIMEDIA.com Page | 7
1.3 Classification of Computers

www.RNWMULTIMEDIA.com Page | 8
Classification of Computers
Different classifications of Computers are as follows.

Classification According to Size


There are four different sorts of computers based on their size and how they are
configured to operate:

1. Supercomputers

www.RNWMULTIMEDIA.com Page | 9
2. Maiframe Computers
Despite being less efficient than supercomputers,
mainframe computers are nevertheless extremely
expensive. Large corporations and governmental
organizations frequently employ mainframe
computers to run everyday operations. They have the
ability to store and analyze a lot of data. To maintain
information on their customers, students, and
insurance policyholders, banks, colleges, and
insurance companies utilize them. They may also act
as a server in a network environment. Hundreds of
users may be managed simultaneously by them.

Mainframe Computer Features:


 They have enormous amounts of memory.
 They are capable of running several different operating systems.
 They have a significant number of CPUs with powerful processing speeds.
 Tightly Coupled Clustering Technology is employed.

3. Minicomputers
Minicomputers are used by small businesses and
industries. They go by the term "Midrange Computers."
These minicomputers frequently have several users, just as
mainframe computers. They are a bit slower than
mainframe computers.
For example, the manufacturing department may employ
minicomputers to keep an eye on specific production
processes.

Features of Minicomputers:
 It is smaller than mainframes or supercomputers in terms of size.
 In comparison to a mainframe or supercomputer, it is less costly.
 It is able to perform many jobs at once.
 It may be utilized by several users simultaneously.
 It is utilized by small businesses.
www.RNWMULTIMEDIA.com Page | 10
4. Microcomputers.
A microcomputer, sometimes referred to as a
personal computer (PC), is a type of computer that
runs on a smaller scale than traditional computers
(Personal Computer). A component that is
commonly referred to as a motherboard houses the
central processing unit (CPU), a microprocessor,
memory in the form of ROM (Read Only Memory),
RAM (Random Access Memory), I/O ports, and a
bus system of connecting wires. They are the most
affordable.

Features of Microcomputers:
 They are extensively employed for personal usage.
 They are smaller and comparably less expensive.
 Multi-user functionality is not supported.
 It has a limited computational capacity.
 They are quite simple to use.

Based on Capacity
According to fundamental operating principles, there are three different kinds of computers.
They are as follows:
1. Analogous Computers
Analog computers process analog data. Temperature, pressure, weight, depth, and
voltage are a few examples of this type of data. These have an infinite range of values and
are continuous quantities.
The first computers were analog, and they laid the groundwork for today's digital
computers.

www.RNWMULTIMEDIA.com Page | 11
2. Digital Computers
In digital computers, letters, numbers, and other special symbols are represented by digits.
On-off (ON-OFF) inputs are used by digital computers, and ON-OFF signals are also
generated by them.

An ON is often represented by a 1 and an OFF by a 0, respectively. A digital computer is


capable of processing both numerical and non-numerical data. In addition to doing
fundamental arithmetic operations like addition, subtraction, multiplication, and division, it
can also perform logical operations.

3. Hybrid Computers
Computers that combine digital and analog components are called hybrid computers. It
combines the best features of both types, having the speed of an analog computer with the
memory and precision of a digital computer. Hybrid computers are typically used in specific
applications where both forms of data need to be processed. As an example, a gas pump
contains a processor that converts measurements of fuel flow into information about quality
and cost.

www.RNWMULTIMEDIA.com Page | 12
1.4Basic anatomy of a computer system

www.RNWMULTIMEDIA.com Page | 13
1.5 Input Devices & 1.6 Processor Output Devices

www.RNWMULTIMEDIA.com Page | 14
www.RNWMULTIMEDIA.com Page | 15
www.RNWMULTIMEDIA.com Page | 16
1.7 Memory Management
Memory management is the process of controlling and coordinating a computer's
main memory. It ensures that blocks of memory space are properly managed and allocated
so the operating system (OS), applications and other
running processes have the memory they need to
carry out their operations.
As part of this activity, memory management
takes into account the capacity limitations of the
memory device itself, deallocating memory space
when it is no longer needed or extending that space
through virtual memory. Memory management strives
to optimize memory usage so the CPU can efficiently access the instructions and data it
needs to execute the various processes.
The term memory can be defined as a collection of data in a specific format. It is
used to store instructions and process data. The memory comprises a large array or group
of words or bytes, each with its own location. The primary purpose of a computer system is
to execute programs. These programs, along with the information they access, should be
in the main memory during execution. The CPU fetches instructions from memory
according to the value of the program counter.
To achieve a degree of multiprogramming and proper utilization of memory, memory
management is important. Many memory management methods exist, reflecting various
approaches, and the effectiveness of each algorithm depends on the situation.
 What is Memory Management?
In a multiprogramming computer, the Operating System resides in a part of memory, and the
rest is used by multiple processes. The task of subdividing the memory among different
processes is called Memory Management. Memory management is a method in the
operating system to manage operations between main memory and disk during process
execution. The main aim of memory management is to achieve efficient utilization of
memory.
 Why Memory Management is Required?
 Allocate and de-allocate memory before and after process execution.
 To keep track of used memory space by processes.
 To minimize fragmentation issues.
 To proper utilization of main memory.
 To maintain data integrity while executing of process.
www.RNWMULTIMEDIA.com Page | 17
 Advantages of Memory Management
 It is a simple management approach
 Disadvantages of Memory Management
 It does not support multiprogramming
 Memory is waste

1.8 Types of Software


Software is a collection of instructions, data, or computer programs that are used to run
machines and carry out particular activities. It is the antithesis of hardware, which refers to
a computer’s external components. A device’s running programs, scripts, and applications
are collectively referred to as “software” in this context.

 What is a Software?
In a computer system, the software is basically a set of instructions or commands that tell a
computer what to do. In other words, the software is a computer program that provides a
set of instructions to execute a user’s commands and tell the computer what to do. For
example like MS-Word, MS-Excel, PowerPoint, etc.

Types of Software
It is a collection of data that is given to the computer to complete a particular task. The
chart below describes the types of software:

www.RNWMULTIMEDIA.com Page | 18
Above is the diagram of types of software. Now we will briefly describe each type and its
subtypes:
1. System Software
 Operating System
 Language Processor
Visit this link for detailed data of it:
 Device Driver
https://www.geeksforgeeks.org/software-
2. Application Software and-its-types/
 General Purpose Software
 Customize Software
 Utility Software

1.9 Overview of Operating System &Programming Languages

An Operating System (OS) is an interface between a computer user and computer


hardware. An operating system is a software which performs all the basic tasks like file
management, memory management, process management, handling input and output,
and controlling peripheral devices such as disk drives and printers.

An operating system is software that enables applications to interact with a computer's


hardware. The software that contains the core components of the operating system is
called the kernel.

The primary purposes of an Operating System are to enable applications (spftwares) to


interact with a computer's hardware and to manage a system's hardware and software
resources.

Some popular Operating Systems include Linux Operating System, Windows Operating
System, VMS, OS/400, AIX, z/OS, etc. Today, Operating systems is found almost in every
device like mobile phones, personal computers, mainframe computers, automobiles, TV,
Toys etc.

www.RNWMULTIMEDIA.com Page | 19
Architecture:

An operating system acts as an intermediary between the user of a computer and


computer hardware. In short its an interface between computer hardware and user. The
purpose of an operating system is to provide an environment in which a user can execute
programs conveniently and efficiently.
www.RNWMULTIMEDIA.com Page | 20
An operating system is software that manages computer hardware. The hardware
must provide appropriate mechanisms to ensure the correct operation of the computer
system and to prevent user programs from interfering with the proper operation of the
system. A more common definition is that the operating system is the one program running
at all times on the computer (usually called the kernel), with all else being application
programs.
Concerned with the assignment of resources among programs e.g. memory,
processors, devices and informationroutines. Similarly, the operating system has programs
to carry out these tasks as with a traffic controller, scheduler, memory management module
I/O program and file system.

Characteristics of Operating Systems:


 Device Management

 File Management
 Job Accounting
 Error-detecting Aids
 Memory Management
 Processor Management
 Control on System Performance

www.RNWMULTIMEDIA.com Page | 21
 Security
 Convenience
 Efficiency
 Ability to Evolve
 Throughput

1.9.2 Concepts of Programming Language


o A program is a set of instructions that help computer to perform tasks. This set of
instructions is also called as scripts.
o Programs are executed by processor whereas scripts are interpreted.
o The languages that are used to write a program or set of instructions are called
"Programming languages".
 Programming languages are broadly categorized into three types −
 Machine level language
 Assembly level language
 High-level language
Concepts of Structured Programming Language

Structured programming is a programming paradigm aimed at improving the clarity, quality, and
development time of a computer program by making extensive use of the structured control flow
constructs of selection (if/then/else) and repetition (while and for), block structures, and subroutines.

Structured programming, or modular programming, is a programming paradigm that facilitates the


creation of programs with readable code and reusable components. All modern programming languages
support structured programming, but the mechanisms of support -- like the syntax of the programming
languages -- vary.

Structured programming encourages dividing an application program into a hierarchy of modules or


autonomous elements, which, in turn, may contain other such elements. Within each element, code may
be further structured using blocks of related logic designed to improve readability and maintainability.

These may include case, which tests a variable against a set of values, and repeat, while and for, which
construct loops that continue until a condition is met. In all structured programming languages, an
unconditional transfer of control, or goto statement, is deprecated and sometimes not even available.
www.RNWMULTIMEDIA.com Page | 22
Advantages of structured programming:
There are multiple advantages to structured programming. For one, it encourages top-down
implementation, which improves both readability and maintainability of code. Structured programming
also promotes code reuse, since even internal modules can be extracted and made independent, residents
in libraries, described in directories and referenced by many other applications. Lastly, it's widely agreed
that structured programming improves development time and code quality.

1.10 Translator Programs


Concepts of Editor, Interpreter and Compiler
 Editors are basically computer programs that are utilised to edit files on a computer. The provide
environment to a programmer to create, edit, update, format a document in any order he/she wants
to. In system programming or programming, editors are software or tools that are used to edit the
program.

 A compiler is a special program that translates a programming language's source code into machine
code, bytecode or another programming language. The source code is typically written in a high-level,
human-readable language such as Java or C++.
o Compilers check all types of errors, limits, and ranges. Thus, it’s more intelligent.
o The run time of its program is longer, and it occupies more memory.

www.RNWMULTIMEDIA.com Page | 23
 An interpreter is a program that directly executes the instructions in a high-level language, without
converting it into machine code. In programming, we can execute a program in two ways. Firstly,
through compilation and secondly, through an interpreter. The common way is to use a compiler.
o An interpreter translates only one statement at a time of the program.
o They create an exe of the programming language before the program runs.

 Difference between Compiler and Interpreter:

www.RNWMULTIMEDIA.com Page | 24
1.11 Overview of C
C is a general−purpose, high−level language that was originally developed by Dennis M. Ritchie to
develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11
computer in 1972.

In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C,
now known as the K&R standard.

The UNIX operating system, the C compiler, and essentially all UNIX application programs have
been written in C. C has now become a widely used professional language for various reasons −

 Easy to learn
 Structured language
 It produces efficient programs
 It can handle low−level activities
 It can be compiled on a variety of computer platforms

o Facts about C
 C was invented to write an operating system called UNIX.
 C is a successor of B language which was introduced around the early 1970s.
 The language was formalized in 1988 by the American National Standard Institute (ANSI).
 The UNIX OS was totally written in C.
 Today C is the most widely used and popular System Programming Language.
 Most of the state-of-the-art software have been implemented using C.
 Today's most popular Linux OS and RDBMS MySQL have been written in C.

Why Use C Language?


C was initially used for system development work, particularly the programs that make-up the
operating system. C was adopted as a system development language because it produces code that runs
nearly as fast as the code written in assembly language.
Some examples of the use of C might be −
 Operating Systems
 Language Compilers
 Assemblers
 Text Editors
 Print Spoolers
 Network Drivers
 Modern Programs
 Databases
 Language Interpreters, Utilities
www.RNWMULTIMEDIA.com Page | 25
C covers all the basic concepts of programming. It's a base or mother programming language to learn
object−oriented programming like C++, Java, .Net, etc. Many modern programming languages such as C++,
Java, and Python have borrowed syntax and concepts from C.
It provides fine-grained control over hardware, making it highly efficient. As a result, C is commonly
used to develop system−level programs, like designing Operating Systems, OS kernels, etc., and also used
to develop applications like Text Editors, Compilers, Network Drivers, etc.
C programs are portable; hence they can run on different platforms without significant modifications.

Advantages of C Language

www.RNWMULTIMEDIA.com Page | 26
Drawbacks of C Language
The following are the disadvantages/drawbacks of C language −

www.RNWMULTIMEDIA.com Page | 27

You might also like