Intro to Computer Science CS1510 Dr. Sarah Diesburg

Slides:



Advertisements
Similar presentations
Computer Codes Rohit Khokher. Computer Codes Data types NumericNonnumeric IntegerRealAlphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9 Special Characters.
Advertisements

ICS312 Set 2 Representation of Numbers and Characters.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
CS 240: Data Structures Binary Representations. Binary Binary is a numerical system that is used to represent numeric values. Binary is a numerical system.
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
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.
Data Representation in Computers
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Binary Numbers.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
What is the ASCII Code? The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
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.
Binary Arithmetic & Data representation
Binary Code.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
ICS312 Set 1 Representation of Numbers and Characters.
Lab 07: Caesar Cypher Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
Numerical Representation Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg 1.
Section 3.1: Number Representation Practice HW (not to hand in) From Barr Text p. 185 # 1-5.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
Lab 07: Caesar Cypher Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
CSE1301 Computer Programming Lecture 32: Number Representation
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
Problem Solving Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
Understanding Computers
11001 / 101, / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
1.4 Representation of data in computer systems Character.
Introduction to computer science Lec2 cs111. Extended Binary Coded Decimal Interchange Code (EBCDIC) is an 8- bit character encoding used mainly on.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Understanding binary Understanding Computers.
Binary 1 Basic conversions.
BINARY CODE.
11001 / 101 , / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the.
Numerical Representation
Data Transfer ASCII FILES.
1.11, 1.12, 1.13, 1.14, 1.18, 1.20, 1.23, 1.24, 1.25, 1.32, 1.33 ( 47 )8 = ( )2 ( 47 )16 = ( )2 ( 20 )10.
Selection Structures (Part 1)
EPSII 59:006 Spring 2004.
Number Systems.
Breaking the Code Can anyone guess the phrase from this “code”?
Data Encoding Characters.
Numerical Representation
More Nested Loops and Lab 5
Chapter 8 Characters In Java single characters are represented using the data type char. Character constants are written as symbols enclosed in single.
String Encodings and Penny Math
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Dr. Clincy Professor of CS
Presenting information as bit patterns
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Numerical Representation
Intro to Computer Science CS1510 Dr. Sarah Diesburg
String Encodings and Penny Math
FIGURE 1-1 Examples of Voltage Ranges and Waveforms for Binary Signals
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Digital Representation of Data
Numerical Representation
Presentation transcript:

Intro to Computer Science CS1510 Dr. Sarah Diesburg Problem Solving Intro to Computer Science CS1510 Dr. Sarah Diesburg

Numeric representation We usually work with decimal numbers with digits from 0 to 9 and powers of 10 7313 = (7 * 1000 + 3 * 100 + 1 * 10 + 3 * 1) Or (7 * 103 + 3 * 102 + 1 * 101 + 3 * 100) The binary number system uses digits 0 and 1 and powers of 2 0101 = (0 * 8 + 1 * 4 + 0 * 2 + 1 * 1) Or (0 * 23 + 1 * 22 + 0 * 21 + 1 *20) = 5 See http://computer.howstuffworks.com/bytes1.htm for more information on number systems and binary numbers.

Your turn #1 126 How would you write the following numbers in binary? Example: 14 = 8 + 4 + 2 -> 00001110 126

Your turn #2 What unsigned decimal numbers are represented by the following binary numbers? Example: 00000101 = 5 01000100 00001101 10110011

Encoding Binary numbers can represent more things than just integers Another example is ASCII American Standard Code for Information Interchange Character encoding scheme based on the English alphabet http://en.wikipedia.org/wiki/ASCII

Problem Solving How do humans solve problems? Once we know that, how to we translate that to how a computer would solve a problem? Programming is like a recipe

Problem #1 Suppose that on a recent trip, you left Cedar Falls with a full tank of gas and your odometer read 64783 miles. When you returned, your odometer read 64969 miles. You refilled your gas tank with 8 gallons of gas. What was your mileage per gallons (or MPG)?

Problem #1 What is the answer? How did you arrive at this specific answer?