Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Similar documents
Chapter 1 Introduction to Computers and Programming

Chapter 1: Why Program? Computers and Programming. Why Program?

Chapter 1: Introduction to Computers and Programming

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Introduction. Arizona State University 1

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

SCSP Programming Technique C

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

C H A P T E R 1. Introduction to Computers and Programming

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Chapter 1 INTRODUCTION

CHAPTER 1 Introduction to Computers and Java

Programming 1 - Honors

Computer Fundamentals

HARDWARE. There are a number of factors that effect the speed of the processor. Explain how these factors affect the speed of the computer s CPU.

Introduction to Computers. Joslyn A. Smith

Chapter 1 Introduction to Computers and C++ Programming

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Basic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร

Fundamentals of Programming Session 1

Fundamentals of Programming Session 1

8/25/2016. What Is a Computer? The Components of a Computer

CS 241 Computer Programming. Introduction. Teacher Assistant. Hadeel Al-Ateeq

An Overview of the Computer System. Kafui A. Prebbie 24

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

There are many types of computers, including:

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

CSI31 Introduction to Computer Programming I. Dr. Sharon Persinger Fall

Computer Programming. Dr. Fahad Computer Science Deptt.

SECTION 2 (Part B) Types And Components Of Computer Systems. Sophia Pratzioti

Agenda Computer Hardware Input Devices Output Devices Secondary Storage Computer Software System Software Application Software Working with Windows

Computer Architecture and Assembly Language. Spring

First lecture Computer Basics. By lecturer : Raya N.Ismail computer science department

Gagan. Site : Youtube :

Parts of the Computer System. Parts of the Computer System. Parts of the Computer System. Essential Computer Hardware. Information Processing Cycle

1a Computers, Problem Solving!

assembler Machine Code Object Files linker Executable File

The Programming Process Summer 2010 Margaret Reid-Miller

Main Parts of Personal Computer

Chapter 1. Introduction to Programming and Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

What's in a computer?

! A program is a set of instructions that the. ! It must be translated. ! Variable: portion of memory that stores a value. char

Downloaded From :

AN INTRODUCTION TO THE COMPUTER

Programming Principles and Techniques

Hardware and Software - Revision Summary

15/09/15. Introduction to Computers & The Internet. Contents. Computer hardware and software. Input and output devices CPU. Memory.

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Computer Principles and Components 1

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Overview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Elementary Computing CSC M. Cheng, Computer Science 1

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

Computer Organization

Copyright 2006 Prentice-Hall. All rights reserved. 1

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

CS1500 Algorithms and Data Structures for Engineering, FALL Virgil Pavlu, Jose Annunziato,

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal

INTRODUCTION TO COMPUTERS

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Information Communications Technology (CE-ICT) 6 th Class

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

Welcome to Solving Problems with Computers I

Computer System Overview

COMPUTER BASICS Processing/Storage

Mother Board And Its Components By :- IMRAN QURESHI

Chapter One. Introduction to Computer System

COMPUTER BASICS LECTURER: ATHENA TOUMBOURI

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

CSC 126 FINAL EXAMINATION Spring Total Possible TOTAL 100

4.03 IT PowerPoint. Objective 4.03 Understand Information Technology activities and careers.

ST. MARY S COLLEGE FORM 4

CS150 Introduction to Computer Science 1. What is CS150? Who Are We? CS150 is a programming course You will learn

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Introduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science

COMPUTER SYSTEMS. Section 1

Total Mark out of 35

Introduction to Programming

The Modern Computer. Exploring Computer Science

Components of a personal computer

Computer Components 1 CSC1103- Nouf AlJaffan Saturday, 02 February 2013

Welcome to Computer Organization and Design Logic

Parts are adapted from Windows 98 by Mark Twain Media, Inc. A Computer System has Hardware and Software

Ch. 1: Computer System part I

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

VARIABLES & ASSIGNMENTS

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

II Esercitazione: S.O. & Fortran 90

Fundamentals of Programming. Lecture 1: Introduction to C Programming

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

Computer Systems. Communication (networks, radio links) Meatware (people, users don t forget them)

Transcription:

Week 0: Intro to Computers and Programming Gaddis: Sections 1.1-3 and 2.1 CS 1428 Fall 2014 Jill Seaman 1.1 Why Program? Computer programmable machine designed to follow instructions Program instructions in computer memory to make the computer do something Programmer person who writes instructions (programs) to make computer perform a task SO, without programmers, no programs; without programs, a computer cannot do anything 1 2 1.2 Computer Systems: Hardware and Software Hardware: the physical components that a computer is made of. Software: the programs that run on a computer Hardware Components Central Processing Unit (CPU) Main Memory (RAM) Secondary Storage Input Devices Output Devices 3 4

Hardware Components Illustrated Central Processing Unit (CPU) The part that actually RUNS the programs Comprised of: Control Unit Retrieves and decodes program instructions Coordinates activities of all other parts of computer Arithmetic & Logic Unit (ALU) Performs high-speed numeric calculations Makes true/false decisions (comparisons) 5 6 Main Memory Computer s working memory: programs must stored in main memory when the program is running It is volatile: Main memory is erased when program terminates or computer is turned off Also called Random Access Memory (RAM) Addresses Each location in memory is identified by a unique number known as an address. 7 Main Memory The number 149 is stored in the location with the address 16, and the number 72 is stored at address 23. (149 and 72 are actually represented in memory using binary: 0 s and 1 s) 8

Secondary Storage Where documents and data (and programs) are stored. Non-volatile: data retained when program is not running or computer is turned off Comes in a variety of media: Input and Output Devices Input Devices: send information to the computer from outside Keyboard, mouse, scanner, digital camera, microphone, touch screen/pad Disk drives, CD drives, and DVD drives magnetic: floppy disk, hard drive optical: CD-ROM, DVD Flash drives, connected to the USB port 9 Output Devices: send information from the computer to the outside world Monitors/screens, printers, speakers Disk drives, CD drives, and DVD drives 10 Software Programs that run on the hardware Operating Systems (System software): 1.3 Programs and Programming Languages A program is a set of instructions that the computer follows to perform a task programs that manage the computer hardware and the programs that run on them. Unix, MS-DOS, Linux, Windows, Mac OS X Time machine, printer drivers, compilers Application Programs (Apps): Solve specific problems and provide services to the user Word, Excel, itunes, Firefox, Angry Birds, Photoshop 11 An algorithm: A set of well-defined steps for performing a task or solving a problem. A step by step ordered procedure that solves a problem in a finite number of precise steps. An algorithm can be in any language (English, C++, machine code, etc). 12

Example (algorithm) 1.Display on screen: how many hours did you work? 2.Wait for user to enter number, store it in memory 3.Display on screen: what is your pay rate (per hour)? 4.Wait for user to enter rate, store it in memory 5.Multiply hours by rate, store result in memory 6.Display on screen: you have earned $xx.xx where xx.xx is result of step 5. Note: Computer does not speak English, it only understands its own machine language 13 Programming Languages Machine Language: Instructions are encoded as a sequence of 1's and 0 s Machine specific Low Level Languages: Assembly Language Letters and digits (codes) Direct correspondence to Machine Language High Level Languages (like C++): Words, symbols, numbers Easier for humans to read and use Must be translated to Machine Code 14 Translation Process 2.1 The Parts of a C++ Program // sample C++ program #include <iostream> using namespace std; int main() { cout << "Hello, world"; return 0; } 15 16

Parts of a C++ Program Comment: // ignored by compiler notes to human reader Preprocessor Directive: #include <iostream> compiler inserts contents of file iostream here required because cout is defined in iostream using namespace std; allows us to write cout instead of std::cout Parts of a C++ Program int main () start of function (group of stmts) named main the starting point of the program {} contains the body of the function cout << Hello, world ; statement that displays message on screen return 0; sends value of 0 to OS (means success) 17 18