CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.

Slides:



Advertisements
Similar presentations
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
Advertisements

1 Lecture-2 CSIT-120 Spring 2001 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
TCSS 371A Machine Organization. Getting Started Get acquainted Review syllabus Understand purpose, scope, and expectations of the course Discuss personal.
CSE 305 Introduction to Programming Languages
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
COMS W1004 Introduction to Computer Science June 11, 2008.
1 Lecture-2 CS-120 Fall 2000 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE 116 Introduction to Computer Science For Majors II Carl Alphonce 219 Bell Hall.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
REPRESENTING INFORMATION: BINARY, HEX, ASCII C ORRESPONDING R EADING : UDC C HAPTER 2 CMSC 150: Lecture 2.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
Simple Data Type Representation and conversion of numbers
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
CMPT 120 How computers run programs Summer 2012 Instructor: Hassan Khosravi.
Logic and data representation Revision. AND gate A B A B All inputs have to be true ( i.e 1) for the output of the gate to be high, in all other cases.
Computer Science 111 Fundamentals of Programming I Number Systems.
Binary Arithmetic & Data representation
CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall 1.
Number Systems Spring Semester 2013Programming and Data Structure1.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
1 Lecture 3 ENGRE 254 1/14/09. 2 Lecture 1 review Digital signals assume two values represented by “0” and “1”. Typically a “0” represents a voltage near.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Data Representation Bits, Bytes, Binary, Hexadecimal.
Binary System Presented by Mr. Wilhelmi Internal Representation of Data Input Input  Data that is put into the computer for processing Data Data  The.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Monday, January 14 Homework #1 is posted on the website Homework #1 is posted on the website Due before class, Jan. 16 Due before class, Jan. 16.
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Computer Science I CSCI Summer 2009 David E. Goldschmidt, Ph.D.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Topic: Binary Encoding – Part 1
BINARY CODE.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Data Encoding Characters.
Digital Concepts for PLCs
CSE 113 A January 12 – 16, 2009.
January 12 – 16, 2009 CSE 113 B.
COUNTING IN BINARY Binary weightings 0 x x x x 8
COMS 161 Introduction to Computing
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Presentation transcript:

CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1

Announcements If this is your first class, pick up a syllabus. Reminder: no recitations this week! 2

Today’s lessons A computer is a very simple machine. All information is encoded using bit strings. We decide how to interpret a bit string. We program computers using high- level languages. 3

physical vs. logical perspectives Physical reality: Logical view: WIRE Carries a HIGH voltage or a LOW voltage WIRE Carries a 1 or a 0 4

Idea 5

Controlling flow 0 6

1 7

Two in a row? 0 8

AND gate For which input values is output 1? For which input values is output 0? Inputs are on left Output is on right 9

OR gate For which input values is output 1? For which input values is output 0? Inputs are on left Output is on right 10

NOT gate For which input value is output 1? For which input value is output 0? Input is on left Output is on right 11

Flip-flop (a bit of memory!) S (set) R (reset) remembered value 12

Counting Decimal (base 10) etc. Binary (base 2) etc. 13

Bit string A ‘0’ or ‘1’ is a binary digit, or a bit. A sequence of bits is called a bit string. For example: –1101 is a bit string 14

Number systems Decimal (base 10) Each position is weighted by a power of 10. E.g. 734 = –7* *10 + 4*1 –7* * *10 0 E.g = –1* * *10 + 1*1 –1* * * *10 0 Binary (base 2) Each position is weighted by a power of 2. E.g. 111 = –1*4 + 1*2 + 1*1 = “seven” –1* * *2 0 E.g = –1*8 + 1*4 + 0*2 + 1*1 = “thirteen” –1* * * *2 0 15

Interpretation QUESTION: –What does the bit string 1101 represent? 16

Interpretation QUESTION: –What does the bit string 1101 represent? ANSWER: –Whatever we want it to represent! 17

Representations Binary (non-negative numbers) Two’s complement (integers) IEEE 754 (approx. floating point numbers) ASCII / EBCDIC / Unicode (characters) etc. 18

Questions? 19