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.
Is ASCII the only way? For computers to do anything (besides sit on a desk and collect dust) they need two things: 1. PROGRAMS 2. DATA A program is a.
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 computer system) Computer Fundamental CIM2460 Bavy LI.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
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.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Introduction to Computing Using Python Chapter 6  Encoding of String Characters  Randomness and Random Sampling.
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.
Computer Programming I. Today’s Lecture  Components of a computer  Program  Programming language  Binary representation.
ICS312 Set 1 Representation of Numbers and Characters.
Lab 07: Caesar Cypher Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
©Contrinex JDC PPT_XF_BinHexDecASCII Encoding information J.-D. Chatelain.
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.
Representing Characters in a computer Pressing a key on the computer a code is generated that the computer can convert into a symbol for displaying or.
Binary System Presented by Mr. Wilhelmi Internal Representation of Data Input Input  Data that is put into the computer for processing Data Data  The.
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
Reasons to  Binary With Mrs
HNC COMPUTING - COMPUTER PLATFORMS 1 Micro Teach Binary.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
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
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.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Binary Representation in Text
Computer Science 210 Computer Organization
Understanding binary Understanding Computers.
BINARY CODE.
Numerical Representation
Data Transfer ASCII FILES.
Selection Structures (Part 1)
EPSII 59:006 Spring 2004.
Chapter 3 Data Representation
…to GCSE Level with Python Sue Sentance
RFID - EN Encoding information Encoding information J.-D. Chatelain.
Data Encoding Characters.
Data Representation ASCII.
Chapter 8 Namespaces and Memory Realities
Numerical Representation
String Encodings and Penny Math
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Presenting information as bit patterns
COMS 161 Introduction to Computing
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
Numerical Representation
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Chapter 8 Namespaces and Memory Realities
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Introduction to Strings
String Encodings and Penny Math
Electronic Memory.
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Digital Representation of Data
ASCII and Unicode.
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.

Thinking about this… A nibble is half a byte 0110 is one example How many numbers can a nibble store? Which numbers can a nibble store? Largest nibble/smallest nibble?

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

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

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

Programming in Python We will be using Python3 Install on your own computers or use one of the ITTC or Wright Hall labs Can install from http://www.python.org Walkthrough Be sure to use version 3 (not version 2)!

Problem Solving How do humans solve problems? Once we know that, how to we translate that to how a computer would solve a problem? Get in groups of two or three

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? What is the general purpose algorithm to solve this class of problem?

On Thursday and Friday We are going to look at How the computer does mathematics How do we assign names to things How do we put numbers in the computer and take them back out

For Lab Tomorrow Start reading chapter 1