Digital Representation

Slides:



Advertisements
Similar presentations
Review of HTML Ch. 1.
Advertisements

Digital Representation Everyone knows computers use bits and bytes … but what are they? © Lawrence Snyder, 2004.
Review Ch.1,Ch.4,Ch.7. Review of tags covered various header tags Img tag Style, attributes and values alt.
Bits and the "Why" of Bytes: Representing Information Digitally
Learning Objectives Explain the link between patterns, symbols, and information Determine possible PandA encodings using a physical phenomenon Encode.
Chapter 7 Representing Information Digitally. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Explain.
Using Binary Coding Information Remember  Bit = 0 or 1, Binary Digit  Byte = the number of bits used to represent letters, numbers and special characters.
Using Binary Coding Information Remember  Bit = 0 or 1, Binary Digit  Byte = the number of bits used to represent letters, numbers and special characters.
1. Discrete / Continuous Representations Of numbers – binary & decimal Bits Hexadecimal - 'Hex' Representing text Bits and Bytes.
Chapter 8_2 Bits and the "Why" of Bytes: Representing Information Digitally.
1 The Information School of the University of Washington Nov 6fit more-digital © 2006 University of Washington Digital Information INFO/CSE 100,
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
מבנה מחשב תרגול 2 ייצוג תווים בחומרה. A programmer that doesn’t care about characters encoding in not much better than a medical doctor who doesn’t believe.
Chapter 8_1 Bits and the "Why" of Bytes: Representing Information Digitally.
Chapter 7 Representing Information Digitally. Learning Objectives Explain the link between patterns, symbols, and information Determine possible PandA.
Chapter 8 Bits and the "Why" of Bytes: Representing Information Digitally.
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
COMPUTER FUNDAMENTALS David Samuel Bhatti
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 How we represent bits, numbers, letters?
Digital Information  digits are symbols chapter 8 BITS & THE “WHY” OF BYTES.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Representing Information Digitally Bits and the “Why” of Bytes lawrence snyder.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Introduction Lecture 01.
 Three components  Your misinformation page and images  The disclaimer page  Testing it with others  This week's labs are dedicated to Project 1B.
Data Representation, Number Systems and Base Conversions
DATA REPRESENTATION CHAPTER DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information.
The Information School of the University of Washington Oct 13fit digital1 Digital Representation INFO/CSE 100, Fall 2006 Fluency in Information Technology.
Learning Objectives Explain the link between patterns, symbols, and information Determine possible PandA encodings using a physical phenomenon Encode.
The Information School of the University of Washington 15-Oct-2004cse digital1 Digital Representation INFO/CSE 100, Spring 2005 Fluency in Information.
Computers: Information Technology in Perspective By Long and Long Copyright 2002 Prentice Hall, Inc. Encoding J. Holvikivi 2012.
1.4 Representation of data in computer systems Character.
Chapter 7 Representing Information Digitally. Learning Objectives Explain the link between patterns, symbols, and information Determine possible PandA.
Day 6 - Encoding and Sending Formatted Text
Some basic concepts underlying computer archi­tecture
Binary Representation in Text
Binary Representation in Text
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Chapter 8 & 11: Representing Information Digitally
Machine level representation of data Character representation
Digitizing Discrete Information
Day 6 - Encoding and Sending Formatted Text
Chapter 3 Data Storage.
Bits and the "Why" of Bytes: Representing Information Digitally
Communicating in the Blink of an Eye
Representing Information as bit patterns
TOPICS Information Representation Characters and Images
Representing Nonnumeric Data
Chapter 1 Data Storage.
Ch2: Data Representation
Fundamentals of Data Representation
Presenting information as bit patterns
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Chapter 2 Data Representation.
COMS 161 Introduction to Computing
Storing Negative Integers
How Computers Store Data
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Day 6 - Encoding and Sending Formatted Text
Announcements SGID Feedback! Thank you!! Readings:
Learning Intention I will learn how computers store text.
Abstraction – Number Systems and Data Representation
Chapter 3 - Binary Numbering System
Digital Representation of Data
ASCII and Unicode.
Presentation transcript:

Digital Representation INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 12/28/2018 fit100-08-digital

Readings and References Fluency with Information Technology Chapter 8, Bits and the "Why" of Bytes References JEdit java-based editor http;//www.jedit.org 12/28/2018 fit100-08-digital

Info Representation Digitization: representing information by any fixed set of symbols decide how many different items of information you want to represent Tic Tac Toe: 2 items - player 1 or player 2 decide how many "digits" or positions you want to use Tic Tac Toe: 1 position - a board square, 9 squares total decide on a set of symbols player 1:  player 2:  Not just 10 digit symbols! 12/28/2018 fit100-08-digital

Are two symbols enough?    One of the problems with encoding is have enough symbols to represent all possible patterns. We can represent each player's move this way, but what about representing the whole game? 12/28/2018 fit100-08-digital

Empty position:     use this set of symbols empty cell:  player 1:  player 2:  Now we can represent this game as one 9-digit length string:          How many possible game states are there? 333333333 = 39 = 19683 3 symbols X 9 squares = No. possible states No. of symbols X the length = No. of possible patterns or states. 12/28/2018 fit100-08-digital

Another encoding Now we can represent this game as one 9-digit number: use a different set of symbols empty cell: 0 player 1: 1 player 2: 2 2 1 Now we can represent this game as one 9-digit number: 2 0 0 1 1 2 0 0 0 How many possible game states are there? 333333333 = 39 = 19683 We can change the set of symbols, but we still get the same number of possible patterns, because the underlying game hasn’t changed! 12/28/2018 fit100-08-digital

Info in the Physical World The most fundamental representation of information is presence/absence of a phenomenon matter, light, magnetism, flow, charge, … detect: “Is the phenomenon present?” set: make phenomenon present or absent The PandA representation Any controllable phenomenon works: define it right 12/28/2018 fit100-08-digital

Info in the Logical World Information, reasoning, computation are formulated by true/false and logic All men are mortal Aristotle is a man Aristotle is mortal True and false can be the patterns for encoding information Is it a pair of pink glasses? 0 = false, 1 = true. 1 12/28/2018 fit100-08-digital

Connect Physical/Logical The power of IT comes from the fact that physical and logical worlds can be connected Present represents true / Absent represents false -- or maybe vice versa -- Pavement Memory This can be detected by using a magnetic medium, example: audio tape, floppy disk. If a positive magnetic polarity is detected than its present (1), else it’s a negative magnetic polarity which is false (0). false true false false false true true false true false true false false false 0 1 0 0 0 1 1 0 1 0 1 0 0 0 12/28/2018 fit100-08-digital

Bits PandA is a binary representation because it uses 2 patterns The word "bit" is a contraction for “binary digit” represents a position in space/time capable of being set and detected in 2 patterns Remember that our tic-tac-toe board had 3 patterns. Binary representation only contains 2 patterns. Sherlock Holme’s was trying to solve a robbery. He suspected that the dog knew the robber, because it didn’t bark. So the robber was the owner! Sherlock Holmes’s Mystery of Silver Blaze -- a popular example where “absent” gives information … the dog didn’t bark, that is the phenomenon wasn’t detected 12/28/2018 fit100-08-digital

Possible Interpretations of Bit Patterns It doesn’t matter what symbol we use for the representation. Could be x’s and o’s or anyone one of the above… 12/28/2018 fit100-08-digital

Assigning Symbols for Characters 26 uppercase and 26 lowercase letters in English, plus 10 digits, plus 20 basic punctuation characters = 95 distinct characters Representing this many characters in binary takes 7 bits! 26 (6 bits) gives 64 symbols 27 (7 bits) gives 128 symbols 7-bit code for characters is ASCII (American Standard Code for Information Interchange) 7-bit ASCII only supports English! And this was the defactor standard until quite recently. Then the Internet moved to 8-bit encoding. Why is that?!? How many characters can we represent using 8-bit? 256! 12/28/2018 fit100-08-digital

8-bit ASCII 0100 0110 0100 1001 0101 0100 12/28/2018 fit100-08-digital 8-bit ASCII supports English and most Western European Languages! 8-bit ASCII contains 256 symbols, including esc and blank space. 12/28/2018 fit100-08-digital

Bytes A byte is eight bits treated as a unit How many bytes?!? Adopted by IBM in 1960s A standard measure until very recently Bytes encode the Latin alphabet using ASCII -- the American Standard Code for Information Interchange IBM moved to 8-bit character encoding so that they could expand their international business. 3 bytes in the box! 0100 0110 0100 1001 0101 0100 How many bytes?!? 12/28/2018 fit100-08-digital

Unicode Although 8-bit ASCII is widely used, there is a problem!!! Doesn’t can’t support more than 256 characters This eliminates more than half of the world’s language from the character set Unicode is a 16-bit representation Supports 65,536 symbols Can handle all languages 16-bit representation requires 16 bits of information. There is 16 bits in the box. 0100 0110 0000 1001 12/28/2018 fit100-08-digital

Escape Codes Escape codes solve the problem of creating more symbols Put one symbol aside to be the esc symbol. Add esc symbol in front of another to create a new symbol Ctrl-N for example HTML uses 7-bit ASCII when transmitting data over the web HTML uses two special characters < > symbols What happens if you want those symbols to appear in the content? < >   Why is this a problem?!? 12/28/2018 fit100-08-digital

Hexadecimal Representation Computers can very fluently read the binary representations 0100001010101110101011110101010001010 Hex digits (base-16) numbers are used instead 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Easily represent 4-bit sequences 0010 1011 1010 1101 = 2BAD 0001 1011 0100 0000 = 1B40 Examples of hex in use: HTML color codes red = #FF0000 After about the first couple of bits, our eyes grow weary! 12/28/2018 fit100-08-digital

Encoding Information Bits and bytes encode the information, but that’s not all Tags encode format and some structure in word processors Tags encode format and some structure in HTML In the Oxford English Dictionary tags encode structure and some formatting So first we have some text that we want to communite. Then we use special tags to encode the format and structure so that it can be displayed in a special way. Then the computer encodes the text and the tags in bits and bytes so that the data can be transmitted. 12/28/2018 fit100-08-digital

Summary IT joins physical & logical domains so physical devices do our logical work Symbols represent things 1-to-1 Create symbols by grouping patterns PandA representation is fundamental presence and absence Can be represented in binary Bit, a place where 2 patterns set/detect ASCII is a byte encoding of Latin alphabet In addition to content, encode structure 12/28/2018 fit100-08-digital