Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many.

Slides:



Advertisements
Similar presentations
Data compression. INTRODUCTION If you download many programs and files off the Internet, we have probably encountered.
Advertisements

My Special Number My Special Number Afrin12/10/2007.
Exclusive-OR and Exclusive-NOR Gates
Section 3.2: Using Check Digits
Error-Correcting codes
2 x0 0 12/13/2014 Know Your Facts!. 2 x1 2 12/13/2014 Know Your Facts!
CS 1 Introduction CS 1 Part 11. Hardware 1.Central Processing Unit (CPU) 2.Main Memory 3.Secondary Memory / Storage 4.Input Devices 5.Output Devices CS.
5 x4. 10 x2 9 x3 10 x9 10 x4 10 x8 9 x2 9 x4.
Cyclic Code.
Information Representation
Error Control Code.
The Binary Numbering Systems
Lecture 10 : Huffman Encoding Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Lecture notes : courtesy.
Huffman Encoding 16-Apr-17.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
MAT 1000 Mathematics in Today's World Winter 2015.
MAT 1000 Mathematics in Today's World Winter 2015.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many.
Spring 2015 Mathematics in Management Science Binary Linear Codes Two Examples.
Chapter 16: Identification Numbers Lesson Plan
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Summary of lecture 7 Error detection schemes arise in a range of different places, such as Travelers Checks airline tickets bank account numbers universal.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Ones group Thousands group Millions group Billions group Trillions group Three- Digit Groups (separated by commas) CHAPTER.
C Programming Lecture 3. The Three Stages of Compiling a Program b The preprocessor is invoked The source code is modified b The compiler itself is invoked.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
It is physically impossible for any data recording or transmission medium to be 100% perfect 100% of the time over its entire expected useful life. As.
IT253: Computer Organization
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Cosc 2150: Computer Organization
Bits, Bytes, Words Digital signal. Digital Signals The amplitude of a digital signal varies between a logical “0” and logical “1”. – The information in.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
What are the challenges? To know how to translate word problems into a workable mathematical equation. To know where to start and how to go about figuring.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
ENEE244-02xx Digital Logic Design Lecture 3. Announcements Homework 1 due next class (Thursday, September 11) First recitation quiz will be next Monday,
PREPARED BY: ENGR. JO-ANN C. VIÑAS
Barcodes! Felipe Voloch These notes and the barcode program are available at /barcode.html.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
Chap 14 Presentation Layer Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
MECH1500 Chapter 3.
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
Hamming Distance & Hamming Code
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
MAT199: Math Alive Error corretcing and compression Ian Griffiths Mathematical Institute, University of Oxford, Department of Mathematics, Princeton University.
Introduction to Programming
3.3 Fundamentals of data representation
2.8 Error Detection and Correction
Error Detection & Correction
Binary 1 Basic conversions.
Introduction to Chapter 2
Error Correcting Code.
Error Detection and Correction
Part III Datalink Layer 10.
Data Structures Mohammed Thajeel To the second year students
Packetizing Error Detection
Fundamentals of Data Representation
Chapter Nine: Data Transmission
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Huffman Encoding.
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
2.8 Error Detection and Correction
CHAPTER 69 NUMBER SYSTEMS AND CODES
Chapter 10 Error Detection and Correction
Presentation transcript:

Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many lots of tens we have.

Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many lots of tens we have. We can count in any base we like – e.g., base 5 (tally charts); base 12 (dozens); base 60 (time); base 2 (binary).

Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many lots of tens we have. We can count in any base we like – e.g., base 5 (tally charts); base 12 (dozens); base 60 (time); base 2 (binary). Addition works in any base we like, e.g., 9 in base 10 = 1001 in base 2 6 in base 10 = 110 in base = 1111 in base 2 = 15 in base 10 = 9 + 6

MAT199: Math Alive Error corretcing and compression Ian Griffiths Mathematical Institute, University of Oxford, Department of Mathematics, Princeton University

MAT199: Math Alive Error corretcing and compression Ian Griffiths Mathematical Institute, University of Oxford, Department of Mathematics, Princeton University correcting

Error correction Check digits – U.S. Postal Service money order

Error correction Check digits – U.S. Postal Service money order This number is the remainder when we add the other ten numbers together and divide by 9

Error correction and encoding Check digits - ISBNs This number is solely to check for errors

Error correction and encoding Universal Product Codes (U.P.C.)

Error correction and encoding Universal Product Codes (U.P.C.) Other things that use check digits include: Bank routing numbers Airline tickets QR Codes

Binary encoding – data compression In data compression binary codes are assigned in a way that minimizes the number of digits required, by choosing short codes for the most frequently occurring data.

Binary encoding – data compression A compression algorithm converts data that is easy to use into a format that is easy to transport. A common compression algorithm is a zip file. When this is uncompressed the file is unzipped you recover the original information. In data compression binary codes are assigned in a way that minimizes the number of digits required, by choosing short codes for the most frequently occurring data.

Binary encoding – data compression A compression algorithm converts data that is easy to use into a format that is easy to transport. A common compression algorithm is a zip file. When this is uncompressed the file is unzipped you recover the original information. In some cases not all of the information is recovered from the encoding. In such cases the data is returned only approximately to its original state: In data compression binary codes are assigned in a way that minimizes the number of digits required, by choosing short codes for the most frequently occurring data.

Binary encoding – data compression A compression algorithm converts data that is easy to use into a format that is easy to transport. A common compression algorithm is a zip file. When this is uncompressed the file is unzipped you recover the original information. In some cases not all of the information is recovered from the encoding. In such cases the data is returned only approximately to its original state: e.g., Joint Photographic Expert Group (jpeg) files and Motion Picture Expert Group (mpeg) files. (Graphics interchange format (gif) files recover all original information upon decoding.) In data compression binary codes are assigned in a way that minimizes the number of digits required, by choosing short codes for the most frequently occurring data.

Binary encoding – CDs The audio information on a CD is encoded in ridges on the disc which are read by a laser.

Binary encoding – CDs The audio information on a CD is encoded in ridges on the disc which are read by a laser. The data is coded using a Reed-Soloman code. The laser may misread a bump so there need to be error-correcting codes to handle single-bit errors. To solve this problem, extra data bits are added that allow the drive to detect single-bit errors and correct these.

Binary encoding – CDs The audio information on a CD is encoded in ridges on the disc which are read by a laser. The data is coded using a Reed-Soloman code. The laser may misread a bump so there need to be error-correcting codes to handle single-bit errors. To solve this problem, extra data bits are added that allow the drive to detect single-bit errors and correct these. The laser must be able to move between songs, so data needs to be encoded into the music telling the drive where it is on the disc. This problem is solved using what is known as subcode data which encodes position on the disc and song title. A scratch on the CD might cause a whole packet of bytes to be misread (known as a burst error). We are able to recover from such an event by interleaving the data on the disc, so that it is stored non-sequentially around one of the disc's circuits.

We can represent the five-digit code pictorially: Here we have marked each codeword with a different box (oval, double oval, solid rectangle, dashed rectangle). The codewords and errors dont overlap, but dont cover the whole space either.

The Hamming code

Summary of lecture 5 We wish to correct for one-bit errors using the minimum amount of extra memory. We define a perfect code as one in which the total number codes achievable (either correct or one-bit corrupted) is equal to the total available number of code combinations.

The Hamming code The Hamming code is a perfect code.

Summary of lecture 6 The Reed–Solomon code offers sophisticated error correction used in CDs and transmission of data: Eight-bit strings are encoded into ten-bit codes (like the Hamming codes that encode 4-digit strings into 7-digit codes). Each word in the RS-code is itself 8-bits long. Interleaving divides up the data by splitting into five pieces.

The Voyager 1 space probe is now the most distant human-made object from Earth at almost 10 billion miles away. The Voyager 1 space probe

The Voyager 1 space probe is now the most distant human-made object from Earth at almost 10 billion miles away. The probe is still transmitting information. The signal reached is now one hundred quintillion times weaker than when it was only a mile away ( times weaker). The Voyager 1 space probe

The Voyager 1 space probe is now the most distant human-made object from Earth at almost 10 billion miles away. The probe is still transmitting information. The signal reached is now one hundred quintillion times weaker than when it was only a mile away ( times weaker). The total power used by the transmitter is less than one eighth of an electric kettle. The signal can still be decoded because of error-correction schemes. The Voyager 1 space probe

American Express Travelers Checks

Add together the first nine digits: = Divide this number by 9 and take the remainder: Subtract this number from 9: If there are no errors then this is your final digit – this is a check digit.

American Express Travelers Checks Add together the first nine digits: =30. Divide this number by 9 and take the remainder: 3. Subtract this number from 9: 9-3=6. If there are no errors then this is your final digit – this is a check digit.

Airline tickets

Divide the ten digit number (without the final check digit) by 7 and take the remainder:

Airline tickets Divide the ten digit number (without the final check digit) by 7 and take the remainder: = remainder. 7

Airline tickets Divide the ten digit number (without the final check digit) by 7 and take the remainder: = remainder. 7 The remainder is the check digit.

American banking system

For a routing number a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 calculate: 7a 1 + 3a 2 + 9a 3 + 7a 4 + 3a 5 + 9a 6 + 7a 7 + 3a 8

American banking system For a routing number a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 calculate: 7a 1 + 3a 2 + 9a 3 + 7a 4 + 3a 5 + 9a 6 + 7a 7 + 3a 8 Take the remainder when you divide by 10 and this is the check digit.

American banking system For a routing number a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 calculate: 7a 1 + 3a 2 + 9a 3 + 7a 4 + 3a 5 + 9a 6 + 7a 7 + 3a 8 Take the remainder when you divide by 10 and this is the check digit. In example above, 7x1 + 3x2 + 9x1 + 7x3 + 3x0 + 9x1 + 7x5 + 3x7 = = 10 remainder 8 10

American banking system For a routing number a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 calculate: 7a 1 + 3a 2 + 9a 3 + 7a 4 + 3a 5 + 9a 6 + 7a 7 + 3a 8 Take the remainder when you divide by 10 and this is the check digit. In example above, 7x1 + 3x2 + 9x1 + 7x3 + 3x0 + 9x1 + 7x5 + 3x7 = = 10 remainder 8 Check digit is 8. 10

The barcode encodes the numbers beneath it. In this example the barcode reads: separator left side: separator right side: separator Universal Product Codes (barcodes) Separator The binary code is then decoded using the following decryption:

Other uses for barcodes

ISBNs Check digit

ISBNs Check digit In ISBN codes we add the first number times 10, the second times 9, and so on: 10x3+9x8+8x8+7x0+6x5+5x3+4x1+3x0+2x1=217

ISBNs Check digit In ISBN codes we add the first number times 10, the second times 9, and so on: 10x3+9x8+8x8+7x0+6x5+5x3+4x1+3x0+2x1=217 We then divide this number by 11 and take the remainder 217/11=19 remainder 8.

ISBNs Check digit In ISBN codes we add the first number times 10, the second times 9, and so on: 10x3+9x8+8x8+7x0+6x5+5x3+4x1+3x0+2x1=217 We then divide this number by 11 and take the remainder 217/11=19 remainder 8. We then subtract this number from 11 to get our check digit, 3.

ISBNs What errors can we detect? We can detect ALL single errors. We can detect ALL transpositions.

ISBNs What errors can we detect? We can detect ALL single errors. We can detect ALL transpositions. The only inconvenience is if the check digit turns out to be 10 (double figures). In this case we write X for the check digit.

The ZIP bar code The ZIP bar code consists of 52 long and short bars at the bottom of a letter. The bars at the start and the end are just guard lines.

The ZIP bar code Every group of five digits encodes one digit using the following code:

The ZIP bar code Every group of five digits encodes one digit using the following code: This gives, in the previous example, the ZIP+4 code

The ZIP bar code Every group of five digits encodes one digit using the following code: This gives, in the previous example, the ZIP+4 code The 1 is a check digit. This makes sure the sum of all the digits is an exact multiple of 10. (In this case the sum of the digits is 40.)

The ZIP bar code There is also additional error correction: each group of five bars has exactly two long and three short bars.

The ZIP bar code There is also additional error correction: each group of five bars has exactly two long and three short bars. If you have an incorrect digit you can use the sum of the other digits to work out what this should be (by ensuring the sum of all digits is an exact multiple of 10).

The ZIP bar code There is also additional error correction: each group of five bars has exactly two long and three short bars. If you have an incorrect digit you can use the sum of the other digits to work out what this should be (by ensuring the sum of all digits is an exact multiple of 10). More recent codes use 12 digits rather than 10, though the sum still adds up to an exact multiple of 10.