15 September How Computers Work: Other Forms of Data.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

3.1 3 Data Storage Foundations of Computer Science  Cengage Learning.
The Binary Numbering Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Connecting with Computer Science, 2e
Representing Information as Bit Patterns
Chapter 3 Data Representation.
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
Data Representation Kieran Mathieson. Outline Digital constraints Data types Integer Real Character Boolean Memory address.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 12 Data.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Simple Data Type Representation and conversion of numbers
Higher Computing Data Representation.
Binary Representation. Binary Representation for Numbers Assume 4-bit numbers 5 as an integer  as an integer  How? 5.0 as a real number  How?
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Computing Higher - Unit 1… Computer Systems 1 Higher Computing Unit 1 – Topic 1 Data Representation.
Bits & Bytes: How Computers Represent Data
Computers and Scientific Thinking David Reed, Creighton University Data Representation 1.
Computer Math CPS120: Data Representation. Representing Data The computer knows the type of data stored in a particular location from the context in which.
IT253: Computer Organization
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Chapter 2 Computer Hardware
Shawlands Academy Higher Computing Data Representation.
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Data Representation.
Data Representation The method of data representation in a computer system depends upon the type of data which is being used. Three types of data are considered.
Number Systems Spring Semester 2013Programming and Data Structure1.
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
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.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Data Representation, Number Systems and Base Conversions
Data Representation Robin Burke IT 130. Outline Data Representation Binary Numbers Image types.
Data Representation The storage of Text Numbers Graphics.
Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
1 Information Representation in Computer Lecture Nine.
Data Encoding COSC Computers and Data Computers store information as sequences of bits Computers store many types of data: numbers text audio images.
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,
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
OCR Computing OGAT Data Types. What OCR need you to know… Data Types a) Primitive data types, integer, real/floating point, character,
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Chapter 1: Data Storage.
Floating Point Numbers
Floating Point Representations
Fundamentals of Computer Science
Binary Representation in Text
Binary Representation in Text
Data Representation.
Chapter 3 Data Storage.
Computer Systems – Unit 1
Storing Negative Integers
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Representation of real numbers
ASCII and Unicode.
Presentation transcript:

15 September How Computers Work: Other Forms of Data

Current events Court Rules Against Pennsylvania Law That Curbs Child-Pornography Sites law forced Internet service providers to block customers' access to Web sites thought to be distributing child pornography

Review: Integers Binary Stored in words (32 bits) or half-words (16 bits) Two’s complement used to store negative numbers Max positive integer = 2 n-1 - 1

Questions?

Using Integers Not always whole numbers Invisible decimal points Can be used to represent fractional units 1 = 1 cent 1 = 1 ml Using integers avoids rounding errors

Floating Point Numbers Represent much larger number Scientific notation x Mantissa exponent Three Parts Sign Bit Exponent Mantissa

From Microsoft Calculator Understanding Extended Precision: Extended Precision, a feature of Calculator, means that all operations are accurate to at least 32 digits. Calculator also stores rational numbers as fractions to retain accuracy. For example, 1/3 is stored as 1/3, rather than.333. However, errors accumulate during repeated operations on irrational numbers.

Dates Lots of formats for dates Some store month, day, year Some store a day and year Some store a single number Different origins Different amount of space to store

Lots of Calendars

Excel Microsoft Excel stores dates as sequential numbers. January 1, 1900 is 1 January 1, 2008 is (39,448 days after January 1, 1900) Stores times as decimal fractions because time is considered a portion of a day. Except, on the Macintosh, 1 = January 1, 1904! Rules on interpreting 2 digit years …

Y2K What was the problem? What caused the problem? Was the problem limited to our calendar? How did people solve the problem? How would you have solved the problem?

Text Need to represent characters All data in the computer is stored as _____ Letter a question of interpretation Also includes some control: new line, tab, … Not font: the appearance is referred to as a glyph Representations ASCII, EBCDIC, UNICODE, … ASCII simplest Most applications moving to UNICODE

Valuable Characteristics Collating sequence Simple upper/lower case Support of all languages Other?

ASCII Some encodings Space: X’20’ (20 16 ) 2: X’32’ … 9: X’39’ A: X’41’ … Z: X’5A’ a: X’61’ … z: X’7A’

ASCII collating Space: X’20’, 2: X’32’, A: X’41’, a: X’61’ … z: X’7A’ For collating sequence, where should punctuation be? General rule: space < punctuation < number < letter Most common punctuation X’21’ – X’2F’ How to deal with case? Collating sequence is case insensitive Need to force to uppercase

Uppercase algorithm A (41 16 ) a (61 16 ) Z (5A 16 ) z (7A 16 ) To uppercase a letter, simply turn off the bit xx0x xxxx

Multiple languages Used to have complete different set of encodings for each language, called code pages Unicode is fundamentally 2-bytes Preserves the ASCII values Doubles the size of files

Formatted Documents Not all formatting information is included in the character information We already mentioned font Two ways to handle formatting WYSIWYG (What You See Is What You Get) Word DOC PDF (Adobe) Formatting language HTML used for web

Graphics Two fundamental methods of storing data Bit maps – individual dots to be displayed Vector graphics – lines to be displayed When using bit graphics, need intelligent way to store Compression techniques Long strings of the same value Minor changes from picture to picture JPEG, MPEG, …

Coming Attractions Next week we start talking about how computers have affected society Assignment Scan references (94, 95, 00) See course home page Identify key impacts at different levels (for discussion not handing in) Personal Community National Global Future

Take Home Quiz When? Handed out on the 20 th Due the 22nd Will have time for questions on Monday Intended to be a 30 minute test Not timed