Computer Programming

Similar documents
Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Programming

Computer Architecture 2/26/01 Lecture #

Computer Programming

Computer Programming

Computer Programming

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Computer Programming

Computer Programming

Computer Organization

Computer Programming

5 Computer Organization

Computer Programming

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

Computer Programming

Computer Programming

Computer Architecture

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

Computer Programming

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

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

Computer Architecture and Assembly Language. Spring

Computer Programming

5 Computer Organization

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Computer Programming. Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering IIT Bombay

Computer Programming

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Computer Organization

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

Computer Architecture

Introduction to Computer Systems

CS101 Computer programming and utilization

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

Introduction to Computer Systems

Introduction to Computers - Chapter 4

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

CC411: Introduction To Microprocessors

Technology in Action

Topic Notes: MIPS Instruction Set Architecture

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Computer Systems C S Cynthia Lee Today s materials adapted from Kevin Webb at Swarthmore College

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Von Neumann Architecture

Computer Programming

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

Assembly Language. Lecture 2 x86 Processor Architecture

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

Microprocessors/Microcontrollers

ECE Lab 8. Logic Design for a Direct-Mapped Cache. To understand the function and design of a direct-mapped memory cache.

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Fundamentals of Programming Session 1

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Introduction to Computer Systems

Let s put together a Manual Processor

Information Science 1

SYSTEM BUS AND MOCROPROCESSORS HISTORY

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

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

Chapter 5: Computer Systems Organization

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Chapter 9: A Closer Look at System Hardware

Information Science 1

Chapter 9: A Closer Look at System Hardware 4

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

Computer Organization and Assembly Language (CS-506)

Announcements. This week: no lab, no quiz, just midterm


Learning Objectives. In this chapter you will learn about:

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

1a Computers, Problem Solving!

CSC 220: Computer Organization Unit 12 CPU programming

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

CS 101, Mock Computer Architecture

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming

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

Chapter 1: Introduction to Computers and Programming

COMP163. Introduction to Computer Programming. Introduction and Overview of the Hardware

High Performance Computing

(Refer Slide Time 00:01:09)

Fundamentals of Programming Session 1

Systems Architecture

Chris Riesbeck, Fall Introduction to Computer Systems

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

Chapter One. Introduction to Computer System

16-Bit Intel Processor Architecture

Computer Architecture

JNTUWORLD. 1. Discuss in detail inter processor arbitration logics and procedures with necessary diagrams? [15]

Transcription:

Computer Programming Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering Session: Computer Architecture Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 1

Quick Recap of Relevant Topics Dumbo model of computing Named drawers for storing/retrieving values Workbench registers for computing Input and output using carts 2 Dr. Deepak B. Phatak & Dr. Supratik Chakraborty,

Overview of This Lecture What is it that we will actually be programming From Dumbo to a real computer (almost a Dumbo!) Simplified architecture of a computer Functionalities of different parts Bits and bytes of information 3 Dr. Deepak B. Phatak & Dr. Supratik Chakraborty,

Main Memory A Simple Real Computer Dumbo s Drawers Dumbo s Cart Dumbo s Cart Location 0 Location 1 Location 2 Dumbo s Cart Address Data Dumbo s Workbench Register 0 Register 1 Register 2 Register 3 Controller Arithmetic and Logical Unit (ALU) Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 4

Main Memory Parts of a Computer Location 0 Location 1 Location 2 Address Data Register 0 Register 1 Register 2 Register 3 Arithmetic and Logical Unit (ALU) Controller Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 5

Main Memory Usually called Random Access Memory (RAM) or simply Memory Large number of addressable locations Each location stores exactly one value at a time Even if you don t store a value at a location, garbage value exists Writing to a location destroys value originally there Reading a location makes a copy, does not destroy value Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 6

Main Memory Parts of a Computer Location 0 Location 1 Location 2 Address Data Register 0 Register 1 Register 2 Register 3 Arithmetic and Logical Unit (ALU) Controller Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 7

Registers Much faster, costlier and smaller than main memory Won t see much of these in our programs Works behind the scenes Advanced programming can refer to registers directly We won t get to cover this in this course Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 8

Main Memory Parts of a Computer Location 0 Location 1 Location 2 Address Data Register 0 Register 1 Register 2 Register 3 Arithmetic and Logical Unit (ALU) Controller Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 9

ALU and Controller Arithmetic Logic Unit (ALU) Workhorse of computer All arithmetic (add, multiply ) and logical (and, or ) operations happen here Takes operands from registers, stores result in registers Controller Sequences various actions involved in executing instructions Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 10

Main Memory Parts of a Computer Location 0 Location 1 Location 2 Address Data Register 0 Register 1 Register 2 Register 3 Arithmetic and Logical Unit (ALU) Controller Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 11

Disks and Input/Output Devices Disks Longer term storage for files (programs, data, logs, outputs ) Like main memory, but much slower, larger, cheaper More later when we study about files Input/Output (aka I/O) Devices Allows computer to interact with world outside Input device: Keyboard for us Output device: Console (screen) for us Computers can interact with other kinds of I/O devices too! Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 12

Main Memory Parts of a Computer Location 0 Location 1 Location 2 Address Data Register 0 Register 1 Register 2 Register 3 Arithmetic and Logical Unit (ALU) Controller Central Processing Unit (CPU) BUS Disk Output Device Input Device Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 13

Buses Highways for transfering information between different parts Address bus, data bus, I/O bus, external device bus (Universal Serial Bus) We won t see these in our study Works behind the scenes Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 14

Main Memory How is Information Represented? All information represented as sequences of 0 s and 1 s Snapshot: 01101101 01111111 11101100 Address 10011110 00001111 00001011 00001001 01101111 11011100 00011010 + 11110111 11011100 Data CPU 10011111 BUS 10010111 10011111 10010101 Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 15

Internal Representation of Information Electronic circuits in a computer can efficiently store and process two states of electrical signals Call them 0 and 1 Information represented using 0 and 1 Binary representation 0 and 1 called bits (binary digits) Information accessed in chunks of 8 bits: a byte Memory access, I/O access, register access, addresses, Important to understand how numbers, characters, strings are represented using bits and bytes Topic of another lecture Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 16

Summary Architecture of a simple real computer Main memory Registers ALU Input/Output devices Disk Bus Representing information: Bits and bytes Dr. Deepak B. Phatak & Dr. Supratik Chakraborty, 17