1 / 21

Assignment 3 Sample problems

Assignment 3 Sample problems. You are given a picture, which is 1000 x 1000 pixels. where 1 pixel is represented by 3 bytes 1 kB = 1000 B 1 MB = 1000000 B. 1)How many bytes are needed to store the picture? 2)How many kilobytes are required to store the picture?

hei
Download Presentation

Assignment 3 Sample problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assignment 3 Sample problems

  2. You are given a picture, which is 1000 x 1000 pixels.where1 pixel is represented by 3 bytes1 kB = 1000 B1 MB = 1000000 B

  3. 1)How many bytes are needed to store the picture? 2)How many kilobytes are required to store the picture? 3)How many seconds will be required to send the picture over a 150 kB/s (150 kilobytes per second) connection?

  4. 1)How many bytes are needed to store the picture? 3,000,000 bytes 2)How many kilobytes are required to store the picture? 3,000 kilobytes 3)How many seconds will be required to send the picture over a 150 kB/s (150 kilobytes per second) connection? 20s

  5. How can we get ? • 1000*1000*3=3,000,000 bytes • 3,000,000 / 1000=3,000 kilobytes • 3000 / 150 =20 s

  6. Use this information for the following questions: At normal speaking rates, a person takes about 300 seconds to say a thousand words.

  7. 1)How many seconds does it take to say 500 words? 2)How many words can be spoken in 1 hour?  3)How many kilobits are needed if we record a 900 words at 200 kilobits per second (ie. it takes 200 kilobits to record one second of audio)? 

  8. 1)How many seconds does it take to say 500 words? 150s 2)How many words can be spoken in 1 hour?  12000words 3)How many megabits are needed if we record a 900 words at 200 kilobits per second (ie. it takes 200 kilobits to record one second of audio)?  54 megabits

  9. How can we get ? • 300*500/1000=150s • 3600*1000/300=12000 words • 900*300/1000=270s 270*200=54,000 kilobits =54 megabits

  10. Consider the following simplified NIM5 circuit, write the logic expression to make the user win. AND GATE U-Win takeOne1 takeTwo1 takeOne2 takeTwo2 True twoLeft AND GATE OR GATE OR GATE fiveLeft threeLeft AND GATE C-Win

  11. Consider the following simplified NIM5 circuit, write the logic expression to make the user win. AND GATE fiveLeft and takeTwo1 and twoLeft and take two2 U-Win takeOne1 takeTwo1 takeOne2 takeTwo2 True AND GATE OR GATE twoLeft OR GATE fiveLeft threeLeft AND GATE C-Win

  12. Consider the following circuit diagram: A B C AND GATE AND GATE OR GATE NOT GATE NOT GATE

  13. Fill in the truth table with values ("True" or "False") corresponding to the diagram:

  14. Fill in the truth table with values ("True" or "False") corresponding to the diagram:

  15. How can we get ? • C= (A and not B) and (not (A or B)) Since and gate, any one part is false, will make C to be false.

  16. Recall our bit equality gate and EQUAL-5 gate, To construct an EQUAL-10 gate (using 10 bit equality gates and 1 AND-10 gate), how many gates of each type are required: • binary AND:  • binary OR:  • unary NOT: 

  17. Recall our bit equality gate and EQUAL-5 gate, To construct an EQUAL-10 gate (using 10 bit equality gates and 1 AND-10 gate), how many gates of each type are required: • binary AND:  29 • binary OR: 20 • unary NOT: 10

  18. How can we get ? • And gate: 2*10+5+3+1=29 • Or gate: 1*10=10 • Not gate: 2*10=20

  19. If we wish to use the minimum possible total number of gates to construct an OR-5, how many gates of each type will be required: • binary AND:  • binary OR:  • unary NOT: 

  20. If we wish to use the minimum possible total number of gates to construct an OR-5, how many gates of each type will be required: • binary AND:  0 • binary OR: 4 • unary NOT: 0

  21. How can we get ? In OR-K, only or gate, so we do not need any and gate and not gate • And gate: 0 • Or gate: 4 • Not gate: 0 every two inputs need one or gate, so the number of or gate is 2+1+1=4

More Related