CISC 110 Day 1 Hardware, Algorithms, and Programming.

Slides:



Advertisements
Similar presentations
COMP6005 An Introduction to Computing Session Two: Computer Hardware.
Advertisements

 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
Computer Hardware.
 The central processing unit (CPU) interprets and executes instructions.  The “brains” of the computer.  The speed of the processor is how fast it.
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Category1 Computers Category2 CPU.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Introduction to Computers
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
COMP Computer Basics Yi Hong May 13, 2015.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510, Section 2.
บทนำสู่คอมพิวเตอร์. Outline Computer Concepts Computer Components Software OS How to write a program? Program development.
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.
How Computers Work. A computer is a machine f or the storage and processing of information. Computers consist of hardware (what you can touch) and software.
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Computers Inside and Out
Introduction to Computers
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
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.
Introduction to the Computer System. What is a computer ? A computer is an electronic device that can accept data and instruction, process them or store.
Computer Basics By: Nicole Hayes. Purposes of Computers Business – Track inventory. – Calculate payroll. – Maintain databases. Personal – Surf the web.
Slide 1 Wednesday, October 07, 2015 Low Level Machine.
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
Introduction to Computer Systems and the Java Programming Language.
1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.
Introduction to C Programming Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010 Fall.
IT Groundwork ICS3UC - Unit 1 Hardware. Overview of Computer System.
BAT3O / BTX4C. Definition: A computer is an electronic machine that 1) takes in data and instructions (input) 2) works with the data (processing) 3) puts.
How computers work The CPU & Memory. The parts of a computer.
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 Science 101 Computer Systems Organization.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
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,
Basic Computer Organization Rashedul Hasan.. Five basic operation No matter what shape, size, cost and speed of computer we are talking about, all computer.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
Chapter 1 Introduction to Computers, the Internet and the Web.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
COMPUTER SYSTEM A computer system is define as combination of components designed to process data and store files. A computer system consists of four.
Introduction to Information Technology: Your Digital World © 2013 The McGraw-Hill Companies, Inc. All rights reserved.Using Information Technology, 10e.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Basic concepts of a computer system V1.0 (21/11/2005)
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Basic Computer Components Unit 2. What is a computer?  A computer is an electronic device that accepts raw data and processes it into information that.
Computer Architecture and Number Systems
Computer basics.
An Overview of the Computer System
Engineering Problem Solving With C An Object Based Approach
Chapter 1: An Overview of Computers and Programming Languages
The Central Processing Unit
Introduction to Computers
An Introduction to The computer.
Looking Inside the machine (Types of hardware, CPU, Memory)
An Overview of the Computer System
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Introduction to Computers
Computer Hardware.
Computer Electronic device Accepts data - input
Presentation transcript:

CISC 110 Day 1 Hardware, Algorithms, and Programming

Outline Structure of Digital Computers Programming Concepts Output Statements Variables and Assignment Statements Data Types String and Numeric Operations 2

Structure of Digital Computers I/O Devices Input/Output Devices: (e.g. Keyboard, Mouse, Webcam) Communication between the computer and the user, and with other computers Secondary Storage Long-term memory of data and programs (e.g. hard drive) 3 CPU (Central Processing Unit): Calculations and the Fetch-Execute Cycle Main Memory RAM (Random Access Memory): Short-term memory of data and programs, while computer is powered on

Main Memory (RAM) byte 3025 byte 3026 byte 3027 byte 3028 byte 3029 byte 3030 byte 3031 byte 3032 byte 3033 byte 3021 byte 3022 byte 3023 byte byte memory location at address 3021: could hold a 16-bit integer 4 byte memory location at address 3024: could hold a 32-bit integer 1 byte memory location at address 3030: could hold one letter 4

Memory Sizes MemoryConversion 1 bit 1 nybble4 bits Either 1 or 0 1 kilobyte 1 byte 2 10 bytes (approx bytes) 8 bits 1 terabyte 1 gigabyte 1 megabyte2 20 bytes (approx kilobytes) 2 30 bytes (approx megabytes) 2 40 bytes (approx gigabytes) 5

Computers: A Definition Computers are machines that can carry out routine mental tasks by performing simple operations at high speeds (operations built into the hardware: machine operations). 6

A Definition of an Algorithm An algorithm is a sequence of instructions that describes how to carry out a task. 7

A Mathematically Precise Definition of an Algorithm An algorithm is a finite sequence of unambiguous, executable instructions for carrying out a task or process in a finite amount of time. Note: This assumes no intelligence on the part of the user. The intelligence and knowledge of a person is encoded in the algorithm. 8

A Definition of a Programming Language A programming language consists of a repertoire of possible instructions, each of which can be specified in terms of the simple operations (machine operations) a computer can execute. 9

Cake-making & Computation Electronic Computer Oven & Utensils (Hardware) Bit String: Numbers or Characters Cake Ingredients (Input) Bit String: Numbers or Characters Cake (Output) 10 Program/Software Recipe (Algorithm)

A Definition of a Scripting Language A scripting language is a programming language that allows control of an application, for instance an animation. The name script is derived from the written script of the performing arts, which tells the actors what to say. 11

ActionScript Trace() Purpose: To display values in the output panel to trace the state of an animation Examples: trace( 525 ); trace ( “Now starting love scene” ); trace ( “Row ” “Col ” + 7 ); trace ( ); trace ( “5 + 7 = ” ); 12

Defining Variables to Store Values Memory: row var row = 5; row = 8; var next = row + 1; next = next + 1; var s = “hi”; var val = 3.5; ActionScript: val s next 13

Data Typing Variables ActionScript: var row: int = 5; row = 8; var next: int = row + 1; next = next + 1; var s: String = “hi”; var val: Number = 3.5; 14

String Operations Operators: +Concatenation +=Append Escape Sequences: \nNew Line \t Tab \’Single Quote \”Double Quote \\Backslash Examples: trace( “Hey” + “you” ); trace( “Hey\nyou” ); trace( “Hey\tyou” ); trace( “Hey\”you\”” ); 15

Arithmetic Operations Operators: +Addition -Subtraction *Multiplication /Integer Division % Mod (integer remainder of division) 16

Imperative Programming Statements: Variable Assignment (=) Branching (if, else) Loops (while, for) Data Structures: Integers Strings Arrays Classes Functions 17