Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst,

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Chapter 7 End-to-End Data
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.
Software Design Analysis of Algorithms i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Marti Hearst, or Goodrich & Tamassia.
I206: Distributed Computing Applications & Infrastructure Fall 2010.
Spatial and Temporal Data Mining
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
Computer Science 335 Data Compression.
Software Design i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, Marti Hearst, or James Landay.
Inter-Process Communication i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg; Calvert and Donahoo.
Operating System & Memory Hierarchy i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, or Marti Hearst.
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.
Course Review i206 Fall 2010 John Chuang. 2 Outline  Test 3 topics  Course review  Course evaluation.
Distributed Systems & Networks i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
Networking and Internetworking i206 Fall 2010 John Chuang.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Dale & Lewis Chapter 3 Data Representation
1 Part I: Machine Architecture 4 A major process in the development of a science is the construction of theories that are confirmed or rejected by experimentation.
Compression Algorithms Robert Buckley MCIS681 Online Dr. Smith Nova Southeastern University.
ECE242 L30: Compression ECE 242 Data Structures Lecture 30 Data Compression.
Computers and Scientific Thinking David Reed, Creighton University Data Representation 1.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
1 Analysis of Algorithms Chapter - 08 Data Compression.
1 i206: Lecture 18: Regular Expressions Marti Hearst Spring 2012.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
The Beauty and Joy of Computing Lecture #3 : Creativity & Abstraction UC Berkeley EECS Lecturer Gerald Friedland.
1 i206: Lecture 9: Review; Intro to Algorithms Marti Hearst Spring 2012.
Chapter 1: Data Storage.
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much.
22-Oct-15CPSC558: Advanced Computer Networks Chapter 7 End-to-End Data –Data Manipulating Functions (Affecting Throughputs) How to encode the message into.
Group No 5 1.Muhammad Talha Islam 2.Karim Akhter 3.Muhammad Arif 4.Muhammad Umer Khalid.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Spring 2001CS Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
1 Multimedia Outline Compression RTP Scheduling. 2 Compression Overview Encoding and Compression –Huffman codes Lossless –data received = data sent –used.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Data Compression: Huffman Coding in Weiss (p.389)
Chapter 1: Data Storage.
Computer Science: An Overview Eleventh Edition
Everything is a number Everything in a computer memory and on storages is a number. Number  Number Characters  Number by ASCII code Sounds  Number.
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Data Compression.
Data Compression CS 147 Minh Nguyen.
Chapter 1 Data Storage.
i206: Lecture 20: Memory Management; Operating Systems
The Building Blocks: Binary Numbers, Boolean Logic, and Gates
15 Data Compression Foundations of Computer Science ã Cengage Learning.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear

John Chuang2 Computer Organization Bits & Bytes Binary Numbers Number Systems Gates Boolean Logic Circuits CPU Machine Instructions Assembly Instructions Program Algorithms Application Memory Data compression Compiler/ Interpreter Operating System Data Structures Analysis I/O Memory hierarchy Design Methodologies/ Tools Process Truth table Venn Diagram DeMorgan’s Law Numbers, text, audio, video, image, … Decimal, Hexadecimal, Binary AND, OR, NOT, XOR, NAND, NOR, etc. Register, Cache Main Memory, Secondary Storage Context switch Process vs. Thread Locks and deadlocks Op-code, operands Instruction set arch Lossless v. lossy Info entropy & Huffman code Adders, decoders, Memory latches, ALUs, etc. Data Representation Data storage Principles ALUs, Registers, Program Counter, Instruction Register Network Distributed Systems Security Cryptography Standards & Protocols Inter-process Communication Searching, sorting, Encryption, etc. Stacks, queues, maps, trees, graphs, … Big-O UML, CRC TCP/IP, RSA, … Confidentiality Integrity Authentication … C/S, P2P Caching sockets Formal models Finite automata regex

John Chuang3 Computers of Different Shapes and Sizes

John Chuang4 Computer System Components 1.Hardware – provides basic computing resources (CPU, memory, I/O devices, network) 2.Operating system – controls and coordinates the use of the hardware among the various application programs for the various users 3.Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs) 4.Users (people, machines, other computers) Source: Silberschatz, Galvin, Gagne

John Chuang5 Typical Computer System Hardware Components Brookshear Fig 2.13  Question: What happens in a computer system when I execute an application program?

John Chuang6 Data Representation Bits & Bytes Binary Numbers Number Systems Gates Boolean Logic Circuits CPU Machine Instructions Assembly Instructions Program Algorithms Application Memory Data compression Compiler/ Interpreter Operating System Data Structures Analysis I/O Memory hierarchy Design Methodologies/ Tools Process Truth table Venn Diagram DeMorgan’s Law Numbers, text, audio, video, image, … Decimal, Hexadecimal, Binary AND, OR, NOT, XOR, NAND, NOR, etc. Register, Cache Main Memory, Secondary Storage Context switch Process vs. Thread Locks and deadlocks Op-code, operands Instruction set arch Lossless v. lossy Info entropy & Huffman code Adders, decoders, Memory latches, ALUs, etc. Data Representation Data storage Principles ALUs, Registers, Program Counter, Instruction Register Network Distributed Systems Security Cryptography Standards & Protocols Inter-process Communication Searching, sorting, Encryption, etc. Stacks, queues, maps, trees, graphs, … Big-O UML, CRC TCP/IP, RSA, … Confidentiality Integrity Authentication … C/S, P2P Caching sockets Formal models Finite automata regex

John Chuang7 Data Representation  All data stored in and manipulated by a digital computer are represented by patterns of bits: -Numbers -Text characters -Sound -Images and videos -Anything else…  Bit = Binary Digit = a symbol whose meaning depends on the application at hand  Binary: takes on values of ‘0’ or ‘1’ -Or equivalently, “FALSE” or “TRUE”, “OFF” or “ON”

John Chuang8

9 Number System  Hexadecimal Notation (Base 16) particularly useful as shorthand notation for streams of bits -Long bit streams are difficult to make sense of -The lengths of most bit streams used in a machine are multiples of four. -Hexadecimal notation is more compact. -Less error-prone to manually read, copy, or write  Example: Ethernet MAC addresses -48 binary bits --> 12 hexadecimal digits -e.g., 00:1e:c2:b7:e9:77

John Chuang10 Decimal-Binary Conversion Decimal to binary: Binary to decimal:

John Chuang11 Binary Representation of Fractions and Floating-Point Numbers

John Chuang12 Representing text  Each printable character (letter, punctuation, etc.) is assigned a unique bit pattern. -ASCII = 7-bit values for most symbols used in written English text (see Appendix A in Brookshear) -Unicode = 16-bit values for most symbols used in most world languages today -ISO proposed standard = 32-bit values  Example: the message ‘Hello.’ in ASCII encoding

John Chuang13 Audio Encoding  Telephone: -8,000 samples per second -8 bits per sample -  64 kbps  CD-quality audio: -44,100 samples per second -16 bits per sample -2 channels for stereo -  1.4 Mbps -  60 minute music CD takes ~630MB  Many audio encoding standards (e.g., H.323 for Voice- over-IP, MP3 for music) The sound wave represented by the sequence 0, 1.5, 2.0, 1.5, 2.0, 3.0, 4.0, 3.0, 0

John Chuang14 Representation of Images and Video  Image encoding: -Number of bits per pixel (e.g., 24 bits for RGB color) -Number of pixels in image (e.g., 480*640)  Video encoding: -Number of bits per pixel -Number of pixels per frame -Number of frames per second

John Chuang15 Video Encoding Examples  Uncompressed video: -8 bits per pixel -480*640 pixels per frame -24 frames per second -  56 Mbps  Uncompressed HDTV: -24 bits per pixel -1920*1080 pixels per frame frames per second -  Mbps 1.5 Mbps MPEG1 Compression Mbps MPEG2 Compression

John Chuang16 Data Compression  Encoding data using fewer bits  Many encoding standards (e.g., JPEG, MPEG, MP3) includes data compression  Lossless -data received = data sent -used for executables, text files, numeric data  Lossy -data received != data sent -used for images, video, audio

John Chuang17 JPEG  JPEG: Joint Photographic Expert Group (ISO/ITU)  Lossy still-image compression  Three phase process -process in 8x8 block chunks (macroblock) -DCT: transforms signal from spatial domain into and equivalent signal in the frequency domain (loss-less) -apply a quantization to the results (lossy) -RLE-like encoding (loss-less)  Compression ratio of 30-to-1 typical Source image JPEG compression DCTQuantizationEncoding Compressed image

John Chuang18 MPEG  Motion Picture Expert Group  Lossy compression of video -First approximation: JPEG on each frame -Also remove inter-frame redundancy  Frame types -I frames: intrapicture -P frames: predicted picture -B frames: bidirectional predicted picture  Example sequence transmitted as I P B B I B B  Compression Ratio: typically 90-to to-1 for I frames; P/B frames get another 3-5 x Frame 1Frame 2Frame 3Frame 4Frame 5Frame 6Frame 7 I frameB frame P frameB frame I frame MPEG compression Forward prediction Bidirectional prediction Compressed stream Input stream

John Chuang19 Video Encoding (with Compression)  Uncompressed video: -8 bits per pixel -480*640 pixels per frame -24 frames per second -  56 Mbps  Uncompressed HDTV: -24 bits per pixel -1920*1080 pixels per frame frames per second -  Mbps 1.5 Mbps MPEG1 Compression Mbps MPEG2 Compression

John Chuang20 MP3  MPEG Audio compression  Three layers with different data rates:  MP3 is actually MPEG-1 Layer III CodingBit rateCompression Factor Layer I384 kbps4 Layer II192 kbps8 Layer III128 kbps12

John Chuang21 Data Compression Entropy Encoding  Recall that ASCII coding uses a fixed 7 bits to represent characters  Can we devise a more intelligent encoding scheme given knowledge that some characters (e.g., “a”, “e”) occur more frequently than others (e.g., “q”, “z”)?  Huffman code: variable length entropy encoding -Intuition: assign shorter codes for characters that occur more frequently

John Chuang22 Information Theory in One Slide  Claude Shannon, 1948  {M} = M 1, M 2, …, M i, …, M N  P i = probability of occurrence of M i  Entropy, I i = log 2 (1/P i ) -Information entropy is a measure of the uncertainty associated with a random variable

John Chuang23 Huffman Coding  Choose codes such that messages with higher entropy has longer code lengths  Given: messages with known weights (probabilities of occurrence) -Construct binary tree with each message as a leaf node -Iteratively merge two nodes with lowest weights -Assign bits (0/1) to each branch -Read binary tree from root to leaf to obtain code for each message  Performance: -L i = code length for M i -Average message length L M = Sum[P i *L i ] -Average information per message = Sum[P i *I i ] MessageCode a10 a210 a3111 a4110

John Chuang24 Summary  Different types of data (e.g., numbers, text characters, sounds, images, videos) can all be represented using binary bits  Compression techniques allow compact encoding of information  There are many standards for encoding different data types -Compression often part of encoding standard  Up next: how these binary represented data can be stored, communicated, and operated upon

John Chuang25 Upcoming Events  Follow-up reading for today’s lecture: -Wikipedia articles on ‘information theory’ and ‘huffman coding’  Reading assignment for next lecture: -Brookshear Chapter , Appendix C -Optional: Brookshear Chapter 2.6