21
Assignment 3 Sample problems

Assignment 3 Sample problems

  • Upload
    hei

  • View
    66

  • Download
    0

Embed Size (px)

DESCRIPTION

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? - PowerPoint PPT Presentation

Citation preview

Page 1: Assignment 3  Sample problems

Assignment 3 Sample problems

Page 2: Assignment 3  Sample problems

You are given a picture, which is 1000 x 1000 pixels.

where1 pixel is represented by 3 bytes1 kB = 1000 B1 MB = 1000000 B

Page 3: Assignment 3  Sample problems

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?

Page 4: Assignment 3  Sample problems

1)How many bytes are needed to store the picture?

3,000,000 bytes2)How many kilobytes are required to store

the picture?    3,000 kilobytes3)How many seconds will be required to send

the picture over a 150 kB/s (150 kilobytes per second) connection? 20s

Page 5: Assignment 3  Sample problems

How can we get ?

1. 1000*1000*3=3,000,000 bytes

2. 3,000,000 / 1000=3,000 kilobytes

3. 3000 / 150 =20 s

Page 6: Assignment 3  Sample problems

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

Page 7: Assignment 3  Sample problems

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)?

Page 8: Assignment 3  Sample problems

1)How many seconds does it take to say 500 words?

150s2)How many words can be spoken in 1

hour? 12000words3)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

Page 9: Assignment 3  Sample problems

How can we get ?

1. 300*500/1000=150s2. 3600*1000/300=12000 words3. 900*300/1000=270s 270*200=54,000 kilobits =54 megabits

Page 10: Assignment 3  Sample problems

Consider the following simplified NIM5 circuit, write the logic expression to make the user win.

fiveLeft threeLeft

twoLeft

C-Win

U-Win

takeOne1takeOne2

takeTwo2takeTwo1

AND GATE

True

OR GATE

OR GATE

AND GATE

AND GATE

Page 11: Assignment 3  Sample problems

Consider the following simplified NIM5 circuit, write the logic expression to make the user win.

fiveLeft threeLeft

twoLeft

C-Win

U-Win

takeOne1takeOne2

takeTwo2takeTwo1

AND GATE

True

OR GATE

OR GATE

AND GATE

AND GATE

fiveLeft and takeTwo1 and twoLeft and take two2

Page 12: Assignment 3  Sample problems

Consider the following circuit diagram:

A

B

AND GATE

OR GATE

NOT GATE

NOTGATE

AND GATE

C

Page 13: Assignment 3  Sample problems

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

A B C

False False

False True

True False

True True

Page 14: Assignment 3  Sample problems

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

A B C

False False False

False True False

True False False

True True False

Page 15: Assignment 3  Sample problems

How can we get ?1. C= (A and not B) and (not (A

or B))

Since and gate, any one part is false, will make C to be false.

Page 16: Assignment 3  Sample problems

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:

Page 17: Assignment 3  Sample problems

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

Page 18: Assignment 3  Sample problems

How can we get ?

1. And gate: 2*10+5+3+1=29

2. Or gate: 1*10=10

3. Not gate: 2*10=20

Page 19: Assignment 3  Sample problems

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:

Page 20: Assignment 3  Sample problems

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

Page 21: Assignment 3  Sample problems

How can we get ?

In OR-K, only or gate, so we do not need any and gate and not gate

1. And gate: 02. Or gate: 43. Not gate: 0 every two inputs need one or gate, so

the number of or gate is 2+1+1=4