0% found this document useful (0 votes)
74 views

COMP 200 - Assignment #3

The document provides examples of calculating transmission times for an uncompressed grayscale image using different media types: a 56 kbps modem, a 1.5 Mbps DSL line, and a 100 Mbps Ethernet link. The calculations show the total bits in the image, file size in kilobytes or megabytes, and transmission time in seconds or minutes for each media type.

Uploaded by

ramirez.mv.1994
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

COMP 200 - Assignment #3

The document provides examples of calculating transmission times for an uncompressed grayscale image using different media types: a 56 kbps modem, a 1.5 Mbps DSL line, and a 100 Mbps Ethernet link. The calculations show the total bits in the image, file size in kilobytes or megabytes, and transmission time in seconds or minutes for each media type.

Uploaded by

ramirez.mv.1994
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment #3 – Chapter 6 (pg.

328)

4. Assume that memory cell 60 has the value 472, memory cell 61 has the value –1, and
register R has the value 13. Using the instruction set in Figure 6.5, what are in
register R, and memory cells 60 and 61 after completing the following operations?
Assume that each instruction starts from the above condition.

Register R Memory Cell 60 Memory Cell 61


Initial Value 13 472 –1

Operation Register R Memory Cell 60 Memory Cell 61


a. LOAD 60 472 472 –1
CON(60) → R

b. STORE 60 13 13 –1
R → CON(60)

c. ADD 60 485 472 –1


R + CON(60) → R

d. COMPARE 61 13 472 –1
CON(61) < R → LT = 1 (LT = 1)

e. IN 61 (Assume 50) 13 472 50


50 → CON(61)

f. OUT 61 13 472 –1
CON(61)

Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.
Assignment #3 – Chapter 7 (pg. 384)

4. Determine the time it takes to transmit an uncompressed grayscale image (8 bits/px)


from a screen with a resolution of 1,280 × 840 px using each of the following media:

a. 56 kBps modem Media type


(1,280 px) × (840 px) = 1,075,200 px Total pixels in image
(1,075,200 px) × (8 bits) = 8,601,600 bits Bits in image
(8,601,600 bits) ∕ (1,000 kB) = 8,601.60 kB kB of image
(8,601.60 kB) ∕ (56 kBps) = 153.60 s Transmission in seconds
(153.60 s) ∕ (60) = 2.56 m Transmission in minutes
Thus, it takes 153.60 secs or 2.56 mins to transmit via 56 kBps modem

b. 1.5 MBps DSL line Media type


(1,280 px) × (840 px) = 1,075,200 px Total pixels in image
(1,075,200 px) × (8 bits) = 8,601,600 bits Bits in image
(8,601,600 bits) ∕ (1,000,000 MB) = 8.6016 MB MB of image
(8.6016 MB) ∕ (1.5 MBps) = 5.7344 → 5.73 s Transmission in seconds
(5.7344 s) ∕ (60) = 0.0955… → 0.10 m Transmission in minutes
Thus, it takes 5.73 secs or 0.10 mins to transmit via 1.5 MBps DSL line

c. 100 MBps Ethernet link Media type


(1,280 px) × (840 px) = 1,075,200 px Total pixels in image
(1,075,200 px) × (8 bits) = 8,601,600 bits Bits in image
(8,601,600 bits) ∕ (1,000,000 MB) = 8.6016 MB MB of image
(8.6016 MB) ∕ (100 MBps) = 0.086016 → 0.09 s Transmission in seconds
(0.086016 s) ∕ (60) = 0.0014336 → 0.001 m Transmission in minutes
Thus, it takes 0.09 secs or 0.001 mins to transmit via 100 MBps Ethernet link

Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.
Assignment #3 – Chapter 8 (pg. 417)

2. Using the hash function in Section 8.2.1, find the encrypted forms of the passwords:
fido, blank, ti34pper. The steps in the hash function on page 391 are:
1) Replace each letter with the number of its place in the alphabet; leave digits as is
2) Add digits from Step 1 to get a single integer
3) Divide integer from Step 2 by 7; find the remainder
4) Add 1 to integer from Step 3; multiply by 9
5) Reverse digits in integer from Step 4; replace digits with its letter of the alphabet

a. Hash Function Process Encrypted


Initial fido —
Step 1 f = 6, i = 9, d = 4, o = 15 6 9 4 15
Step 2 6 + 9 + 4 + 15 = 34 34
Step 3 34 ∕ 7 = 4 → 4 × 7 = 28 → 34 – 28 = 6 6
Step 4 6 + 1 = 7 → 7 × 9 = 63 63
Step 5 63 → 36 → 3 = c, 6 = f cf
Thus, the encrypted form of fido is cf

b. Hash Function Process Encrypted


Initial blank —
Step 1 b = 2, l = 12, a = 1, n = 14, k = 11 2 12 1 14 11
Step 2 2 + 12 + 1 + 14 + 11 = 40 40
Step 3 40 ∕ 7 = 5 → 5 × 7 = 35 → 40 – 35 = 5 5
Step 4 5 + 1 = 6 → 6 × 9 = 54 54
Step 5 54 → 45 → 4 = d, 5 = e de
Thus, the encrypted form of blank is de

c. Hash Function Process Encrypted


Initial ti34pper —
Step 1 t = 20, i = 9, 3 4, p = 16, p = 16, e = 5, r = 18 20 9 3 4 16 16 5 18
Step 2 20 + 9 + 3 + 4 + 16 + 16 + 5 + 18 = 91 91
Step 3 91 ∕ 7 = 13 → 0 × 7 = 0 → 0 – 0 = 0 0
Step 4 0+1=1 → 1×9=9 9
Step 5 9 → no reversal → 9 = i i
Thus, the encrypted form of ti34pper is i

Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.

You might also like