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.

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

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.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Problem Solving and Program Design. COMP104 Problem Solving / Slide 2 Our First Program // a simple program #include using namespace std; int main() {
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
Introduction to Computer Systems
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.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
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.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction COMP104: Fundamentals and Methodology.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Intro to Computers Computer Apps 1.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Computer Architecture
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 05, 2005 Lecture Number: 4.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
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)
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming Dr. Halla Abdel Hameed.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Computer Software.
By Kundang K Juman Hardware & Software. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Chapter 1: Introduction to Computers and Programming
Topic 2: Hardware and Software
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
Chapter 1: Introduction to computers and C++ Programming
Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development.
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Computer Engineering 1nd Semester
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.
Programming COMP104: Fundamentals and Methodology Introduction.
Chapter 1: Introduction to Computers and Programming
Computer Science I CSC 135.
Computer Electronic device Accepts data - input
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
Computer Electronic device Accepts data - input
Programs written in C and C++ can run on many different computers
Computer Terms Review from what language did C++ originate?
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

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 (software) class? n software “drives” hardware n having some understanding on h/w helps us produce more efficient programs

COMP104 Lecture 2 / Slide 3 l Four components of a computer system: n CPU - central processing unit –Makes decisions, performs computations, and delegates input/output requests n Memory –Stores information n Input devices –Gets information from the user to the computer n Output devices –Sends information from computer to the user Hardware

COMP104 Lecture 2 / Slide 4 Hardware Primary and Secondary

COMP104 Lecture 2 / Slide 5 CPU l Core component of the computer n Arithmetic/Logical Unit (ALU) –performs arithmetic operations n Control Unit –decodes and executes instructions Data and instructions are encoded in the binary number system l CPU Examples n Pentium n Pentium Pro

COMP104 Lecture 2 / Slide 6 Input and Output Devices l Accessories that allow computer to interface with user l Common input and output devices SpeakersMouse Scanner PrinterJoystickCD-ROM KeyboardMicrophone

COMP104 Lecture 2 / Slide 7 Memory l Secondary Memory n relatively stable storage (e.g. CD) n slower retrieval time n often allows sequential access only l Primary Memory n main memory in a computer n aka random access memory, or RAM n faster (random) access with –transistor technology –address location

COMP104 Lecture 2 / Slide 8 Memory double distance; double time; double speed; speed = 27.3; time = 4.8; distance = speed * time; <- distance <- time <- speed RAM in computer Program

COMP104 Lecture 2 / Slide 9 What is so “Random”? char grade[] = { ‘B’,’D’,’C’, ’E’,’D’,’A’}; char student_grade; student_grade = grade[3]; <- grade[0]B D C E D A 1024<- student_gradeE + RAM in computer program

COMP104 Lecture 2 / Slide 10 l Application software n Programs designed to perform specific tasks and are easy to use l System software n Programs that support the execution and development of other programs n Two major types –Operating systems –Translation systems (compilers & linkers) Software

COMP104 Lecture 2 / Slide 11 Application Software l Application software has made using computers easy and popular l Common application software: Microsoft Word, WordPerfect PowerPoint Netscape, IE PhotoShop, Photo-Paint Quick Time

COMP104 Lecture 2 / Slide 12 l Controls and manages the computing resources l Examples n MSDOS, Windows, Unix l Important services that an operating system provides: n File system n Memory management n Commands to manipulate the file system n Input and output on a variety of devices n Window management Operating System

COMP104 Lecture 2 / Slide 13 Translation System l Set of programs used to develop software l Types of translators: Compiler Linker l Examples n Microsoft Visual C++, Borland C++, g++

COMP104 Lecture 2 / Slide 14 Software Development l Major activities Editing (to write the program) Compiling (creates.obj file) Linking with compiled files (creates.exe file) –Object files –Library modules Loading and executing Testing the program

COMP104 Lecture 2 / Slide 15 Integrated Development Environments l Combine all of the capabilities that a programmer would want while developing software (VC++) Editor Compiler Linker Loader Debugger Viewer

COMP104 Lecture 2 / Slide 16 Our First Program // a simple program #include use namespace std; int main() { cout << "Hello world!" << endl; return 0; } Preprocessor statements Print statement Ends execution of main() which ends program Comments Function Function named main() indicates start of program

COMP104 Lecture 2 / Slide 17 Summary