FY_BSCIT_SEM-1 UNIT 1 Fundamentals of Computers & Problem Solving in C
FY_BSCIT_SEM-1 UNIT 1 Fundamentals of Computers & Problem Solving in C
www.RNWMULTIMEDIA.com Page | 1
Unit - 1 | Fundamentals of Computers & Problem Solving in C
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.
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.
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.
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.
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
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
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:
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
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.
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.
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.
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.
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