0% found this document useful (0 votes)
9 views32 pages

L1-L2 Introduction To Computing

Uploaded by

mapplelucas7
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)
9 views32 pages

L1-L2 Introduction To Computing

Uploaded by

mapplelucas7
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/ 32

Introduction to Computing

Objectives
To learn and appreciate the following concepts

✓Problem solving basics


✓Logic and its importance in problem solving
✓Various computational problems and its classification
✓Computer Organization and operating system
✓Different types of languages
✓History of C, Typical C program development environment.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 2


Session outcome
• At the end of session the student will be able to understand

• Importance of problem solving techniques, Computer organization, Operating


system, Types of languages

• History of C, programming development environment

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 3


Introduction to problem solving

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 4


Skill set required for Software Engineers

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 5


What is a problem?
• A problem is a puzzle that requires logical thought or mathematics to solve
• A puzzle could be a set of questions on a scenario which consists of description of
reality and a set of constraints about the scenario

For e.g.,
Consider a Scenario - Infosys Mysore campus has a library. The librarian issues book
only to Infosys employees.
o Description of reality: There is a library in Infosys Mysore campus. There is a
librarian in the library
o Constraints: Librarian issues book only to Infosys employees.
o Questions about the scenario:
o How many books are there in the library?
o How many books can be issued to an employee?
o Does the librarian issue book to himself? etc.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 6


Logic
• A method of human thought that involves thinking in a linear, step by
step manner about how a problem can be solved
• Logic is a language for reasoning. It is a collection of rules we use when
doing reasoning.
For e.g.,
John’s mother has four children…
First child is April…
Second child is May…
Third child is June…
What is the name of fourth child?
31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 7
Importance of logic in problem solving
• Solution for any problem (e.g., summation of two numbers) requires
three things.
Input: Input values(e.g., 3 and 2)
Process: Process of summation
Output: Output after process (e.g., sum of numbers, 5)

• The process part (e.g., summation) of the solution requires logic (How to
sum) or in other words based on the logic, process is developed.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 8


Importance of logic in problem solving
• For solving a problem, there may be multiple valid logics, some may be
simple and some may be complex.

e.g., To determine whether the number is prime or not.

Logic 1- divide the number by all the numbers starting from 2 to one less
than the number and if for all the division operations, the reminder is non
zero, the number is prime. Else the number is not prime.
Logic 2 – same as logic 1 but divide the number from 2 to number/2
Logic 3 - same as logic 1 but divide the number from 2 to square root of
the number

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 9


Types of problems

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 10


Computational Problems
• Definition: Computation is a process of evolution from one state to
another in accordance with some rules.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 11


Broad applications of Computational Problem

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 12


Classification of computational problems

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 13


Computer Organization

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 14


Central Processing Unit
➢Data and instructions are processed in CPU

➢ Consists of two functional units


▪ Control Unit (CU)
▪ Arithmetic and Logic Unit (ALU)

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 15


Arithmetic and Logical unit
▪ Performs arithmetic and logical operations:
Example:
• Arithmetic (+, -, *, / etc..) and
• Logical (AND, OR, NOT, <, = etc..) operations

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 16


Control unit
• Controls the order in which your program instructions are executed.
• Functions of CU:
▪ Fetches data and instructions to main memory
▪ Interprets these instructions
▪ Controls the transfer of data and instructions to and from main memory
▪ Controls input and output devices.
▪ Overall supervision of computer system

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 17


Memory unit
➢Storage device where the data and instructions fed by the user are stored

➢An ordered sequence of storage cells, each capable of holding a piece of information

➢Each cell has its own unique address

➢The information held can be input data, computed values, or your program

instructions.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 18


Memory unit
➢The computer memory is measured in terms of bits, bytes and words.

➢A bit is a binary digit either 0 or 1.

➢A byte is unit of memory and is defined as sequence of 8 bits.

➢The word can be defined as a sequence of 16/32/64 bits or 2/4/8 bytes


respectively depending on the machine architecture

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 19


Computer memory classifications
• Main memory-Primary storage
• Secondary memory-Auxiliary storage
• Cache memory

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 20


Main memory
➢Memory where the data and instructions, currently being executed are
stored
➢ Located outside CPU
➢ High speed
➢ Data and instructions stored get erased when the power goes off
➢Also referred as primary / temporary memory
➢ Semiconductor memory
➢ Measured in terms of megabytes and gigabytes

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 21


Primary storage: RAM & ROM
• RAM stands for Random Access Memory
➢ Read and write memory
➢ Information typed by the user are stored in this memory
➢ Any memory location can be accessed directly without scanning it sequentially
(random access memory)
➢ During power failure the information stored in it will be erased → volatile
memory
• ROM stands for Read Only Memory
➢Permanent memory and non volatile
➢Contents in locations in ROM can not be changed
➢Stores mainly stored program and basic input output system programs

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 22


Secondary memory

➢Main memory is volatile and limited


➢ Hence it is essential for other types of storage devices where programs and data
can be stored when they are no longer being processed

➢Installed within the computer at the factory or added later as needed

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 23


Secondary memory
➢Non-volatile memory

➢Made up of magnetic material

➢Stores large amount of information for long time

➢Low speed

➢Holds programs not currently being executed

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 24


Cache memory
➢ High speed memory placed between CPU and main memory
➢ Stores data and instructions currently to be executed
➢ More costlier but less capacity than main memory
➢ Users can not access this memory

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 25


Operating System
➢OS is an integrated collection of programs which make the computer
operational and help in executing user programs.

➢ It acts as an interface between the man and machine.

➢ It manages the system resources like memory, processors, input-output


devices and files.

➢Windows, Linux, DOS

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 26


Application software, System software & Hardware

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 27


Computer Languages
• Machine Language- The only programming language available in earlier
days
• Consists of only 0’s and 1’s; e.g.:- 10101011
• Symbolic language or Assembly language-
• symbols or mnemonics are used to represent instructions
• hardware specific
• e.g. MASM : ADD X,Y; Add the contents of y to x
• High-level languages- English like language using which the programmer
can write programs to solve a problem.
• more concerned with the problem specification
• not oriented towards the details of computer
• e.g.: C, C++, C#, Fortran, BASIC, Pascal etc.

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 28


Language Translator
• Compiler : Program that translates entire high level language program
into machine language at a time. e.g.:- C, C++ compilers.

• Interpreter : Program which translates one statement of a high level


language program into machine language at a time and executes it.
e.g.:- BASIC Interpreters, Java Interpreters.

• Assembler : Program which translates an assembly language program


into machine language.
e.g.:- TASM (Turbo ASseMbler), MASM (Macro ASseMbler).

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 29


Typical C program development environment

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 30


Typical C program development environment
➢C programs typically go through six phases to be executed. These are:
edit, preprocess, compile, link, load and execute
➢ Phase 1 : creating a program
➢Phases 2 and 3: Preprocessing and Compiling a C Program
➢Phase 4: Linking
➢Phase 5: Loading
➢Phase 6: Execution

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 31


Summary
✓Problem solving
✓Logic and its importance in problem solving
✓Computational problems and its classifications
✓Computer organization and operating system
✓Different computer languages
✓Typical C program development environment

31-01-2024 CSE 1071 Problem Solving using Computers (PSUC) - 2022 32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy