Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved.

Slides:



Advertisements
Similar presentations
Hardware Lesson 3 Inside your computer.
Advertisements

An Overview of the Computer System
Parts of a Computer.
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
An Overview of the Computer System
Intermediate GNVQ ICT Computer Systems Hardware is the name that is given to any part of a computer that you can actually touch. An individual piece of.
Why do we need to learn about computers? Hardware & Software Windows95 Desktop - GUI? Mice? Internet Explorer & Netscape Microsoft Applications: –Excel.
Introduction Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved. 1 Introduction.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Introduction to Computers
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
COMP 14 Introduction to Programming
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
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.
The Computer. COMPUTER DECIMAL TO BINARY CONVERTER BINARY TO DECIMAL CONVERTER INPUT OUTPUT MEMORY LOGIC ARITHMETIC.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Introduction to Computer Administration Introduction.
CS102 Introduction to Computer Programming
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.
WHAT IS A COMPUTER??? An electronic device that accepts: n Input n Processes the input n Stores the results of the processing n provides Output Computers.
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.
Chapter 1 – Introduction to Computer Systems & QBasic
Today’s Agenda: Computer Basics Review Hardware: The physical components of a computer, any internal or external computer part that you can touch. Software:
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.
Introduction to Computers
Introduction to Computers
Computer Basics By: Nicole Hayes. Purposes of Computers Business – Track inventory. – Calculate payroll. – Maintain databases. Personal – Surf the web.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 0: Introduction.
Computer Parts. Two Basic Parts Hardware & Software.
Intro to Computers Computer Apps 1.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
The Four Parts of a Computer. Definition of a Computer A computer is an electronic device used to process data, converting the data into information that.
Introduction to Computer Systems and the Java Programming Language.
CPSC- 120 Principle of Computer Science I Computer = Hardware + Software.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
GCSE Information Technology Computer Systems 2 Hardware is the name that is given to any part of a computer that you can actually touch. An individual.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Calculators are used to increase speed and accuracy of numerical computations The abacus has roots dating back over 5,000 years Mechanical calculators.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
1 st Semester Introduction to Computer and Programming Computer Engineering Department Kasetsart University, Bangkok, THAILAND.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
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.
The Computer System CS 103: Computers and Application Software.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake An Introduction to Programming.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
©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.
Introduction To Computer Programming – 1A Computer Parts, Words, and Definition Herriman High School.
Introduction to Computers
An Overview of the Computer System
UNDERSTANDING YOUR COMPUTER
The abacus has roots dating back over 5,000 years
Looking Inside the machine (Types of hardware, CPU, Memory)
An Overview of the Computer System
An Overview of the Computer System
Computer Electronic device Accepts data - input
Computer Hardware.
COMPUTER FUNDAMENTALS i
Computer components.
Presentation transcript:

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 1 Chapter 1 An Introduction to Computers and Programming

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 2 Computer Computer is a mechanical or electronic device that can effeciently store, retrieve, and manipulate large amounts of information at high speed and with great accuracy. Mainframe The IBM 360 are prominent in large companies and Universities. Minicomputer DEC creates the Minicomputer – about the size of a file cabinet. Supercomputer It is very powerful and specialized for massive computing problems used by corporations and government departments. Personal computer IBM PC, Apple Macintosh

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved Computer Basics Components of a computer –CPU Central Processing Unit –Internal memory RAM (Random Access Memory) –Mass storage device – Hard disk drives, floppy disk, CD, DVD –Input devices – keyboard and mouse –Output Devices – monitor and printer 1 byte -> storage for one character 1024 bytes = 1 kilobyte (KB) 1024 KB = 1 megabyte (MB) 1024 MB = 1 gigabyte (GB) (Many people will approximate to steps of 1000, not 1024)

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved Software and Programming Languages Application Software –Word Processors –Database s/w –Spreadsheets –Painting programs –Web browsers, programs System Software –Operating systems – Windows, DOS, Linux, UNIX

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 5 Programming Languages Machine Languages – Assembly Languages –ADD A,B High-level Languages –Look more like English words and algebraic expressions –Examples of High Level Languages ADA BASIC C++ COBOL Java Pascal Visual Basic

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved Programming Concepts Data and Data types Simple programming problem. Convert a price from British pounds into Dollars. Pseudocode Input the price of the item, PoundPrice, in pounds Compute the price of the item in dollars: Set DollarPrice = 1.62 * PoundPrice Write DollarPrice C++ Language cin >> PoundPrice DollarPrice = 1.62 * PoundPrice cout << DollarPrice

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 7 Data Input, Variables and Data Types Input operations get data into the programs A user is prompted for the data to be entered –Write “Enter the price in pounds” –Input PoundPrice Data is input into a program variable. A named piece of memory whose value can change during the running of the program. The variable above is PoundPrice.

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 8 Types of Data Numeric Data –Integer data, I.e., whole numbers, –Floating point data – have a decimal point Character data (alphanumerics) –All the characters you can type at the keyboard

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved Data Processing and Output Set DollarPrice = 1.62 * PoundPrice The above statement is a processing statement. Take the value in the variable PoundPrice, multiply by 1.62, and set the variable DollarPrice to the result of the multiplication. Write DollarPrice Output the value in DollarPrice to the monitor. Assignment statements change the value in a variable –Set counter = counter + 1 –Take the value of counter, add 1, and store the result back in the same variable.

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 10 Arithmetic Operations +Addition Subtraction7 – 34 *Multiplication5 * 420 /Division12 / 34 ^Exponentiation2 ^ 38 Hierarchy of Operations Inside ( ) Exponents Multiply and divide Addition and subtraction

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 11 Example of Hierarchy of Operations 3 * (6 + 2) / 12 – (7 – 5) ^ 2 * 3 = 3 * 8 / 12 – 2 ^ 2 * 3 ( ) first = 3 * 8 / 12 – 4 * 3 ^ next = 24 / 12 – 4 * 3 multiply and divide (left to right) = 2 – 12 add and subtract = -10

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 12 Data Output Send information from the program to the screen, or printer, or disk file. Write DollarPrice the value of the variable is displayed on the screen and the cursor goes to the next line Write “The price in Dollars is”, DollarPrice The output looks like this: The price in Dollars is 162 Note that the text inside the “ ” is output to the user “as is,” and it is the value in the variable that is output.

Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 13 Pseudocode Language (Ch 1) Our pseudocode language will be expanded throughout the text. In this chapter we learned how to input, output, assign values to variables, and perform arithmetic calculations. InputAssignment Input Variable Set Variable = 10 Set Variable = AnotherVariable Output Arithmetic Operations Write “literal text”( ) ^ * / + - Write Variable Write “literal text”, Variable