Topic 1: Digital Data

Similar documents
8/13/16. Data analysis and modeling: the tools of the trade. Ø Set of numbers. Ø Binary representation of numbers. Ø Floating points.

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System?

Introduction to digital systems. Juan P Bello

Simple Interactions CS 105 Lecture 2 Jan 26. Matthew Stone

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

! Where are we on course map? ! What we did in lab last week. " How it relates to this week. ! Compression. " What is it, examples, classifications

Number Theory: Representations of Integers

ECE260: Fundamentals of Computer Engineering

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017

Name Period Date. RNS1.3 Scientific Notation Read and write large and small numbers. Use scientific notation to write numbers and solve problems.

Computer Number Systems

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1

Digital Electronics Part 1: Binary Logic

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

Chapter 1 - Introduction

Unit 3. Digital encoding

CSEN102 Introduction to Computer Science

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph

Digital Systems and Information Part II

ENGIN 112 Intro to Electrical and Computer Engineering

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

ICS141: Discrete Mathematics for Computer Science I

Cryptography Lecture 3. Pseudorandom generators LFSRs

CPE100: Digital Logic Design I

We say that the base of the decimal number system is ten, represented by the symbol

B. Converting Numbers in Base ten to other bases Example

hexadecimal-to-decimal conversion

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

Algorithms: Review from last time

ENGIN 112 Intro to Electrical and Computer Engineering

COURSE CONTENT for Computer Science & Engineering [CSE]

Lecture Notes. Advanced Discrete Structures COT S

( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1

Essentials of Intermediate Algebra

Students should be able to (a) produce a truth table from a given logic diagram

CS1800: Hex & Logic. Professor Kevin Gold

What are binary numbers and why do we use them? BINARY NUMBERS. Converting decimal numbers to binary numbers

Introduction to Algebra: The First Week

CS1800 Discrete Structures Final Version A

ECE 372 Microcontroller Design

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5)

Determining Conversion Factors for Metric Units

Week No. 06: Numbering Systems

CSCB63 Winter Week10 - Lecture 2 - Hashing. Anna Bretscher. March 21, / 30

Standard forms for writing numbers

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

Measurement and Instrumentation. Sampling, Digital Devices, and Data Acquisition

NUMBERS AND CODES CHAPTER Numbers

New Directions in Computer Science

1 Maintaining a Dictionary

Section 4.7 Scientific Notation

ANNA UNIVERSITY, CHENNAI AFFILIATED INSTITUTIONS R-2013 B.E. COMPUTER SCIENCE AND ENGINEERING I TO VIII SEMESTER CURRICULUM AND SYLLABUS SEMESTER I

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

CHAPTER 1. REVIEW: NUMBERS

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

CS4800: Algorithms & Data Jonathan Ullman

Representing Numbers on the Computer

Lesson 1: Natural numbers

Multi-Map Orbit Hopping Chaotic Stream Cipher

Term Definition Example. 3-D shapes or (3 dimensional) acute angle. addend. algorithm. area of a rectangle. array

CPSC 121 Midterm 1 Tuesday, October 11th, 2011

Measurement 4: Scientific Notation

Conversions between Decimal and Binary

CPSC 467: Cryptography and Computer Security

CMPT 889: Lecture 3 Fundamentals of Digital Audio, Discrete-Time Signals

CSE 20: Discrete Mathematics

Understanding Decimal Addition

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 7

2.6 Complexity Theory for Map-Reduce. Star Joins 2.6. COMPLEXITY THEORY FOR MAP-REDUCE 51

CPSC 467: Cryptography and Computer Security

Fundamentals of Mathematics I

(So SamID 1 ( ) = Ken W. Smith.)

Natural Language Processing Prof. Pawan Goyal Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Lecture 6: Introducing Complexity

Counting in Different Number Systems

TOPIC 3: READING AND REPORTING NUMERICAL DATA

Appendix: a brief history of numbers

Digital Circuits, Binary Numbering, and Logic Gates Cornerstone Electronics Technology and Robotics II

Chapter 2. A Look Back. 2.1 Substitution ciphers

BU CAS CS 538: Cryptography Lecture Notes. Fall itkis/538/

Finding Prime Factors

Efficient encryption and decryption. ECE646 Lecture 10. RSA Implementation: Efficient Encryption & Decryption. Required Reading

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

Information and Entropy. Professor Kevin Gold

CHAPTER 7. Exercises 17/ / /2 2 0

Eigenvalues and eigenvectors

CSE 241 Digital Systems Spring 2013

Number theory (Chapter 4)

Number Theory: Applications. Number Theory Applications. Hash Functions II. Hash Functions III. Pseudorandom Numbers

Arithmetic with Whole Numbers and Money Variables and Evaluation

Modern Digital Communication Techniques Prof. Suvra Sekhar Das G. S. Sanyal School of Telecommunication Indian Institute of Technology, Kharagpur

EECE 2510 Circuits and Signals, Biomedical Applications Final Exam Section 3. Name:

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

Math 230 Assembly Language Programming (Computer Organization) Numeric Data Lecture 2

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

CISC 1400 Discrete Structures

California 5 th Grade Standards / Excel Math Correlation by Lesson Number

NUMBERS It s the numbers that count

Introduction to Algorithms

Decision Trees. CSC411/2515: Machine Learning and Data Mining, Winter 2018 Luke Zettlemoyer, Carlos Guestrin, and Andrew Moore

Transcription:

Term paper: Judging the feasibility of a topic Is it a topic you are excited about? Is there enough existing research in this area to conduct a scholarly study? Topic 1: Digital Data ECS 15, Winter 2015 Lecture 3 Finding existing literature --- e.g., scholar.google.com, webofknowledge.com, pubmed.com (Note cited reference search see the follow-on work) What is my hypothesis? (What kind of interesting results can I expect to find?) How can I validate or invalidate my hypothesis? What are the implications of my conclusions? Some resources for research scholar.google.com Find articles on a particular topic Search through all follow-up work (i.e., papers that have hence cited the work of interest). apps.isiknowledge.com (Must be on ucdavis.edu network) (ISI Web of Knowledge/ Web of Science) (Like scholar.google.com only for scientific journal articles) UC Davis libraries (Thurs 1/22, Phoebe Ayers talk) Wikipedia (but look at page history to understand any controversies or debates) TED (Technology Entertainment and Design), Ideas worth spreading, www.ted.com Computer Science Theory of computation Software engineering Computer graphics Computer security and cryptography Computer networks Artificial intelligence Human-computer interface Bioinformatics Systems and architecture

Growth Mindset Test your mindset: Do you agree that intelligence is something about a person that he/she can t change very much? Strongly agree to strongly disagree Fixed mindset vs. growth mindset Can one learn to be good at computers? Yes, absolutely. And yes, absolutely worth your time and effort Google growth mindset for more information. Focus and concentration are skills! Practice distraction free hour Digital Data Binary and Hexadecimal numbers ASCII code and UNICODE Sampling and Quantitizing Example: sound Basic Concepts Binary and Hexadecimal numbers Number representation We are used to counting in base 10: 1000 100 10 1 10 3 10 2 10 1 10 0 ASCII code and UNICODE Example:.. thousands hundreds tens units Sampling and Quantitizing Example: sound 1 7 3 2 1000 100 10 1 1x1000+7x100+3x10+2x1 = 1732 digits Terminology: most-significant digit / least-significant digit

Number representation Computers use a different system: base 2: 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 Converting from base 2 to base 10 is simple. For instance: 1 1 0 1 1 0 0 0 1 0 0 bits 1024 512 256 128 64 32 16 8 4 2 1 1x1024+1x512+0x256+1x128+1x64+0x32+ 0x16+ 0x8 + 1x4 + 0x2 + 0x1 = 1732 Number representation Base 10 Base 2 0 0 1 1 2 10 3 11 4 100 5 101 6 110 253 11111101 254 11111110 255 11111111 Facts about Binary Numbers Binary numbers, 8 bits = 1 byte - Each digit of a binary number (each 0 or 1) is called a bit - 1 byte = 8 bits - 1 KB = 1 kilobyte = 2 10 bytes = 1024 bytes ( 1 thousand bytes) - 1 MB = 1 Megabyte = 2 20 bytes = 1,048,580 bytes ( 1 million bytes) - 1 GB = 1 Gigabyte = 2 30 bytes = 1,073,741,824 bytes ( 1 billion bytes) - 1 TB = 1 Tetabyte = 2 40 bytes = 1,099,511,627,776 bytes ( 1 trillion bytes) - A byte can represent numbers up to 255: 11111111 (base 2) = 255 (base 10) - The maximum number represented by a binary number of size N is 2 N - 1 - The maximum number represented by a binary number of size N is 2 N - 1 2 5 2 4 2 3 2 2 2 1 2 0 1 1 1 1 1 1 32 + 16 + 8 + 4 + 2 + 1 = 63 = 2 6 1 = 64-1 - A byte (8 bits) can represent numbers ranging from 0 up to 2 8-1 = 255. 11111111 (base 2) = 255 (base 10)

Algorithms to convert from base10 to base2 (Recall base2 to base10 simple and direct) 1. The modulus algorithm, bottom-up (determine least significant bit first) Let m be a base 10 number. Convert m to a base 2 number: 1. The bottom-up modulus algorithm (determine least significant bit first). The operation a % b (said a mod b ) returns the remainder when a is divided by b. 2. The top-down recursive algorithm (determine most significant bit first). From base 10 to base 2: 1877 %2 = 938 Remainder 1 938 %2 = 469 Remainder 0 469 %2 = 234 Remainder 1 234 %2 = 117 Remainder 0 117 %2 = 58 Remainder 1 58 %2 = 29 Remainder 0 29 %2 = 14 Remainder 1 14 %2 = 7 Remainder 0 7 %2 = 3 Remainder 1 3 %2 = 1 Remainder 1 1 %2 = 0 Remainder 1 Read off number from last determined back to first (to get ordering from most significant to least). 1877 (base10) = 11101010101 (base 2) 2. The recursive algorithm, top-down (determine most significant bit first and repeat) Let m be a base 10 number. Convert m to a base 2 number: 1. Identify biggest n such that 2 n m. 2. Place a 1 in the slot corresponding to 2 n. (The n+1 slot!) 3. Subtract: m = m 2 n 4. Repeat steps 1 to 3 with m=m, continue until m =0. Base 10: Base 2: Digital data: Base 10, Base 2, Base 16: 1000 100 10 1 10 3 10 2 10 1 10 0.. thousands hundreds tens units The digits are: 0 1 2 3 4 5 6 7 8 9 e.g., m = 1053. Step 1: 1 in 11 th slot (2 10 =1024); m = 1053-1024 = 29. Step 2: 1 in 5 th slot (2 4 =16); m = 29-16 = 13. Step 3: 1 in 4 th slot (2 3 =8); m = 13-8 = 5. Step 4: 1 in 3 rd slot (2 2 =4); m = 5-4 = 1. Step 5: 1 in 1 st slot (2 0 =1); m =0. So 1053 in base 10 = 10000011101 in base 2. 1024 512 256 128 64 32 16 8 4 2 1 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 The digits are: 0 1 Base 16: 256 16 1 16 2 16 1 16 0 The digits are: 0 1 2 3 4 5 6 7 8 9 A B C D E F

In class exercise, part I 1. Choose at random a base 2 number, of 8 digits in length, with four 1 s and four 0 s interspersed. Convert it to the corresponding base 10 number. Hexadecimal numbers While base 10 and base 2 are the most common bases used to represent numbers, others are also possible: base 16 is another popular one, corresponding to hexadecimal numbers 256 16 1 2. Choose at random a 4-digit base 10 number (less than 2048 is good). Make sure it is not a simple power of 2. Convert it into the corresponding binary number. 16 2 16 1 16 0 The digits are: 0 1 2 3 4 5 6 7 8 9 A B C D E F Example: 2 A F 256 16 1 2x256 + 10*16 + 15x1 = 687 Hexadecimal numbers Everything we have learned in base 10 should be studied again in other bases!! Example: multiplication table in base 16: Number representation Base 10 Base 2 Base 16 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F

Conversion: From base 2 to base 16, and back This is in fact easy!! - From base 2 to base 16: Example: 11011000100 Step 1: break into groups of 4 (starting from the right): 110 1100 0100 Step 2: pad left-most with 0, if needed: 0110 1100 0100 Step 3: convert each group of 4, using table: 6 C 4 Step 4: regroup: 6C4 11011000100 (base 2) = 6C4 (base 16) Conversion: From base 2 to base 16, and back From base 16 to base 2: Example: 4FD Step 1: split: 4 F D Step 2: convert each digit, using table: 0100 1111 1101 Step 3: Remove leading 0, if needed 100 1111 1101 Step 4: regroup: 10011111101 4FD (base 16) = 10011111101 (base 2) In class exercise, part II 3. Convert this hexadecimal number to base 10: 2A3F Basic Concepts Binary and Hexadecimal numbers ASCII code and UNICODE Sampling and Quantitizing Example: sound

ASCII American Standard Code for Information Interchange So far, we have seen how computers can handle numbers. What about letters / characters? The ASCII code was designed for that: it assigns a number to each character: A-Z: 65-90 a-z: 97-122 0-9: 48-57 UNICODE ASCII only contains 127 characters (though an extended version exists with 257 characters). This is by far not enough as it is too restrictive to the English language. UNICODE was developed to alleviate this problem: the latest version, UNICODE 5.1.0 contains more than 100,000 characters, covering most existing languages. For more information, see: http://www.unicode.org/versions/unicode5.1.0/ Basic Concepts Binary and Hexadecimal numbers ASCII code and UNICODE Sampling and Quantitizing Example: sound

Digital Sound What is sound? http://en.wikipedia.org/wiki/sound Transverse and longitudinal waves Sound is produced by the vibration of a media like air or water. Audio refers to the sound within the range of human hearing. Naturally, a sound signal is analog, i.e. continuous in both time and amplitude. These are analog, continuous waves. To store and process sound information in a computer or to transmit it through a computer network, we must first convert the analog signal to digital form using an analog-to-digital converter ( ADC ); the conversion involves two steps: (1) sampling, and (2) quantization. Sampling Sampling is the process of examining the value of a continuous function at regular intervals. Sampling Note that choosing the sampling rate is not innocent (not without consequence): Sampling usually occurs at uniform intervals, which are referred to as sampling intervals. The reciprocal of sampling interval is referred to as the sampling frequency or sampling rate. If the sampling is done in time domain, the unit of sampling interval is second and the unit of sampling rate is Hz, which means cycles per second. How do we choose the sampling rate?

How do we choose the sampling rate? Quantization Quantization is the process of limiting the value of a sample of a continuous function to one of a predetermined number of allowed values, which can then be represented by a finite number of bits. A higher sampling rate usually allows for a better representation of the original sound wave. However, when the sampling rate is set to twice the highest frequency in the signal, the original sound wave can be reconstructed without loss from the samples. This is known as the Nyquist theorem. Quantization (The allowed amplitudes) The number of bits used to store each intensity defines the accuracy of the digital sound: Adding one bit makes the sample twice as accurate