David Stotts Computer Science Department UNC Chapel Hill.

Slides:



Advertisements
Similar presentations
Hardware Lesson 3 Inside your computer.
Advertisements

An Overview of the Computer System
 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
 The central processing unit (CPU) interprets and executes instructions.  The “brains” of the computer.  The speed of the processor is how fast it.
Main Memory Lecture 2 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Hardware Basics: Inside the Box 2  2001 Prentice Hall2.2 Chapter Outline “There is no invention – only discovery.” Thomas J. Watson, Sr. What Computers.
Unit 3—Part A Computer Memory
Chapter 3 – Computer Hardware Computer Components – Hardware (cont.) Lecture 3.
Communications Technology 2104 Mercedes Lahey. Bit 1. bit=From a shortening of the words “binary digit” 2. the basic unit of information for computers.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
The Internal Components of a Personal Computer (PC)
GENERAL COMPUTER Jeopardy ABCDE Points A What is this? Go back.
CPU (CENTRAL PROCESSING UNIT): processor chip (computer’s brain) found on the motherboard.
Computer Systems Chapter 1 Pages Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.
MAC OS – Unit A Page: 10-11, Investigating Data Processing Understanding Memory.
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510.
Introduction to Computers
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
David Stotts Computer Science Department UNC Chapel Hill.
Hardware Data Storage.
Computer Parts. Two Basic Parts Hardware & Software.
Getting to know Storage Media 1.Stores information 2.Retrieve information for later use.
Inside your computer. Hardware Review Motherboard Processor / CPU Bus Bios chip Memory Hard drive Video Card Sound Card Monitor/printer Ports.
Inside your computer. Hardware Motherboard Processor / CPU Bus Bios chip Memory Hard drive Video Card Sound Card Monitor/printer Ports.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Basics Terminology - Take Notes. What is a computer? well, what is the technical definition A computer is a machine that changes information.
Computer Guts and Operating Systems CSCI 101 Week Two.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
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.
Unit 2—Part A Computer Memory Computer Technology (S1 Obj 2-3)
Click here to download this powerpoint template : Colorful Networks Free Powerpoint TemplateColorful Networks Free Powerpoint Template For more : Powerpoint.
COMPUTER BASICS Computer Technology. WHAT IS A COMPUTER?  Electronic  Accepts data and instructions  Manipulates, processes, and displays the information.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
1 Course Title: IT IN BUSINESS Course Instructor: ADEEL ANJUM Chapter No: 04 1 BY ADEEL ANJUM (MCS, CCNA,WEB DEVELOPER)
Chapter 1: - What is a Computer? - Hardware. - Software. - Types of Computers. - Numeral Systems. - Data Sizes and Speeds. - Data Coding and Information.
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.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
COMPUTER SYSTEM A computer system is define as combination of components designed to process data and store files. A computer system consists of four.
Computer Basics Just How Does a Computer Work?
Introduction To Computer Programming – 1A Computer Parts, Words, and Definition Herriman High School.
Computers Mrs. Flowers University High School.
~How PC Parts Work~ (30 MARKS). List 4 External components you can see on the PC in front of you and describe the basic function of each one. 1) DVD Drive.
Basic Computer Hardware and Software.
David Kauchak CS 52 – Spring 2017
An Overview of the Computer System
PC Parts Worksheet- Building Your own Computer
Storage Hardware This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions,
Computer Memory Digital Literacy.
Computer Hardware and Software
Information Support and Services
Introduction to Computer Architecture
Computer Hardware Flash Card Review
Unit 2 Computer Memory Computer Technology (S1 Obj 2-3)
Introduction to Computers
Introduction to Computers
Computer System Basics- The Pieces & Parts
Unit 3—Part A Computer Memory
Looking Inside the machine (Types of hardware, CPU, Memory)
Introduction to Computing Lecture # 1
An Overview of the Computer System
Unit 3—Part A Computer Memory
Bits, Bytes, and Storage.
Introduction to Computers
Chapter 3 Hardware and software 1.
Chapter 3 Hardware and software 1.
Data Structures and Analysis (COMP 410)
Information Technology Department
Presentation transcript:

David Stotts Computer Science Department UNC Chapel Hill

Afraid you will become this guy 

Class webpage

1. data storage (variables, assignment) 2. data retrieval (expressions, evaluation) 3. repetition (loops) 4. decision making (conditionals) 5. procedure abstraction (functions) 6. data abstraction (arrays)

No not this…

 A “model” is a simplification of something complex… an abstraction  We take out some detail to show the basics of something in simple form  Details we remove are irrelevant to the aspects we wish to emphasize or explain in the model

enroll graduate Pay tuition Take fall classes Take spring classes Do 4 or 5 times Get 1.7 mil s from Alumni Assoc

What can we study here? What can we not study?

planetscale sizeperihelionaphelion The Sun 10cm diameter 40 watt bulb 00 Mercury1/3mm paint drop10 3/4 feet16 1/4 feet Venus1mm paint drop25 feet25 1/2 feet Earth1mm paint drop34 1/2 feet35 2/3 feet Mars1/2mm paint drop48 feet59 feet Jupiter 10mm white marble or bead 173 feet191 feet Saturn 8 1/2mm hatpin or pearl 316 feet353 feet Uranus 3 1/3mm map pin or pearl 642 feet705 feet Neptune 3 1/5mm map pin or pearl 1045 feet1063 feet Scale Model of the Solar System Scale = 1:14,000,000,000 I miss Pluto … don’t you?

John

storage size increases access time increases cost decreases (per bit) persistence increases decreasing frequency of access by processor The “cloud”

CPU regs cache Main memory RAM Disk drives, DVD Network, cloud USB

 A minimum amount of information is read from secondary memory into main memory  Control is transferred to that area of main memory; this code reads the core of the OS, called the kernel  The kernel executes the initial process  This process loads a full OS off disk (or cloud)  Called bootstrapping (pulling oneself up by one’s bootstraps)… the computer “boots up”  OS then runs all the other programs you write and use… including JavaScript

Main memory RAM kernel CPU Disk OS loads kernel CPU runs kernel Kernel talks to disk CPU runs full OS OS Keyboard Mic camera User input Data to programs Data output wireless, usb, net, print port, sound, video CPU runs programs

Intructions and data all stored in main memory (RAM)

 Internally a computer stores information in binary form, or base 2  Here’s what a program in memory looks like if you could peek in:

 We group the 0’s and 1’s into chunks to represent different forms of information

Programs and their data all stored together in memory  Some 0’s 1’s chunks stand for numbers  Some stand for characters, text  Some stand for images, videos, etc.  Some stand for memory locations  Some stand for program instructions like “add 2 numbers” or “save register 5 to memory location ”

 Computer sorts it all out during the fetch-execute cycle  When we “program” the computer we express the computations we want in a “high level” language like JavaScript  A compiler or translator converts our human-readable program into a big pile of binary… puts it in memory for the computer to then sort out and run

 “0” and “1” are the way computers express information because of physics  A light switch is on, or it is off  A wire has current in it, or it does not  A spot on a disk surface is magnetic, or it is not  A hole is punched in a card, or it is not  “0” is really “absent” or “off”  “1” is really “present” or “on”  We also often think of “0” as false, “1” as true

 With two physical states in a circuit (on, off) we must build all information from a notation with 2 units, or base 2  We call this binary  We think of the units as the digits 0 and 1  A single unit of information is a bit which is short for binary digit  We clump bits together into chunks sized by powers of 2

2^0 is 1 2^4 is 16 2^7 is 128 2^1 is 2 2^5 is 32 2^8 is 256 2^2 is 4 2^6 is 64 2^9 is 512 2^3 is 8  special… we call 8 bits a byte 2^10 is 1024  kilo, 1 kilobit, or 1 Kb 2^20 is 2^10 * 2^10 mega,~ 1 million, 1 megabit, or 1 Mb 2^30 is 1 gigabit or ~ 1 billion bits 2^40 is 1 terabit or ~ 1 trillion bits

We can do this with bytes too 8 bits is 1 byte 2^10 bytes is 1024 bytes is 1 kilobyte (KB) 2^20 is 1024 * 2^10 bytes is 1 megabyte or 1 MB 2^30 bytes is 1 gigabyte or 1 BG 2^40 bytes is 1 terabyte or 1 TB

 Binary for numbers is base 2  (base 2) is 1 times 2^3 … 8 (base 10) 1 times 2^2 … 4 0 times 2^1 … 0 1 times 2^0 … 1 13 (base 10) add these together

 Here is a Web page with a JavaScript programWeb page  Here is the program source code function simpleFunc( ) { //put your program text below the dashed line // alert("Hello from your first program !"); // //put your program text above the dashed line }

 You know what a model is  Using the von neumann computer model, you know about the insides of the computer you will program  You have run your first program  You know that computers store information (data, programs) internally in binary form (base 2)

 Review math: base 2 and powers of 2  Read intro, chap. 1 in text  Download first program HTML doc to your PC and make sure you can ◦ edit it, esp. … ◦ make the browser browse it ◦ run the program