©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.

Slides:



Advertisements
Similar presentations
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
Advertisements

COSC 120 Computer Programming
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java: Early Objects Third Edition by Tony Gaddis Chapter.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  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,
Chapter 1: Introduction to Computers and Java
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.
CS 0008 Day 2 1. Today Hardware and Software How computers store data How a program works Operators, types, input Print function Running the debugger.
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.
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.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Introduction to Java Lecture # Java History Green Team started by Sun Microsystems. *7 Handheld controller for multiple entertainment systems.
Topics Introduction Hardware and Software How Computers Store Data
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
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 © 2012 Pearson Education, Inc. Chapter 1 Introduction to Computing 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
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
 Why?  Because it can be programmed to do more than one specific task. ◦ Accountants ~ tax forms etc. ◦ Machinists ~ control drilling, lathes etc. ◦
Chapter 1: Introduction to Computers and Java
CHAPTER 1 Introduction to Computers and Java Copyright © 2016 Pearson Education, Inc., Hoboken NJ.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java: From Control Structures through Objects Third Edition.
Computer Systems Mrs. Butera. Computer Systems Hardware Software.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Computer Programming (1) Code & No.: CS 102 CREDIT HOURS: 5 UNIT Lecture 3.0 hours/week Lab: 2.0 hour/on every week a. This course introduces the students.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Copyright © 2016 Pearson Education, Inc., Hoboken NJ 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.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Java 1-2 Chapter Topics Chapter 1 discusses the following main topics: –Introduction –Why Program? –Computer.
Chapter 1 An Overview of Computers and Programming Languages.
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,
CHAPTER 1 Introduction to Computers and Java Copyright © 2016 Pearson Education, Ltd.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming
Java Programming: From the Ground Up
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
Topics Introduction Hardware and Software How Computers Store Data
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: Introduction to Computers and Java
Chapter 1: An Overview of Computers and Programming Languages
Introduction to Computers
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Chapter Topics –Computer Systems: Hardware and Software –Programming Languages –The Complete Programming Process –Bits and Bytes –Object-Oriented Programming

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Computer hardware components are the physical pieces of the computer. The major hardware components of a computer: –The central processing unit (CPU) –Main memory –Secondary storage devices –Input and Output devices

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Central Processing Unit Instruction (input)Result (output) Arithmetic Logic Unit Control Unit CPU

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Central Processing Unit –The CPU performs the fetch, decode, execute cycle in order to process program information. Fetch The CPU’s control unit fetches, from main memory, the next instruction in the sequence of program instructions. Decode The instruction is encoded in the form of a number. The control unit decodes the instruction and generates an electronic signal. Execute The signal is routed to the appropriate component of the computer (such as the ALU, a disk drive, or some other device). The signal causes the component to perform an operation.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory known as random-access memory (RAM) RAM contains: –currently running programs –data used by those programs RAM is volatile, which means that when the computer is turned off, the contents of RAM are erased.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory RAM is divided into units called bytes. A byte consists of eight bits. Each bit holds a binary value 0 or 1. Each byte in memory is assigned a unique number known as an address.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory A section of memory is called a byte. A section of two or four bytes is often called a word. Main memory can be visualized as a column or row of cells.0x000 0x001 0x003 0x002 0x004 0x005 0x006 0x007 A byte is made up of 8 bits

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Binary (base-2) vs. Decimal (base-10) Base-2 to Base-10 conversion – = 1× × × ×2 0 = Base-10 to Base-2 conversion Base-2 table e.g. given a decimal number =

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Secondary Storage Devices Secondary storage devices are capable of storing information for longer periods of time (non-volatile). Common Secondary Storage devices: Hard drive Floppy drive CD RW drive CD ROM DVD drive Compact Flash card

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Input Devices Input is any data the computer collects from the outside world. That data comes from devices known as input devices. Common input devices: –Keyboard –Mouse –Scanner –Digital camera

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Output Devices Output is any data the computer sends to the outside world. That data is displayed on devices known as output devices. Common output devices: –Monitors –Printers Some devices such as disk drives perform input and output and are called I/O devices.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Software refers to the programs that run on a computer. There are two classifications of software: –Operating Systems –Application Software

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems An operating system (OS) has two functions: –Control/Manage the system resources CPU scheduling Memory allocation –Provide the user with a means of interaction with the computer Operating systems can be either single tasking or multi-tasking.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems A single tasking operating system is capable of running only one program at a time. –DOS A multitasking operating system is capable of running multiple programs at once. –Windows –Unix –Mac OS X

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems Operating systems can also be categorized as single user or multi-user. –A single user operating system allows only one user to operate the computer at a time. –Multi-user systems allow several users to run programs and operate the computer at once.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Single User Systems Examples: DOS Windows 95/98/ME

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Multi-User Systems Examples: Unix, Linux BSD Modern Windows Versions NT/2000/XP/Vista/7/8 OS/X

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Application Software Application software provides a more specialized type of environment for the user to work in. Common application software: –Spreadsheets –Word processors –Accounting software –Tax software –Games

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages A programming language is a special language used to write computer programs. A program is a set of instructions with rigorous syntax a computer follows in order to perform a task. An algorithm is a set of well defined steps to complete a task. –English-like pseudo code –For example, to compute gross pay Get payroll data Calculate gross pay Display gross pay

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 1GL A computer needs the algorithm to be written in machine language (also called first generation programming language). –Machine language is written using binary numbers. Each CPU has its own machine language. –Motorola series processors –Intel x86 series processors –ARM processors, etc. Example of a machine language instruction: Machine code is tedious and unfriendly to human.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 2GL Programmers developed assembly language (also called second generation programming language or low level language). Example: MOV id3, R2 MUL #60.0, R2 MOV id2, R1 ADD R2, R1 MOV R1, id1 Assembler made things easier but was also processor dependent.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 3GL High level programming languages followed that were not processor dependent. Some common programming languages: Java BASICC++ C Python COBOL JavaScript Ruby PHP C# Visual Basic Pascal

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages 4GL and 5GL –Closer to natural languages –The language environment provides visual programming tools that allow non-programmers to create software applications

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages Common Language Elements There are some concepts that are common to all programming languages. Common concepts: –Keywords –Operators –Punctuation –Programmer-defined identifiers –Strict syntactic rules