December 1999
LD201 : LOGIC DESIGN

QUESTION 4

Total Marks: 15 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to
Question 4

(a)

How many outputs does an encoder with 4 inputs have?
A 4-input encoder has 2 outputs.

 

[1]
(b)

Explain the difference between an ordinary encoder and a priority encoder.
The ordinary encoder should have exactly one input active at any one time (1 mark); the priority encoder can have more than one input active, in which case it is the highest-priority input that is used (1 mark).

 

[2]
(c)

Design a circuit implementing a 4-input encoder, using AND, OR and NOT gates as required.
Ordinary encoder:

(1 mark for each correct output, plus one mark for clear labelling.)

 

[3]
(d)

Design a circuit implementing a 4-input priority encoder, using AND, OR and NOT gates as required.
Priority encoder:

(1 mark for each correct output, plus one mark for clear labelling.)

 

[3]
(e)

Suppose you need a priority encoder, but have only an ordinary encoder and a collection of logic gates.

(i) Explain briefly how to construct an n-input priority encoder from an n-input ordinary encoder. [1 mark]
Encoder to priority encoder:

(i) Each input to the ordinary encoder should be masked by the higher-priority inputs, so that it is not active when any higher-priority input is active. [1 mark]

(ii) Complete the following truth table, showing how to turn the inputs for a 4-input priority encoder into the inputs for a 4-input ordinary encoder.( are the highest-priority inputs.)[2 marks]

(ii) Turning priority-encoder inputs into ordinary-encoder inputs:

(2 marks for a completely correct table; 1 mark for up to three errors; no marks if there are more errors.)

(iii) Complete the following circuit, so that it behaves like a 4-input priority encoder.

[3 marks]

Circuit:

(1 mark for getting any two connections correct, another 1 mark for getting all four connections correct; final 1 mark for clarity and neatness.)

[6]