SlideShare a Scribd company logo
1 of 39
UNIT - I
INTRODUCTION
CONTENTS
 Generation and Classification of Computers
 Basic Organization of a Computer
 Number System
 Binary – Decimal – Conversion – Problems
 Need for logical analysis and thinking
 Algorithm
 Pseudo code
 Flow Chart
LEARNING OBJECTIVES
 To learn about the origin of the computer system
 To enable the student to learn the major components of a computer system
 To know about different conversions in number system
 To know the correct and efficient ways of solving problems
LEARNING OUTCOMES
 Knows about the basics of computers
 Solve the problems related to number systems( Conversions)
 Able to think logically and write own Algorithm and Pseudocode for the given problem
 Able to draw own Flowchart for the given problem
Generations of Computer
 Evolution of computer to the current state
 Five generations
 Categorized on the basis of
Technology used by them (hardware and software)
Computing characteristics (speed - number of
instructions executed per second)
Physical appearance
Their applications
Generations of Computer
First
• 1940-56
• Vacuum
Tubes
Second
• 1956-63
• Transistors
Third
• 1964-71
• Integrated
Circuits
Fourth
• 1971-
Present
• Microproce
ssors
Fifth
• Present and
Next
• Artificial
Intelligence
First Generation: 1940-56
 Vacuum tubes, magnetic drums, punched
cards, paper tapes and printouts
 Machine language
 Computation time in milliseconds
 Enormous in size
 For scientific applications
 Examples
 UNIVersal Automatic Computer (UNIVAC)
 Electronic Numerical Integrator And
Calculator (ENIAC)
 Electronic Discrete Variable Automatic
Computer (EDVAC)
UNIVAC
Punched Card
Second Generation: 1956-1963
 Transistors, magnetic core
technology , magnetic tapes and
magnetic disks, concept of a
stored program
 Assembly language
 Computation time in
microseconds.
 Reduced size compared to first
generation computers
 Cost of commercial production
was very high
 Examples
 PDP-8
 IBM 1401
 CDC 1604
Third Generation: 1964-1971
 Integrated Circuit (IC) chips, keyboard,
Monitor
 Operating system, High-level languages
 Computation time in nanoseconds
 Quite small compared to second
generation computers
 Accessible to mass audience
 Produced commercially
 Examples
IBM 370
PDP 11
DEC PDP 11
Fourth Generation: 1971-Present
 LSI, VLSI, Microprocessor, PC, Semiconductor
Memory, Linking of computers, Mouse and
Handheld Devices
 GUI, OS like MS-DOS and MS-Windows
 High-Level Programming Languages
 Computation time in picoseconds
 Smaller than computers of previous
generation
 Widely available for commercial purposes
 PC for home user
 Examples
 Intel 4004 chip was the first
Microprocessor
 IBM, Apple’s Macintosh
Fifth Generation: Present & Next
 Using Artificial Intelligence (AI)
Expert Systems (ES), NLP,
Speech recognition, Voice
recognition, Robotics etc.
 Capable of learning and self
organization
 SLSI, large memory
 Parallel processing
• Gutenberg Printing Press (1400’s) to
Digital Press (1990’s)
• ENIAC (1940’s) to iPAD (2010)
What are the similarities and
differences in the above two
journeys?
Classification of Computers
 Categories based on
Size
Type
 Categories
Microcomputers
Minicomputers
Mainframe computers
Supercomputer
Microcomputer
 Small, low-cost, single-user digital computer.
 Include
 Desktop computer or PC: Stand-alone machine, not very expensive, for single
user.
• Manufacturers: Apple, Microsoft, HP, Dell, Lenovo, …
 Notebook or laptop: Portable , small size, costlier than desktop
 Netbook: Smaller notebooks, low weight, low cost, for web-based applications.
 Tablet computer: Input via stylus or pen, Portable
 Handheld computer or PDA: Held on top of palm, small in size, uses pen or
stylus, limited memory, less powerful.
 Smart phones: Cellular phones (function both as phone and small PC), to
access e-mail, download music, play games etc.
• Manufacturers: Blackberry, Apple, HTC, Nokia, LG, Motorola
Minicomputers
 Multi-user systems.
 High processing speed
 High storage capacity than the microcomputers.
 Support 4 to 200 users simultaneously.
 Examples
PDP 11
IBM (8000 series)
Mainframe computers
 Multi-user, multi-programming , high-performance computers.
 Very high speed, large storage capacity
 Used in centralized databases.
 Access via dumb terminal, an intelligent terminal, or PC.
 Dumb terminal: No own data storage & processing. Has I/O device
only.
 Intelligent terminal: Has the I/O device, can do processing, but, cannot
store data of its own.
 Use processing power and storage facility of mainframes
 Examples
 CDC 6600
 IBM ES000 series.
Supercomputers
 Fastest and the most expensive machines.
 High processing speed
 Speed in FLOPS (FLoating point Operations Per Second).
 Used for highly calculation-intensive tasks - weather
forecasting, climate research, molecular research, biological
research, nuclear research
 Examples
IBM Roadrunner, IBM Blue gene
Intel ASCI red.
PARAM in India
Components of Computer Hardware
CPU
Registers
Control
Unit
Arithmetic
and Logic
Unit
Input Unit Output Unit
Memory Unit
Application of Computers
Number System
 Computers normally use four number systems
 Computer understands only Binary number system
 Binary data is represented internally as octal and hexadecimal numbers for
to ease of use
 Number in a base is written as (number)base of number
 E.g. (23)10 means 23 is decimal number, (345)8 shows 345 is octal
number
Decimal Number System
 Consists of 10 digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
 All numbers represented as combination of digits
0-9. E.g. 34, 5965, 867321
Binary Number System
 Consists of two digits – 0 and 1
 All numbers formed using combination of 0 and 1.
E.g.1001, 11000011, 10110101
Octal Number System
 Consists of eight digits – 0 to 7
 All numbers represented using these eight digits.
E.g. 273, 103, 2375
Hexadecimal Number System
 Consists of sixteen digits – 0 to 9, A, B, C, D, E, F,
where (A -10, B - 11, C -12, D-13, E-14, F-15)
 All numbers represented using these sixteen digits.
E.g. 3FA, 87B, 113
Conversion of Decimal Integer
 Decimal integer converted to any other base, using
division operation
 To convert decimal integer to
Binary: divide by 2
Octal: divide by 8
Hexadecimal: divide by 16
Convert 23 from Base 10 to Base 2, 8, 16
Can you write
your age in
Hexadecimal
number?
Need for logical analysis and thinking
 Instructions in a Program have three parts
Accept Input Data that needs to be processed
Act upon Input Data and process it
Provide Output to user
 Instructions are defined in a specific sequence
 Program writing is not a straightforward task
Follows Program Development Life Cycle
Program Development Lifecycle
Algorithm
 Ordered sequence of finite, well defined,
unambiguous instructions for completing a task.
 English-like representation of logic to solve problem
 Step-by-step procedure for solving problem
 For a particular task, different algorithms can be
written
Select an algorithm based on advantages and
disadvantages
Different Algorithms would typically lead to trade off
between memory requirements and execution speed
Algorithm: An Example
Control Structures
 Specifies statements to be executed and order of
execution of statements
 Execution of a statement based on a decision
 Repetitively execute statements unless
condition met
 Used by Flowchart, Pseudo code
 Three kinds
 Sequential: Instructions executed in linear order
 Selection (branch or conditional): Asks
true/false question and selects next instruction
based on answer
 Iterative (loop): Repeats execution of block of
instructions
Can you give an
example for
each kind of
control
structure?
Flowchart
 Diagrammatic representation of logic for solving task
 Drawn using boxes of different shapes with lines
connecting them to show the flow of control
 Make logic of program clearer in a visual form
 Diagrammatic representation forms a common medium
of communication
 Drawn using different kinds of symbols.
Flowchart symbols
Preparing a Flowchart
 Common symbols that are used to draw a flowchart
Process, Decision, Data, Terminator, Connector and
Flow lines
 Rules
Should have Start and End
Direction of flow must be from top to bottom and left to
right
Relevant symbols must be used while drawing a
flowchart
Sequence, selection, iterative structures may be used
wherever required
Control Structures in Flowchart
Preparing a Flowchart (contd..)
 Sequence: Steps executed in linear order
 Selection: Step to be executed next is based on
decision taken. Different path followed for True and
False
 Iterative: Condition is checked. Either next step in
sequence is executed or control goes back to one of
the already executed steps to make a loop
 Limitations
May run into multiple pages, difficult to understand
Updating with changing requirements
Examples of Flowchart
Product of
two numbers
Maximum of
three numbers
Sum of first
100 integers
Can you
draw a
flowchart to
read 100
numbers
and print
the largest
number?
Pseudo code
 Consists of short, readable and formally-styled English
language used for explaining an algorithm.
 Does not include details like variable declarations,
subroutines etc.
 Short-hand way of describing computer program
 Not based on any programming language
 Uses structured constructs of programming language but
is not machine readable
 Cannot be compiled or executed
 No standard for syntax of pseudo code exists
 Easily translated into a programming language
Preparing Pseudo code
 Written using structured English
 Commonly used terms to represent actions
 Inputting data: INPUT, GET, READ
 Outputting data: OUTPUT, PRINT, DISPLAY
 Calculations: COMPUTE, CALCULATE
 Incrementing: INCREMENT
 Control structures
 Sequence structure: sequence of steps executed in
linear order
 Selection constructs: if-statement, case statement
 Iterative statements: WHILE, DO-WHILE
Control structures for Pseudo code
IF (condition) THEN
Statement(s) 1
ELSE
Statement(s) 2
ENDIFStep 1
Step 2
Step 3
:
:
:
WHILE (condition)
Statement 1
Statement 2
:
:
END
DO
Statement 1
Statement 2
:
:
WHILE (condition)
CASE expression of
Condition-1 : statement1
Condition-2 : statement2
:
Condition-N : statement N
OTHERS: default statement(s)
IF (condition) THEN
Statement(s) 1
ENDIF
Sequence Selection Iteration
Algorithm, Flowchart, Pseudo code
 Algorithm: A sequence of instructions used to solve
a particular problem
 Flowchart and Pseudo code: Tools to document and
represent algorithm
Flowchart : Graphical representation of algorithm
Pseudo code: Readable, formally styled English like
language representation of algorithm
 No knowledge of programming language required to
write or understand flowchart or pseudo code
Thank You

More Related Content

What's hot

Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsKM Bappi
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
عرض تعليمى عن البوابات الالكترونية Copy
عرض تعليمى عن البوابات الالكترونية   Copyعرض تعليمى عن البوابات الالكترونية   Copy
عرض تعليمى عن البوابات الالكترونية Copyfifiibrahim
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata TheoryAbdul Rehman
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigmsJohn Paul Hallasgo
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin schedulingRaghav S
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure Prof Ansari
 
Chapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technologyChapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technologyBATMUNHMUNHZAYA
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
C++ programming flowchart. home work t.hemn
C++ programming flowchart. home work t.hemnC++ programming flowchart. home work t.hemn
C++ programming flowchart. home work t.hemnAram SE
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer ArchitectureMaruf Abdullah (Rion)
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesFellowBuddy.com
 
Logical programming languages and functional programming languages
Logical programming languages and functional programming languagesLogical programming languages and functional programming languages
Logical programming languages and functional programming languagesnahianzarif
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 

What's hot (20)

Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
 
I.C.T notes
I.C.T notesI.C.T notes
I.C.T notes
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
operating system lecture notes
operating system lecture notesoperating system lecture notes
operating system lecture notes
 
عرض تعليمى عن البوابات الالكترونية Copy
عرض تعليمى عن البوابات الالكترونية   Copyعرض تعليمى عن البوابات الالكترونية   Copy
عرض تعليمى عن البوابات الالكترونية Copy
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata Theory
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigms
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure
 
Chapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technologyChapter 1 computer abstractions and technology
Chapter 1 computer abstractions and technology
 
String operation
String operationString operation
String operation
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
C++ programming flowchart. home work t.hemn
C++ programming flowchart. home work t.hemnC++ programming flowchart. home work t.hemn
C++ programming flowchart. home work t.hemn
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer Architecture
 
Design & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture NotesDesign & Analysis of Algorithms Lecture Notes
Design & Analysis of Algorithms Lecture Notes
 
Logical programming languages and functional programming languages
Logical programming languages and functional programming languagesLogical programming languages and functional programming languages
Logical programming languages and functional programming languages
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh map
 

Similar to Computer Programming_Unit 1

Computer capsule ibps_po_2014
Computer capsule ibps_po_2014Computer capsule ibps_po_2014
Computer capsule ibps_po_2014Lucky Saini
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdfSaralaT3
 
number system understand
number system  understandnumber system  understand
number system understandrickypatel151
 
CPP_Ch_1_Introduction.ppt
CPP_Ch_1_Introduction.pptCPP_Ch_1_Introduction.ppt
CPP_Ch_1_Introduction.pptissackmohamed3
 
The Deal
The DealThe Deal
The Dealadhaval
 
Lecturer1 introduction to computer architecture (ca)
Lecturer1   introduction to computer architecture (ca)Lecturer1   introduction to computer architecture (ca)
Lecturer1 introduction to computer architecture (ca)ADEOLA ADISA
 
Introduction to Computer.pdf
Introduction to Computer.pdfIntroduction to Computer.pdf
Introduction to Computer.pdfPinkiNayak1
 
Chapter 1 Computer Fundamentals (XI) (1).pptx
Chapter 1 Computer  Fundamentals (XI) (1).pptxChapter 1 Computer  Fundamentals (XI) (1).pptx
Chapter 1 Computer Fundamentals (XI) (1).pptxmehrajdin18
 
Computer Fundamental
Computer FundamentalComputer Fundamental
Computer FundamentalShradha Kabra
 
Computer Fundamentals lecture 1 Basic components of computer system.pptx
Computer Fundamentals lecture 1 Basic components of computer system.pptxComputer Fundamentals lecture 1 Basic components of computer system.pptx
Computer Fundamentals lecture 1 Basic components of computer system.pptxdbmscse61
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computersuganya2411
 

Similar to Computer Programming_Unit 1 (20)

Computer capsule ibps_po_2014
Computer capsule ibps_po_2014Computer capsule ibps_po_2014
Computer capsule ibps_po_2014
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
number system understand
number system  understandnumber system  understand
number system understand
 
C with lab
C with labC with lab
C with lab
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
 
CPP_Ch_1_Introduction.ppt
CPP_Ch_1_Introduction.pptCPP_Ch_1_Introduction.ppt
CPP_Ch_1_Introduction.ppt
 
Lecture
LectureLecture
Lecture
 
Lecture-It104
Lecture-It104Lecture-It104
Lecture-It104
 
Lecture
LectureLecture
Lecture
 
IT Lecture
IT LectureIT Lecture
IT Lecture
 
It
ItIt
It
 
The Deal
The DealThe Deal
The Deal
 
Chapter01
Chapter01Chapter01
Chapter01
 
Lecturer1 introduction to computer architecture (ca)
Lecturer1   introduction to computer architecture (ca)Lecturer1   introduction to computer architecture (ca)
Lecturer1 introduction to computer architecture (ca)
 
Introduction to Computer.pdf
Introduction to Computer.pdfIntroduction to Computer.pdf
Introduction to Computer.pdf
 
Chapter 1 Computer Fundamentals (XI) (1).pptx
Chapter 1 Computer  Fundamentals (XI) (1).pptxChapter 1 Computer  Fundamentals (XI) (1).pptx
Chapter 1 Computer Fundamentals (XI) (1).pptx
 
Computer Fundamental
Computer FundamentalComputer Fundamental
Computer Fundamental
 
Computer Fundamentals lecture 1 Basic components of computer system.pptx
Computer Fundamentals lecture 1 Basic components of computer system.pptxComputer Fundamentals lecture 1 Basic components of computer system.pptx
Computer Fundamentals lecture 1 Basic components of computer system.pptx
 
Ntroduction to computer architecture and organization
Ntroduction to computer architecture and organizationNtroduction to computer architecture and organization
Ntroduction to computer architecture and organization
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 

Computer Programming_Unit 1

  • 2. CONTENTS  Generation and Classification of Computers  Basic Organization of a Computer  Number System  Binary – Decimal – Conversion – Problems  Need for logical analysis and thinking  Algorithm  Pseudo code  Flow Chart LEARNING OBJECTIVES  To learn about the origin of the computer system  To enable the student to learn the major components of a computer system  To know about different conversions in number system  To know the correct and efficient ways of solving problems LEARNING OUTCOMES  Knows about the basics of computers  Solve the problems related to number systems( Conversions)  Able to think logically and write own Algorithm and Pseudocode for the given problem  Able to draw own Flowchart for the given problem
  • 3. Generations of Computer  Evolution of computer to the current state  Five generations  Categorized on the basis of Technology used by them (hardware and software) Computing characteristics (speed - number of instructions executed per second) Physical appearance Their applications
  • 4. Generations of Computer First • 1940-56 • Vacuum Tubes Second • 1956-63 • Transistors Third • 1964-71 • Integrated Circuits Fourth • 1971- Present • Microproce ssors Fifth • Present and Next • Artificial Intelligence
  • 5. First Generation: 1940-56  Vacuum tubes, magnetic drums, punched cards, paper tapes and printouts  Machine language  Computation time in milliseconds  Enormous in size  For scientific applications  Examples  UNIVersal Automatic Computer (UNIVAC)  Electronic Numerical Integrator And Calculator (ENIAC)  Electronic Discrete Variable Automatic Computer (EDVAC) UNIVAC Punched Card
  • 6. Second Generation: 1956-1963  Transistors, magnetic core technology , magnetic tapes and magnetic disks, concept of a stored program  Assembly language  Computation time in microseconds.  Reduced size compared to first generation computers  Cost of commercial production was very high  Examples  PDP-8  IBM 1401  CDC 1604
  • 7. Third Generation: 1964-1971  Integrated Circuit (IC) chips, keyboard, Monitor  Operating system, High-level languages  Computation time in nanoseconds  Quite small compared to second generation computers  Accessible to mass audience  Produced commercially  Examples IBM 370 PDP 11 DEC PDP 11
  • 8. Fourth Generation: 1971-Present  LSI, VLSI, Microprocessor, PC, Semiconductor Memory, Linking of computers, Mouse and Handheld Devices  GUI, OS like MS-DOS and MS-Windows  High-Level Programming Languages  Computation time in picoseconds  Smaller than computers of previous generation  Widely available for commercial purposes  PC for home user  Examples  Intel 4004 chip was the first Microprocessor  IBM, Apple’s Macintosh
  • 9. Fifth Generation: Present & Next  Using Artificial Intelligence (AI) Expert Systems (ES), NLP, Speech recognition, Voice recognition, Robotics etc.  Capable of learning and self organization  SLSI, large memory  Parallel processing • Gutenberg Printing Press (1400’s) to Digital Press (1990’s) • ENIAC (1940’s) to iPAD (2010) What are the similarities and differences in the above two journeys?
  • 10. Classification of Computers  Categories based on Size Type  Categories Microcomputers Minicomputers Mainframe computers Supercomputer
  • 11. Microcomputer  Small, low-cost, single-user digital computer.  Include  Desktop computer or PC: Stand-alone machine, not very expensive, for single user. • Manufacturers: Apple, Microsoft, HP, Dell, Lenovo, …  Notebook or laptop: Portable , small size, costlier than desktop  Netbook: Smaller notebooks, low weight, low cost, for web-based applications.  Tablet computer: Input via stylus or pen, Portable  Handheld computer or PDA: Held on top of palm, small in size, uses pen or stylus, limited memory, less powerful.  Smart phones: Cellular phones (function both as phone and small PC), to access e-mail, download music, play games etc. • Manufacturers: Blackberry, Apple, HTC, Nokia, LG, Motorola
  • 12. Minicomputers  Multi-user systems.  High processing speed  High storage capacity than the microcomputers.  Support 4 to 200 users simultaneously.  Examples PDP 11 IBM (8000 series)
  • 13. Mainframe computers  Multi-user, multi-programming , high-performance computers.  Very high speed, large storage capacity  Used in centralized databases.  Access via dumb terminal, an intelligent terminal, or PC.  Dumb terminal: No own data storage & processing. Has I/O device only.  Intelligent terminal: Has the I/O device, can do processing, but, cannot store data of its own.  Use processing power and storage facility of mainframes  Examples  CDC 6600  IBM ES000 series.
  • 14. Supercomputers  Fastest and the most expensive machines.  High processing speed  Speed in FLOPS (FLoating point Operations Per Second).  Used for highly calculation-intensive tasks - weather forecasting, climate research, molecular research, biological research, nuclear research  Examples IBM Roadrunner, IBM Blue gene Intel ASCI red. PARAM in India
  • 15. Components of Computer Hardware CPU Registers Control Unit Arithmetic and Logic Unit Input Unit Output Unit Memory Unit
  • 17. Number System  Computers normally use four number systems  Computer understands only Binary number system  Binary data is represented internally as octal and hexadecimal numbers for to ease of use  Number in a base is written as (number)base of number  E.g. (23)10 means 23 is decimal number, (345)8 shows 345 is octal number
  • 18. Decimal Number System  Consists of 10 digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9  All numbers represented as combination of digits 0-9. E.g. 34, 5965, 867321
  • 19. Binary Number System  Consists of two digits – 0 and 1  All numbers formed using combination of 0 and 1. E.g.1001, 11000011, 10110101
  • 20. Octal Number System  Consists of eight digits – 0 to 7  All numbers represented using these eight digits. E.g. 273, 103, 2375
  • 21. Hexadecimal Number System  Consists of sixteen digits – 0 to 9, A, B, C, D, E, F, where (A -10, B - 11, C -12, D-13, E-14, F-15)  All numbers represented using these sixteen digits. E.g. 3FA, 87B, 113
  • 22. Conversion of Decimal Integer  Decimal integer converted to any other base, using division operation  To convert decimal integer to Binary: divide by 2 Octal: divide by 8 Hexadecimal: divide by 16
  • 23. Convert 23 from Base 10 to Base 2, 8, 16 Can you write your age in Hexadecimal number?
  • 24. Need for logical analysis and thinking  Instructions in a Program have three parts Accept Input Data that needs to be processed Act upon Input Data and process it Provide Output to user  Instructions are defined in a specific sequence  Program writing is not a straightforward task Follows Program Development Life Cycle
  • 26. Algorithm  Ordered sequence of finite, well defined, unambiguous instructions for completing a task.  English-like representation of logic to solve problem  Step-by-step procedure for solving problem  For a particular task, different algorithms can be written Select an algorithm based on advantages and disadvantages Different Algorithms would typically lead to trade off between memory requirements and execution speed
  • 28. Control Structures  Specifies statements to be executed and order of execution of statements  Execution of a statement based on a decision  Repetitively execute statements unless condition met  Used by Flowchart, Pseudo code  Three kinds  Sequential: Instructions executed in linear order  Selection (branch or conditional): Asks true/false question and selects next instruction based on answer  Iterative (loop): Repeats execution of block of instructions Can you give an example for each kind of control structure?
  • 29. Flowchart  Diagrammatic representation of logic for solving task  Drawn using boxes of different shapes with lines connecting them to show the flow of control  Make logic of program clearer in a visual form  Diagrammatic representation forms a common medium of communication  Drawn using different kinds of symbols.
  • 31. Preparing a Flowchart  Common symbols that are used to draw a flowchart Process, Decision, Data, Terminator, Connector and Flow lines  Rules Should have Start and End Direction of flow must be from top to bottom and left to right Relevant symbols must be used while drawing a flowchart Sequence, selection, iterative structures may be used wherever required
  • 33. Preparing a Flowchart (contd..)  Sequence: Steps executed in linear order  Selection: Step to be executed next is based on decision taken. Different path followed for True and False  Iterative: Condition is checked. Either next step in sequence is executed or control goes back to one of the already executed steps to make a loop  Limitations May run into multiple pages, difficult to understand Updating with changing requirements
  • 34. Examples of Flowchart Product of two numbers Maximum of three numbers Sum of first 100 integers Can you draw a flowchart to read 100 numbers and print the largest number?
  • 35. Pseudo code  Consists of short, readable and formally-styled English language used for explaining an algorithm.  Does not include details like variable declarations, subroutines etc.  Short-hand way of describing computer program  Not based on any programming language  Uses structured constructs of programming language but is not machine readable  Cannot be compiled or executed  No standard for syntax of pseudo code exists  Easily translated into a programming language
  • 36. Preparing Pseudo code  Written using structured English  Commonly used terms to represent actions  Inputting data: INPUT, GET, READ  Outputting data: OUTPUT, PRINT, DISPLAY  Calculations: COMPUTE, CALCULATE  Incrementing: INCREMENT  Control structures  Sequence structure: sequence of steps executed in linear order  Selection constructs: if-statement, case statement  Iterative statements: WHILE, DO-WHILE
  • 37. Control structures for Pseudo code IF (condition) THEN Statement(s) 1 ELSE Statement(s) 2 ENDIFStep 1 Step 2 Step 3 : : : WHILE (condition) Statement 1 Statement 2 : : END DO Statement 1 Statement 2 : : WHILE (condition) CASE expression of Condition-1 : statement1 Condition-2 : statement2 : Condition-N : statement N OTHERS: default statement(s) IF (condition) THEN Statement(s) 1 ENDIF Sequence Selection Iteration
  • 38. Algorithm, Flowchart, Pseudo code  Algorithm: A sequence of instructions used to solve a particular problem  Flowchart and Pseudo code: Tools to document and represent algorithm Flowchart : Graphical representation of algorithm Pseudo code: Readable, formally styled English like language representation of algorithm  No knowledge of programming language required to write or understand flowchart or pseudo code