(c) Epstein, Carter and Bollinger 2016 Chapter 17: Information Science Page | 1 CHAPTER 17: Information Science In this chapter, we learn how data can be encoded so that errors can be found. These are samples of some codes that you may recognize. 17.1 Binary Codes How many symbols do we need to use a base ten system? Could we create a system that used only two symbols such as On or Off? True or False? Yes or No? Tall or Short? Dot or Dash? A ____________ is short for binary digit and it is the smallest unit of information on a computer. It holds one of two possible values: typically 0 and 1 (which is what we will use). Encoding data using only two digits (bits) is called a ______________ system. It uses base two when displaying actual numbers (and not just writing a string of 0’s and 1’s). Example Convert the binary (base two) number 11010 to a decimal (base ten) number.
17
Embed
CHAPTER 17: Information Science In this chapter, we learn ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
( 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 2 0 1 6 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
CHAPTER 17: Information Science
In this chapter, we learn how data can be encoded so that errors can be
found. These are samples of some codes that you may recognize.
17.1 Binary Codes
How many symbols do we need to use a base ten system?
Could we create a system that used only two symbols such as On or Off?
True or False? Yes or No? Tall or Short? Dot or Dash?
A ____________ is short for binary digit and it is the smallest unit of
information on a computer. It holds one of two possible values: typically
0 and 1 (which is what we will use).
Encoding data using only two digits (bits) is called a ______________
system. It uses base two when displaying actual numbers (and not just
writing a string of 0’s and 1’s).
Example
Convert the binary (base two) number 11010 to a decimal (base ten)
number.
( 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 2 0 1 6 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 | 2
Example
Convert the decimal (base ten) number 88 to a binary (base two) number.
How many pieces of information can be distinguished using only 1 bit?
How many bits would we need to code 4 things, such as A, B, C, and D?
How many bits would we need to code the letters A – H?
If we had n bits, how many pieces of information could we encode?
If we have 8 bits, we call it a ____________. How many pieces of
information can be coded with a byte?
( 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 2 0 1 6 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 | 3
Example
A Mars lander has 16 different landing sites numbered 0 to 15. How
many bits will we need to code these sites?
How would these be numbered using the binary system?
0 is ______ 4 is ______ 8 is ______ 12 is ______
1 is ______ 5 is ______ 9 is ______ 13 is ______
2 is ______ 6 is ______ 10 is ______ 14 is ______
3 is ______ 7 is ______ 11 is ______ 15 is ______
Example
The closest Mars has been to Earth recently was 56 million km (2003).
The furthest apart is about 400 million km. We want to encode check
digits so our message about the landing site of the Mars lander can correct
for errors.
Let c1, c2, and c3 be check digits found in the following manner:
1. Place the message 𝑎1𝑎2𝑎3𝑎4 in the
overlapping parts of the circles as shown.
2. Choose the values of c1, c2, and c3 so that the
sum of the numbers in each circle is an even
number. (That is the same as saying that the
number of ones in each circle is an even
number).
( 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 2 0 1 6 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 | 4
(a) Find the check digits and write the complete code word for these sites.
0000_____ 0110_____ 1011_____
(b) Fix the error in the following code words, if there is only one error.
Received
code word 0101010 0001101 1001010
Corrected
code word
17.2 Encoding with Parity-Check Sums
_________ refers to whether a number is odd or even. So we say even
numbers have _____________ and odd numbers have _____________
In the previous section we chose the check digit, c, to be 0 or 1 so that the
sum of the numbers in each circle would have even parity.
( 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 2 0 1 6 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 | 5
If 1 2 3a a a is even, then c1 is ____ If the sum is odd then c1 is ____
If 1 3 4a a a is even, then c2 is ____ If the sum is odd then c2 is ____
If 2 3 4a a a is even, then c3 is ____ If the sum is odd then c3 is ____
The sums i j ka a a are called ___________________________.
A set of words composed of 0’s and 1’s that has a message and parity
check sums appended to the message is called a _________________
_______________. The resulting strings are called ______________.
The process of determining the message you were sent is called
_________________. You might be sent an encoded message that should
say v, but you receive the encoded message as u. We want to be able to
decode the message correctly, if possible.
The distance between two strings of equal length is the ____________ of
______________ in which the strings differ.
Example
Find the distance between the given pairs of strings.
(a) 1101 and (b) 10001 and (c) 01010101 and
1101 11001 10101010
Distance of _____ Distance of _____ Distance of _____
The ________________________ decoding method decodes a received
message as the code word that agrees with the message in the most
positions (has the smallest distance), provided there is only one such
message. If there is a tie, don’t decode.
( 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 2 0 1 6 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 | 6
Example
The table below provides the code words (4-digit sites with the 3 check
digits) for all 16 landing sites. Use this table to decode the received
messages, in (a) and (b). In both parts, the chart has been recopied and the
message in question has been repeated below each codeword of the chart.
0 0000000 4 0100101 8 1000110 12 1100011
1 0001011 5 0101110 9 1001101 13 1101000
2 0010111 6 0110010 10 1010001 14 1110100
3 0011100 7 0111001 11 1011010 15 1111111
(a) Received message: 0001000 Decoded code word: _____________
0 0000000
0001000
4 0100101
0001000
8 1000110
0001000
12 1100011
0001000
1 0001011
0001000
5 0101110
0001000
9 1001101
0001000
13 1101000
0001000
2 0010111
0001000
6 0110010
0001000
10 1010001
0001000
14 1110100
0001000
3 0011100
0001000
7 0111001
0001000
11 1011010
0001000
15 1111111
0001000
(b) Received message: 0010010 Decoded code word: _____________
0 0000000
0010010
4 0100101
0010010
8 1000110
0010010
12 1100011
0010010
1 0001011
0010010
5 0101110
0010010
9 1001101
0010010
13 1101000
0010010
2 0010111
0010010
6 0110010
0010010
10 1010001
0010010
14 1110100
0010010
3 0011100
0010010
7 0111001
0010010
11 1011010
0010010
15 1111111
0010010
( 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 2 0 1 6 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 | 7
The _____________ of a binary code is the minimum number of 1’s that
occur among all non-zero code words (message plus check digits) of that
code.
Example
What is the weight of the code we have been using for the landing sites?
C = {0000000, 0001011, 0010111, 0011100, 0100101, 0101110, 0110010,