You are on page 1of 3

a).

An EAN-13 code's check digit is calculated as follows:

1. Starting at 1, count the digit places from left to right.

2. Add up all the digits in odd order.

3. Multiply the result by three by adding all the numbers in even positions.

4. Add your results of steps 2 and 3, then take only the last digit of the answer (the
‘units' digit). This is the same as multiplying the answer by ten (answer modulo-10).

5. That's the check digit provided that the answer to step 4 was 0. Otherwise, subtract
ten from the value from step 4 to get the check digit.

6. To the right of the 12 identification digits, a check digit is added. The check digit can
be any number between 0 and 9.

Therefore: - 1) odd- 9,8,9,7,2,4,7 even- 7,9,5,7,0,0

2) 9+8+9+7+2+4+7=46

3) 7+9+5+7+0+0=28

28*3=84

4) 46+84=130

The unit digit is 0, which shows that this is a valid EAN-13 code.

b)

128 -8 4 0 0 0 0 0

6 -2 0 0 0 0 0 0

4 2 0 0 0 0 0 0

2 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0
DCT (i, j) =12N−−−√C(i)C(j)∑x=0N−1∑y=0N−1pixel (x, y) cos[(2x+1) iπ2N] cos[(2y+1)
jπ2N]
pixel (x, y) =12N−−−√∑i=0N−1∑j=0N−1C(i)C(j)DCT (i, j) cos[(2x+1) iπ2N] cos[(2y+1)
jπ2N]

where C(x)=1/2–√C(x)=1/2 when x=0x=0 and 11 when x>0x>0, and pixel(x,y)pixel(x,y)


is the grayscale value of the pixel at position (x,y) in the 8 × 8 block being compressed;
N = 8 in this case.
ii).

Quantized frequency coefficients are traversed in a zigzag pattern as follows:

zig zag scan (128, -8,6,4,


-2,4,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0)

iii). In the discipline of video compression, a video frame can be compressed using a
variety of techniques, each with its own set of benefits and drawbacks, based mostly on
the quantity of data compressed. Frame types or Picture types refer to the many
algorithms generating video frames. I, P, and B are now the 3 major picture (or frame)
types used in the various video algorithms. The following qualities distinguish them:
 I- Though frames are the least compressible here, they do not require the decoding of
additional video frames.
 P- frames are more compressible than I-frames because they can use data from prior
frames to decompress them.
 B- Here, to get the most data compression, frames can employ both forward
and previous frames as data references.

You might also like