23/07/2016CSE1303 Part B lecture notes 1 Introduction to computer systems Lecture B01 Lecture notes section B01.

Slides:



Advertisements
Similar presentations
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Advertisements

10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Instruction Set Architecture & Design
The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Introduction.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
24/06/2015CSE1303 Part B lecture notes 1 Words, bits and pieces Lecture B05 Lecture notes section B05.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Data Representation Kieran Mathieson. Outline Digital constraints Data types Integer Real Character Boolean Memory address.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
What is an instruction set?
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
COM181 Computer Hardware Ian McCrumRoom 5B18,
Bits and Data Storage. Basic Hardware Units of a Computer.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Bits, Nybbles, Bytes, numbers and characters
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Assembly Language for x86 Processors 7th Edition
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
ACOE2511 ACOE251/AEEC335 -Assembly Language for the 80X86/Pentium Intel Microprocessors Lecturer: Dr. Konstantinos Tatas.
1 A Simple but Realistic Assembly Language for a Course in Computer Organization Eric Larson Moon Ok Kim Seattle University October 25, 2008.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
These notes were originally developed for CpSc 210 (C version) by Dr. Mike Westall in the Department of Computer Science at Clemson.
Computer Science 101 Computer Systems Organization.
Computer Architecture and Organization
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Computer Architecture EKT 422
Computer Organization and Assembly Languages 2007/11/10
Sahar Mosleh California State University San MarcosPage 1 Assembly language and Digital Circuit By Sahar Mosleh California State University San Marcos.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
A LECTURE NOTE. Introduction to Programming languages.
Topic: Binary Encoding – Part 2
Computers’ Basic Organization
The Machine Model Memory
Assembly Language for x86 Processors 6th Edition
Assembly Language (CSW 353)
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Microprocessor Systems Design I
Microprocessor Systems Design I
EPSII 59:006 Spring 2004.
Chapter 1 Data Storage.
COMP2121: Microprocessors and Interfacing
Introduction to Abstract Data Types
CSCE Fall 2013 Prof. Jennifer L. Welch.
CSCE 121: Simple Computer Model Spring 2015
Bits and Bytes Topics Representing information as bits
What time is it?. What time is it? Major Concepts: a data structure model: basic representation of data, such as integers, logic values, and characters.
Chapter 9 Instruction Sets: Characteristics and Functions
Lecture 2 SCOPE – Local and Global variables
Computer Instructions
CSCE Fall 2012 Prof. Jennifer L. Welch.
Introduction to Microprocessor Programming
Comp Org & Assembly Lang
Course Outline for Computer Architecture
COMPUTER ORGANIZATION AND ARCHITECTURE
Chapter 10 Instruction Sets: Characteristics and Functions
Dr. Clincy Professor of CS
Presentation transcript:

23/07/2016CSE1303 Part B lecture notes 1 Introduction to computer systems Lecture B01 Lecture notes section B01

23/07/2016CSE1303 Part B lecture notes 2 In this lecture  Outline of course  Bits  what a bit is and what it does  Memory  how bits are used to store information

23/07/2016CSE1303 Part B lecture notes 3 Outline  Bits and memory (1 lecture)  Numbers (4 lectures)  binary  unsigned  signed  floating point  Bit manipulation (1 lecture)  shifting  masking

23/07/2016CSE1303 Part B lecture notes 4 Outline  Characters and strings (1 lecture)  ASCII  command-line arguments  Compilers (1 lecture)  code generation  how compilers work  comparison with interpreters

23/07/2016CSE1303 Part B lecture notes 5 Outline  Assembly language (2 lectures)  MIPS  SPIM simulator  From C to MIPS (6 lectures)  control and data constructs  Analysis (1 lecture)  Computer hardware (1 lecture)

23/07/2016CSE1303 Part B lecture notes 6 Why?  To write good C, need to know how C works  how are pointers and arrays related? int foo(char *x) {... *(x+i) *(x+i)...} int foo(char x[]) {... x[i] x[i]...} =

23/07/2016CSE1303 Part B lecture notes 7 Why?  To write good C, need to know how C works  why do you use * and & to pass function parameters by reference? void func(int *ref) {... *ref *ref...} int main() { int x; int x;... func(&x) func(&x)...}

23/07/2016CSE1303 Part B lecture notes 8 Why?  To write good C, need to know how C works  how much time does it take to call a function? int main() { something something } void func() { something something} int main() { func() func() }

23/07/2016CSE1303 Part B lecture notes 9 Why?  To write good C, need to know how C works  how does a recursive function keep track of its local variables and parameters? int factorial(int n) { int result = 1; int result = 1; if (n > 1) if (n > 1) result = n * factorial(n - 1); result = n * factorial(n - 1); return result; return result;}

23/07/2016CSE1303 Part B lecture notes 10 Organization hierarchy Document Application High-level language (C) what happens here? Hardware more abstract

23/07/2016CSE1303 Part B lecture notes 11 What we’ll cover  Things you need to know as a programmer  efficiency  complexity  memory organization  representing data structures  Simple hardware implementation  digital logic and low-level architecture

23/07/2016CSE1303 Part B lecture notes 12 What we won’t cover  Advanced hardware implementation  Advanced computer architecture  interrupts  memory mapping and caching  pipelining for these, do CSE2302 and CSE2324/CSE3324for these, do CSE2302 and CSE2324/CSE3324

23/07/2016CSE1303 Part B lecture notes 13 Bits  The fundamental component of computer storage  Can hold one single binary piece of information onyestruehigh1offnofalselow0

23/07/2016CSE1303 Part B lecture notes 14 Grouping bits  One bit cannot hold much information  Bits are usually grouped to form larger sized “containers” of information  a byte = 8 bits of information  a word = 16, or 32, or 64 bits in size depending on computerdepending on computer a word size of 32 bits is used in this unit as this is the word size of the MIPS R2000 CPU)a word size of 32 bits is used in this unit as this is the word size of the MIPS R2000 CPU) so halfword = 16 bits, doubleword = 64 bitsso halfword = 16 bits, doubleword = 64 bits

23/07/2016CSE1303 Part B lecture notes 15 Addressing memory  To refer to a byte, need to distinguish it from other bytes one bit a byte (8 bits) another byte the byte we wish to access millions more in either direction

23/07/2016CSE1303 Part B lecture notes 16 Addressing: an analogy MEMORY LANE is for sale 42 44

23/07/2016CSE1303 Part B lecture notes 17 Addressing memory  Each memory location has a unique address  an address is an integer  no two memory locations have the same address  Addresses are sequential  lowest address 0  adjacent locations have consecutive addresses  highest address depends on the memory capacity of the computer  A location’s address is independent of its contents  changing the contents of a memory location does not alter its address

23/07/2016CSE1303 Part B lecture notes 18 Addressing memory Addresses 1 to 10,429 omitted from diagram for space Addresses 10,435 to 16,777,214 omitted from diagram for space This computer has 16,777,216 bytes (16 megabytes) of memory lower addresses higher addresses

23/07/2016CSE1303 Part B lecture notes 19 Addressing memory lower addresses higher addresses byte at address contains

23/07/2016CSE1303 Part B lecture notes 20 Looking for meaning  What does “ ” mean?  number 90?  ASCII character ‘Z’?  instruction DECB for Motorola 6800 CPU?  just bits?  Depends on context  bits have no intrinsic meaning  value depends on how it is being used  if interpreting as number, has value 90  if interpreting as character, has value ‘Z’  This is why C variables have types

23/07/2016CSE1303 Part B lecture notes 21 Encoding data structures  Memory is made up of bits  data structures must be encoded for storage  Numbers (integers)  encoded using the binary number system  Characters  encoded as numbers using ASCII code  Program code  instructions encoded as patterns of numbers and bits  Other structures ( struct s, float s,...)  usually converted to numbers

23/07/2016CSE1303 Part B lecture notes 22 Implementation of memory  A computer’s main (or high-speed) memory unit is implemented by semi- conductor based electronic circuits  simple logic gate circuits with feedback allow a 1-bit input value to be sampled and held into the future. (ie. bit value is remembered and can be read back later)  can group above into “byte” sized cells  can individually address (or access) each cell within a vast array of memory cells

23/07/2016CSE1303 Part B lecture notes 23 Covered in this lecture  Outline  Bits  bytes  words  Memory  used to store numbersnumbers program codeprogram code characterscharacters  access to each cell is by a unique address

23/07/2016CSE1303 Part B lecture notes 24 Next time  Numbers  binary representation  unsigned integers Reading: Lecture notes section B02