Fundamentals of Programming Session 1

Similar documents
Fundamentals of Programming Session 1

Introduction. Arizona State University 1

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

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

Chapter 1: Introduction to Computers and Programming

Computer Architecture and Assembly Language. Spring

Chapter 5: Computer Systems Organization

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

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

Fundamentals of Programming. Lecture 1: Introduction to C Programming

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

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

Information Science 1

Computer Architecture 2/26/01 Lecture #

Chapter 1 Introduction to Computers and Programming

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

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.

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Computer Organisation IB Computer Science. Content developed by Dartford Grammar School Computer Science Department

Introduction to Computer Science. Homework 1

Computer Fundamentals

Fundamentals of Programming Session 7

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

EEM 232 Digital System I

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

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

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

SCSP Programming Technique C

Fundamentals of Programming Session 8

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

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

COMPUTER SCIENCE TECHNOLOGY ITSC 1301 Introduction To Computers Course Topic Outline Fall 2001

IB Computer Science Topic.2-

Fundamentals of Programming Session 20

Lecture 01: Basic Structure of Computers

5 Computer Organization

Padasalai s - VIRUDHUNAGAR DISTRICT COMMON FIRST MID TERM TEST, JULY 2018 STANDARD 11 COMPUTER APPLICATION

Name: Date: Hour: The abacus (still in use today) is about 5,000 years old. Not a computer.

Von Neumann Architecture

Computer Architecture

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Ms. Minerva A. Lagarde

CS61C : Machine Structures

COMPUTER BASICS LECTURER: ATHENA TOUMBOURI

CC411: Introduction To Microprocessors

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

History. 3rd Generation- Integrated Circuits, Transistors (Integrated Circuit form) for Memory ( memory is now volatile), Terminal/Keyboard for I/O

Computer Architecture. Fall Dongkun Shin, SKKU

COURSE OUTLINE & WEEK WISE BREAKAGE

Computer Principles and Components 1

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Computer Programming-1 CSC 111. Chapter 1 : Introduction

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Hardware and Software - Revision Summary

Department of Industrial Engineering. Sharif University of Technology. Operational and enterprises systems. Exciting directions in systems

The Programming Process Summer 2010 Margaret Reid-Miller

Computer Architecture (part 2)

Introduction to Computers. Joslyn A. Smith

Computer Organization and Programming

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

System Unit Components Chapter2

Fundamentals of Programming Session 19

Memory Addressing, Binary, and Hexadecimal Review

Chapter Two. Hardware Basics: Inside the Box

Components of a personal computer

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

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

0 Introduction: Computer systems and program development

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

Fundamentals of Programming Session 20

Chapter One. Introduction to Computer System

Segment 1A. Introduction to Microcomputer and Microprocessor

AS/A Level Computing Syllabus 2011

ECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration

Solve only 2 out of 3 questions

CHAPTER 1 Introduction to Computers and Java

Total Mark out of 35

Computer Organization

Welcome to Computer Organization and Design Logic

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

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

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

Fundamentals of Programming Session 24

Data Manipulation. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

Fundamentals of Programming Session 12

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Fundamentals of Programming Session 2

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

What is the typical configuration of a computer sold today? 1-1

CPSC 121: Models of Computation

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

Computer Fundamentals

Chapter 1 Introduction to Computers and C++ Programming

Elementary Computing CSC M. Cheng, Computer Science 1

TUTORIAL Describe the circumstances that would prompt you to use a microprocessorbased design solution instead of a hard-wired IC logic design.

C++ Programming Language Lecture 1 Introduction

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY (ICT) LECTURE 2 : WEEK 2 CSC-111-T

Transcription:

Fundamentals of Programming Session 1 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 Sharif University of Technology

Outlines Review of Course Content Grading Policy What Is the Computer? Computer Organization Programming Language 2

Review of course content Chapter 1 Introduction to Computer and Computer Programming Computer Organization History of C/C++ Typical C Program Development Environment Binary Digits Chapter 2 Introduction to C Programming Memory Concepts Arithmatic and Decision Making in C 3

Review of course content Chapter 3 Algorithms and Pseudocodes Units Control Structures Repetition Structure Logical Operators Chapter 4 Functions Recursion References and Reference Parameters Chapter 5 Arrays Sorting Arrays Searching Arrays 4

Review of course content Chapter 6 Pointers and Strings Pointer Expressions and Pointer Arithmetic Arrays of Pointers and Function Pointers Chapter 7 User-Defined Types Structure Definitions Classes and Data Abstraction Chapter 8 Files and Streams Sequential and Random Access Files Reading and Writing Data to a File 5 More concepts will be taught if time permits!

Grading Policy Midterm Exam: 20% Final Exam: 35% Programming Assignments: 20% Quiz: 10% Final Project (two phases): 15% Extra Points: 5% 6

What is a Computer? Wikipedia s Definition: A computer is a programmable machine that receives input, stores and automatically manipulates data, and provides output in a useful format. A computer does not need to be electric, nor even have a processor, nor RAM, nor even hard disk. The minimal definition of a computer is anything that transforms information in a purposeful way. The first electronic computers were developed in the mid-20 th century (1940 1945). Originally, they were the size of a large room, consuming as much power as several hundred modern personal computers (PCs). 7

What is a Computer? Computer Device capable of performing computations and making logical decisions. Computers process data under the control of sets of instructions called computer programs Hardware Various devices comprising a computer Keyboard, screen, mouse, disks, memory, CD-ROM, and processing units Software Programs that run on a computer 8

Computer Organization Six units in every computer: Input unit Output unit Memory unit Arithmetic and logic unit (ALU) Central processing unit (CPU) Secondary storage unit 9

10 Computer Organization

Computer Organization The memory unit - or random access memory (RAM) stores instructions and/or data Memory is divided into an array of "boxes" each containing a byte of information. A byte consists of 8 bits. A bit (binary digit) is either 0 (OFF) or 1 (ON). The memory unit also serves as a storage for intermediate and final results of arithmetic operations. Secondary storage unit Cheap and high-capacity storage Stores inactive programs 11

Computer Organization 1 bit 8 bits 16 bits 32 bits 64 bits bit (1 or 0) byte (octet) (2 8 ) word (2 16 ) double (2 32 ) long double (2 64 ) Encoding information on a fixed element of length n with a base b gives b n non-redundant possibilities. 12

Computer Organization Input unit Obtains information from input devices (keyboard, mouse) Output unit Outputs information (to screen, to printer, to control other devices) input (e.g. keyboard, mouse, microphone, disk drive, etc.) and output (e.g. monitor, status indicator lights, speakers, disk drive, etc.) units are used to transmit data into and out of the computer. Today there are generally 2 ways of describing data transfer speeds: in bits per second, or in bytes per second. Network engineers still describe network speeds in bits per second, while your internet browser would usually measure a file download rate in bytes per second. A lowercase "b" usually means a bit, while an uppercase "B" represents a byte. 13

Computer Organization a central processing unit (CPU) consists of an arithmetic/logic unit (ALU) where math and logic operations are performed, a control unit which directs most operations by providing timing and control signals, and registers that provide short-term data storage and management facilities. an arithmetic/logic unit (ALU) The type of operation that the ALU needs to perform is determined by signals from the control unit. The data can come either from the input unit, from the memory unit. Results of the operation can either be transferred back to the memory unit or directly to the output unit. 14

Computer Organization control unit contains logic and timing circuits that generate the appropriate signals necessary to execute each instruction in a program It fetches an instruction from memory by sending an address and a read command to the memory unit. After decoding this instruction, the control unit transmits the appropriate signals to the other units in order to execute the specified operation. This sequence of fetch and execute is repeated by the control unit until the computer is either powered off or reset. 15