Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
ICS103 P ROGRAMMING IN C L ECTURE 1: O VERVIEW OF C OMPUTERS & P ROGRAMMING.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  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.
Topic 1: Introduction to Computers and Programming
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
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.
Systems Software Operating Systems.
Computers & Logic An Overview. Hardware Hardware is the equipment, or the devices, associated with a computer. For a computer to be useful, however, it.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
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
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.
Computer Basics. What is a Computer? “A computer is an electronic device, operating under the control of instructions stored in its own memory, than can.
COMPUTER MAIN PARTS Hardware Software. HARDWARE Definition: The set of hardware components that make up the material part (physical) of a computer, unlike.
Today’s Agenda: Computer Basics Review Hardware: The physical components of a computer, any internal or external computer part that you can touch. Software:
Slide 1 System Software Software The term that we use for all the programs and data that we use with a computer system. Two types of software: Program.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Standard Grade Computing System Software & Operating Systems.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
1 Introduction to Computers Lect 1 Won’t tell you much you don’t know. (Misleading– the course gets more conceptual as we create webpages.) Will go into.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Introduction to Programming Using C Introduction to Computer Programming.
Intro to Computers Computer Apps 1.
Introduction to Computer Systems and the Java Programming Language.
Robert Crawford, MBA West Middle School.  Explain how the binary system is used by computers.  Describe how software is written and translated  Summarize.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
Computer Architecture
1 Programming Fundamentals How to Program in C++ How to Program in C++
© 2011 Pearson Education, publishing as Addison-Wesley Monday  Class Requirements  Earn hawk points today with the Name Game  Network Login.
© 2006 Pearson Education Chapter 1: Computer Systems.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
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.
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.
The Computer System CS 103: Computers and Application Software.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
By Tom and James. Hardware is a physical part of the system that you can pick up and move. There are two types of hardware, external and internal. External.
Chapter 4 Software. Introduction Program: is a set of sequence instructions that tell the computer what to do. Software: is a collection of programs,
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
The Big Picture. My Story  Wrote great programs  Didn’t understand how they worked.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Introduction to Computer Programming By: Mr. Baha Hanene Chapter 1.
Programming with Java. Chapter 1 Focuses on: –components of a computer –how those components interact –how computers store and manipulate information.
Computer Basics.
Computer Architecture and Number Systems
BASIC PROGRAMMING C SCP1103 (02)
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Introduction to Programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Introduction to Computers and Java
UNIV 103 CS Majors Seminar Dr. Blaise W. Liffick Fall 2017.
Computer Science I CSC 135.
Computers: Hardware and Software
Topics Introduction Hardware and Software How Computers Store Data
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
Presentation transcript:

Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01

OutlineOutline ä What are computers? ä Hardware ä Software ä What is programming? ä Real-world algorithms ä Computer algorithms ä Storing data ä Decimal vs. binary ä Variables ä Programming languages ä Executing a program ä What are computers? ä Hardware ä Software ä What is programming? ä Real-world algorithms ä Computer algorithms ä Storing data ä Decimal vs. binary ä Variables ä Programming languages ä Executing a program

What Are Computers? ä Computers are “information processors.” ä They take in information – from the keyboard, from a mouse, through an electronic “eye,” etc. ä They do something with the information (i.e., process it). ä Then they spit out the results – through the monitor, by moving a robotic arm, etc. ä Computers are made up of hardware… ä The tangible parts of a computer. ä Monitor, mouse, memory cards, etc. ä And software. ä The programs that tell the computer what to do. ä Word processor, video games, etc. ä Computers are “information processors.” ä They take in information – from the keyboard, from a mouse, through an electronic “eye,” etc. ä They do something with the information (i.e., process it). ä Then they spit out the results – through the monitor, by moving a robotic arm, etc. ä Computers are made up of hardware… ä The tangible parts of a computer. ä Monitor, mouse, memory cards, etc. ä And software. ä The programs that tell the computer what to do. ä Word processor, video games, etc.

HardwareHardware ä Processors – the “brains” of the computer. ä CPU (central processing unit), graphics processors, math processors. ä Memory – the ability to store information. ä Main memory, or RAM, stores information while the computer is on. ä Secondary memory (hard drive, floppy disk, etc.) stores information indefinitely. ä Peripheral devices – provide an interface to the outside world. ä Input devices – mouse, keyboard. ä Output devices – Monitor, printer. ä Processors – the “brains” of the computer. ä CPU (central processing unit), graphics processors, math processors. ä Memory – the ability to store information. ä Main memory, or RAM, stores information while the computer is on. ä Secondary memory (hard drive, floppy disk, etc.) stores information indefinitely. ä Peripheral devices – provide an interface to the outside world. ä Input devices – mouse, keyboard. ä Output devices – Monitor, printer.

HardwareHardware Input Output CPU Main Memory Secondary Memory

SoftwareSoftware ä Tells the hardware what to do. ä Operating Systems (OS) ä Collection of programs that interact directly with the hardware. ä DOS, Windows, MacOS, Unix, Linux. ä Applications ä A program not involved in the OS that performs a particular task. ä Word processor, drawing application, web browser, video game. ä Anything written by you in Java. ä Tells the hardware what to do. ä Operating Systems (OS) ä Collection of programs that interact directly with the hardware. ä DOS, Windows, MacOS, Unix, Linux. ä Applications ä A program not involved in the OS that performs a particular task. ä Word processor, drawing application, web browser, video game. ä Anything written by you in Java.

SoftwareSoftware ä An OS acts as a bridge between applications and hardware. ä An application sends a request to the OS, which then tells the hardware what to do. ä An OS acts as a bridge between applications and hardware. ä An application sends a request to the OS, which then tells the hardware what to do. Hardware Application OS Software

What Is Programming? ä Programming is entering a series of commands, or instructions, that tell the computer what to do. ä The instructions must: 1. Be discrete, i.e., not overlap or blend together. 2. Be precisely defined, not vague or ambiguous. ä These instructions combine to form an algorithm. ä The process of designing and writing an algorithm is called programming. ä Programming is entering a series of commands, or instructions, that tell the computer what to do. ä The instructions must: 1. Be discrete, i.e., not overlap or blend together. 2. Be precisely defined, not vague or ambiguous. ä These instructions combine to form an algorithm. ä The process of designing and writing an algorithm is called programming.

Real-World Algorithms  Algorithms exist in the real world, and they’re written in natural languages (e.g., English).  For example, a recipe in a cookbook or instructions for a board game.  But, natural language algorithms lack the precision needed for a computer to understand.  For example, “stir until thick.”  A computer can’t make judgments, and needs perfectly precise instructions.  Algorithms exist in the real world, and they’re written in natural languages (e.g., English).  For example, a recipe in a cookbook or instructions for a board game.  But, natural language algorithms lack the precision needed for a computer to understand.  For example, “stir until thick.”  A computer can’t make judgments, and needs perfectly precise instructions.

Computer Algorithms ä Computer algorithms are written in programming languages (e.g., Java). ä Such algorithms are precise enough for the computer – they require no judgment. ä Example: Compute the remainder of 23/7. 1. Subtract 7 from If the result is less than 7, then that’s your answer. Stop. 3. Otherwise, subtract 7 from the result. 4. Go back to step 2. ä Computer algorithms are written in programming languages (e.g., Java). ä Such algorithms are precise enough for the computer – they require no judgment. ä Example: Compute the remainder of 23/7. 1. Subtract 7 from If the result is less than 7, then that’s your answer. Stop. 3. Otherwise, subtract 7 from the result. 4. Go back to step 2.

Storing Data ä Data refers to information that can be stored, for example, numbers, letters, or names. ä 1, 23, 10.75, x, hello, Tom ä All computers really do is manipulate data. ä This data must be stored in the computer – how? ä Data refers to information that can be stored, for example, numbers, letters, or names. ä 1, 23, 10.75, x, hello, Tom ä All computers really do is manipulate data. ä This data must be stored in the computer – how?

Decimal vs. Binary ä We usually think of numbers in decimal (0-9). ä Computers only know binary (0 and 1). ä Example: 25 in decimal equals in binary. ä Binary is longer, but it’s the only way computers can store info. ä Not only numbers, but also letters and all other data are stored in the computer in binary. ä One binary digit is called a bit. ä A bit can’t store much, so computers group 8 bits together into what is called a byte – like a word. ä We usually think of numbers in decimal (0-9). ä Computers only know binary (0 and 1). ä Example: 25 in decimal equals in binary. ä Binary is longer, but it’s the only way computers can store info. ä Not only numbers, but also letters and all other data are stored in the computer in binary. ä One binary digit is called a bit. ä A bit can’t store much, so computers group 8 bits together into what is called a byte – like a word.

VariablesVariables ä Variables are locations within an algorithm that store data. ä For example, the variables x and y are usually used to store coordinates in 2D. ä Remember our example: Remainder of 23/7. 1. Subtract 7 from If the result is less than 7, then that’s your answer. Stop. 3. Otherwise, subtract 7 from the result. 4. Go back to step 2. ä This algorithm would contain three variables – one for “7”, one for “23”, and one for the result. ä Variables are locations within an algorithm that store data. ä For example, the variables x and y are usually used to store coordinates in 2D. ä Remember our example: Remainder of 23/7. 1. Subtract 7 from If the result is less than 7, then that’s your answer. Stop. 3. Otherwise, subtract 7 from the result. 4. Go back to step 2. ä This algorithm would contain three variables – one for “7”, one for “23”, and one for the result.

Programming Languages ä Machine languages manipulate data in a very basic, primitive way. ä They’re composed of bits, and almost impossible to understand. ä Assembly languages are composed of commands rather than bits, but still difficult to understand. ä High-level languages are much more similar to English. ä Programmers write using high-level languages, and the computer translates these to an assembly language and then to a machine language. ä Examples: Java, C++, BASIC, FORTRAN, and Pascal. ä Machine languages manipulate data in a very basic, primitive way. ä They’re composed of bits, and almost impossible to understand. ä Assembly languages are composed of commands rather than bits, but still difficult to understand. ä High-level languages are much more similar to English. ä Programmers write using high-level languages, and the computer translates these to an assembly language and then to a machine language. ä Examples: Java, C++, BASIC, FORTRAN, and Pascal.

Executing a Program ä The text of a program written in Java, for example, is called source code. ä The computer can’t directly understand source code – it’s not executable. ä There are two methods to execute a program: 1. Compile it: A compiler first makes sure that the source code obeys the rules of the programming language. It then translates the source code to machine language and stores this in a file. This file can now be executed. 2. Interpret it: An interpreter executes the machine instructions corresponding to the source code. ä The text of a program written in Java, for example, is called source code. ä The computer can’t directly understand source code – it’s not executable. ä There are two methods to execute a program: 1. Compile it: A compiler first makes sure that the source code obeys the rules of the programming language. It then translates the source code to machine language and stores this in a file. This file can now be executed. 2. Interpret it: An interpreter executes the machine instructions corresponding to the source code.

HomeworkHomework ä Go to the campus store and buy the textbook and three floppy disks. ä Read: ä Sections 1.1, 1.3, 1.4, and 1.5 to review today’s lecture. ä Sections 2.1, 2.4, 2.5, 2.6, 2.7, and 2.8 for tomorrow’s lecture. ä HW1 out today, due Monday. ä Written part: Write a precise real-world algorithm to light a match. ä Programming part: Getting started with Visual J++. ä Go to the campus store and buy the textbook and three floppy disks. ä Read: ä Sections 1.1, 1.3, 1.4, and 1.5 to review today’s lecture. ä Sections 2.1, 2.4, 2.5, 2.6, 2.7, and 2.8 for tomorrow’s lecture. ä HW1 out today, due Monday. ä Written part: Write a precise real-world algorithm to light a match. ä Programming part: Getting started with Visual J++.