Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Arab Academy for Science, Technology & Maritime Transport

COLLEGE OF ENGINEERING & TECHNOLOGY

Department Computer Engineering


Course Code CC317
Course Digital Systems
TA Eng. Samar Samir

Simple Programmable Logic Devices – Read Only Memories


1. Compute the size of the ROM required to implement an 8-to-3 priority
encoder.
• An encoder performs an inverse function of a decoder.
• An 8-to-3 priority encoder is illustrated below. If input yi is 1 and the
other inputs are 0, then the abc outputs represents a binary number
equal to i.
• An additional bit output d is used to indicated invalid outputs. A value 1
on bit d indicates that the output bits a, b and c are valid.
• If more than one input is 1 in the priority encoder the highest numbered
input determines the output.
• The X’s in the truth table indicate don’t cares.
• As illustrated the 8-to-3 priority encoder has 8 inputs and 4 outputs.
Hence, it needs 28 X 4 bit ROM.
• There will be 256 entries in the memory when all the don’t cares in the
table are expanded.
2. What is the size of the smallest ROM that is needed to implement the
following? Specify the answer as number of entries X data width.
a. F = A’B’C’ + BC’ + AC’ → F = A’B’C’ + (A+A’)BC’ + (B+B’)AC’
3 inputs (A, B, C) F = A’B’C’ + A’BC’ + ABC’ + AB’C’
1 Output (F) F= 000 + 010 + 110 + 100
inputs
ROM size = 2 x Outputs = 23 x 1 = 8 x 1
A B C F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0

3. What is the size of the smallest ROM that is needed to implement the
following? Specify the answer as number of entries X data width.
a. An 8-bit full adder (assume carry-in and carry-out)

17 inputs (16 for the 2 numbers, 1 carry-in)


9 outputs (8 for sum of 8 bits, 1 carry-out)
ROM size = 2inputsXOutputs = 217 x 9
b. A 4-to-1 MUX

6 inputs (4 inputs, 2 selectors)


1 output
ROM size = 2inputs x Outputs = 26 x 1
c. A 3-to-8 Decoder

3 inputs
8 output
ROM size = 2inputs x Outputs = 23 x 8
d. A 10-to-4 priority encoder
10 inputs
5 outputs (4 output, 1 valid bit)
ROM size = 2inputs x Outputs = 210 x 5

You might also like