Basics Machine, software, and program design JPC and JWD © 2002 McGraw-Hill, Inc.

Slides:



Advertisements
Similar presentations
4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
Advertisements

Lecture 1: Overview of Computers & Programming
Fundamentals and a Brief History of Computer Systems.
Hardware Programming. COMP102 Prog. Fundamentals I: Hardware / Slide 2 l Four components of a computer system: n CPU - central processing unit –Makes.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
J. P. Cohoon and J. W. Davidson © 1999 McGraw-Hill, Inc. Introduction to Programming and Object-Oriented Design Basics of machine, software, and program.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Chapter 1: An Overview of Computers and Programming Languages
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Computer Software.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
What is a Computer?  A computer is a device capable of performing computations and making logical decisions. It is a device for solving problems.  Some.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction to Computers, Problem Solving, and Programming Chapter 1.
Chapter 1 An Overview of Computers and Programming Languages.
Computer Organization
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Topics Introduction Hardware and Software How Computers Store Data
Basics Hardware and Number Representation Adapted by S. Sudarshan from slides provided by: JPC and JWD © 2002 McGraw-Hill, Inc.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction to Computer Science.
4 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
1 COMS 261 Computer Science I Title: Computer Organization Date: September 1, 2005 Lecture Number: 2.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Introduction to Computers, Problem Solving, and Programming Chapter 1.
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computer Architecture
Liang, Introduction to C++ Programming, (c) Chapter 1 Introduction to Computers, Programs, and C++
Editors And Debugging Systems Other System Software Text Editors Interactive Debugging Systems UNIT 5 S.Sharmili Priyadarsini.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
ELEMENTS OF A COMPUTER SYSTEM HARDWARE SOFTWARE PEOPLEWARE DATA.
Hardware and Software Programming. COMP104 Lecture 2 / Slide 2 Hardware and Software l Why should we bother with hardware, while we are having a programming.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
Looking Inside the Computer System
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Introduction to OOP CPS235: Introduction.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Chapter 1 An Overview of Computers and Programming Languages.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
By Kundang K Juman Hardware & Software. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing.
Overview of Computer MANDAVI CLASSES PRESENTED BY.
BASIC PROGRAMMING C SCP1103 (02)
Visit for more Learning Resources
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 Introduction to Computers, Programs, and C++
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
UNIV 103 CS Majors Seminar Dr. Blaise W. Liffick Fall 2017.
Computer Science I CSC 135.
Hardware & Software Programming. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing unit.
National Diploma in Computer Studies
Introduction to Computer Programming
Presentation transcript:

Basics Machine, software, and program design JPC and JWD © 2002 McGraw-Hill, Inc.

Computer Organization CPU - central processing unit Memory Input devices Output devices CPU - central processing unit Where decisions are made, computations are performed, and input/output requests are delegated Memory Stores information being processed by the CPU Input devices Allows people to supply information to computers Output devices Allows people to receive information from computers

Computer Organization

CPU Brains of the computer Arithmetic calculations are performed using the Arithmetic/Logical Unit or ALU Control unit decodes and executes instructions Arithmetic operations are performed using binary number system

Control Unit The fetch/execute cycle is the steps the CPU takes to execute an instruction Performing the action specified by an instruction is known as executing the instruction The program counter (PC) holds the memory address of the next instruction

Input and Output Devices Accessories that allow computer to perform specific tasks Receive information for processing Return the results of processing Store information Accessories that allow computer to perform specific tasks Receive information for processing Return the results of processing Store information Common input and output devices SpeakersMouse Scanner PrinterJoystickCD-ROM KeyboardMicrophoneDVD Accessories that allow computer to perform specific tasks Receive information for processing Return the results of processing Store information Common input and output devices SpeakersMouse Scanner PrinterJoystickCD-ROM KeyboardMicrophoneDVD Some devices are capable of both input and output Floppy driveHard driveMagnetic tape units

Monitor Display device that operates like a television Also known as CRT (cathode ray tube) Controlled by an output device called a graphics card Displayable area Measured in dots per inch, dots are often referred to as pixels (short for picture element) Standard resolution is 640 by 480 Many cards support resolution of 1280 by 1024 or better Number of colors supported varies from 16 to billions

Application software Programs designed to perform specific tasks that are transparent to the user System software Programs that support the execution and development of other programs Two major types  Operating systems  Translation systems Software

Application Software Application software is the software that has made using computers indispensable and popular Common application software Word processors Desktop publishing programs Spreadsheets Presentation managers Drawing programs Application software is the software that has made using computers indispensable and popular Common application software Word processors Desktop publishing programs Spreadsheets Presentation managers Drawing programs Learning how to develop application software is our focus

Examples Windows ®, UNIX ®, Mac OS X ® Controls and manages the computing resources Important services that an operating system provides File system  Directories, folders, files Commands that allow for manipulation of the file system  Sort, delete, copy Ability to perform input and output on a variety of devices Management of the running systems Operating System

Translation System Set of programs used to develop software A key component of a translation system is a translator Some types of translators Compiler  Converts from one language to another Linker  Combines resources Examples Microsoft Visual C++ ®, CBuilder ®, g++, Code Warrior ®  Performs compilation, linking, and other activities.

Software Development Activities Editing Compiling Linking with precompiled files Object files Library modules Loading and executing Viewing the behavior of the program

Software Development Cycle

IDEs Integrated Development Environments or IDEs Supports the entire software development cycle  E.g., MS Visual C++, Borland, Code Warrior Provides all the capabilities for developing software Editor Compiler Linker Loader Debugger Viewer

Engineering Software Software engineering Area of computer science concerned with building large software systems Challenge Tremendous advances in hardware have not been accompanied by comparable advances in software

Complexity Trade-off System complexity tends to grow as the system becomes more user friendly

Software Engineering Goals Reliability Understandability Cost Effectiveness Adaptability Reusability Reliability An unreliable life-critical system can be fatal Understandability Future development is difficult if software is hard to understand Cost Effectiveness Cost to develop and maintain should not exceed profit Adaptability System that is adaptive is easier to alter and expand Reusability Improves reliability, maintainability, and profitability

Abstraction Extract the relevant properties while ignoring inessentials Encapsulation Hide and protect essential information through a controlled interface Modularity Hierarchy Abstraction Extract the relevant properties while ignoring inessentials Encapsulation Hide and protect essential information through a controlled interface Modularity Dividing an object into smaller modules so that it is easier to understand and manipulate Hierarchy Abstraction Extract the relevant properties while ignoring inessentials Encapsulation Hide and protect essential information through a controlled interface Modularity Dividing an object into smaller modules so that it is easier to understand and manipulate Hierarchy Ranking or ordering of objects based on some relationship between them Software Engineering Principles Abstraction Encapsulation Modularity Hierarchy Abstraction Extract the relevant properties while ignoring inessentials Encapsulation Modularity Hierarchy

Extract the relevant object properties while ignoring inessentials Defines a view of the object Example - car Car dealer views a car from selling features standpoint  Price, length of warranty, color, … Mechanic views a car from systems maintenance standpoint  Size of the oil filter, type of spark plugs, … Abstraction

Encapsulation Steps Decompose an object into parts Hide and protect essential information Supply interface that allows information to be modified in a controlled and useful manner Internal representation can be changed without affecting other system parts Example - car radio Interface consists of controls and power and antenna connectors  The details of how it works is hidden To install and use a radio  Do not need to know anything about the radio’s electronics

Modularity Dividing an object into smaller pieces or modules so that the object is easier to understand and manipulate Most complex systems are modular Example - Automobile can be decomposed into subsystems Cooling system  Radiator ThermostatWater pump Ignition system  Battery StarterSpark plugs

Hierarchy Ranking or ordering of objects based on some relationship between them Help us understand complex systems Example - a company hierarchy helps employees understand the company and their positions within it For complex systems, a useful way of ordering similar abstractions is a taxonomy from least general to most general

Northern Timber Wolf Taxonomy Kingdom Animalia Phylum Chordata Class Mammalia Order Carnivora Family Caninae Genus Canis Species Canis lupus Subspecies Canis lupus occidentalis Northern Timber Wolf

OO Design and Programming Object-oriented design and programming methodology supports good software engineering Promotes thinking in a way that models the way we think and interact with the real world Example - watching television The remote is a physical object with properties  Weight, size, can send message to the television The television is also a physical object with various properties

Objects An object is almost anything with the following characteristics Name Properties The ability to act upon receiving a message  Basic message types Directive to perform an action Request to change one of its properties

The individual digits of a binary number are referred to as bits Each bit represents a power of two = = = = 2 Binary Arithmetic Binary addition Equivalent decimal addition

Binary Arithmetic 5 × 3 15 Equivalent decimal multiplication 0101 × Binary multiplication

Two’s Complement Representation for signed binary numbers Leading bit is a sign bit Binary number with leading 0 is positive Binary number with leading 1 is negative Magnitude of positive numbers is just the binary representation Magnitude of negative numbers is found by Complement the bits Replace all the 1's with 0's, and all the 0's with 1's Add one to the complemented number The carry in the most significant bit position is thrown away when performing arithmetic

Two’s Complement Performing two's complement on the decimal 7 to get -7 Using a five-bit representation 7 = Convert to binary Complement the bits Add 1 to the complement Result is -7 in two's complement

Two's Complement Arithmetic Computing using a two's complement representation with five-bit numbers = 8 + (-7) = Two's complement of Two's complement of Add 8 and Is the five-bit result Throw away the high-order carry as we are using a five bit representation