The number of bits used to produce a 1 second recording is: #channels * #samples per second * #bits per sample. The number of seconds that fit onto a storage device is: #bits in the storage device / #bits in 1 second recording. Since the problem asks for the number of hours, we'll divide the answer by 3600, which is the number of seconds in one hour.
CD Quality :
# bits in one second recording = 2*44100*16 = 1411200 bits.
# hours that fits in 8 Gbyte of storage = 8000000000/(1411200 * 3600) = 1.57 hour
Radio Quality :
# bits in one second recording = 22050*8 = 176400 bits.
# hours that fits in 8 Gbyte of storage = 8000000000/(176400 * 3600) = 12.6 hour
The truth table for
the boolean expression (x or y) and (!x or !y):
x | y | x or y | !x or !y | (x or y) and (!x or !y) |
---|---|---|---|---|
0 | 0 | 0 | 1 | 0 |
0 | 1 | 1 | 1 | 1 |
1 | 0 | 1 | 1 | 1 |
1 | 1 | 1 | 0 | 0 |
Write an expression using AND, OR, and NOT for the Boolean function given in this truth table:
x | y | z | f(x,y,z) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
Notice how each expression is only true for one possible assignment of x, y, and z - one row of the table. Now we combine them to get:
(!x AND y AND z) OR (x AND !y AND z) OR (x AND y
AND
!z) OR (x AND y AND z)
Note that this expression can be simplified to (x AND y) OR (x
AND
z) OR (y AND z)
How many different Boolean functions of two variables are there?
Equivalently, how many ways can we fill in the following
truth table?
x | y | f(x,y) |
---|---|---|
0 | 0 | ? |
0 | 1 | ? |
1 | 0 | ? |
1 | 1 | ? |
There are four blank entries, each of which can be either zero or one. So the number of different ways one can fill it in is 2x2x2x2 = 16 different ways.
Each set of entries can be turned into a boolean expression (as shown in the last exercise,) and so there are 16 distinct boolean expressions.
Errors occurred in the strings with an even number of 1s, since they were sent with odd parity .
Those strings were 11011, 00000, 10001.
Remember, zero is an even number!
If we encode a symbol as its ASCII value three times, we can then correct any 1-bit error. A 1-bit error can only corrupt one of the 8-bit chunks, so the other two will remain the same, and we can find the corrupted bit.
On the other hand, we cannot correct every two-bit error if it occurred in the same bit position in two of the bit patterns.
For example,:
01001101 01001100 01001101 = 77 76 77 = "MLM"
This was the string generated by the letter 'L,' with two bits corrupted, each in a different block. Note that not all 3-bit errors can even be detected, if the three error bits occur in the same bit position in all the 8-bit patterns.
Although, there are a number of 2-bit (and higher-bit) errors which do get properly corrected, if all the corrupted bits lie in the same 8-bit chunk.
But there's a simpler way to look at this problem: This is a distance-3 code. No matter how close two ASCII values get (and they can get as close as 1 bit apart---the letter B and the letter C, for instance,) repeating the code 3 times makes the minimum Hamming distance between words at least three.
So, using the formulas in class, we can say that since the pattern was repeated three times, this code detects every (3-1)= 2 bit error, and corrects every (3-1)/2 = 1 bit error.
moving each word to the closest codeword, we get:
10100 is closest to 101001 - F
100110 is E
001100 is closest to 011100 - D
So, we get FED.