CEC 220 Digital Circuit Design Decoders Encoders ROM
















- Slides: 16

CEC 220 Digital Circuit Design Decoders, Encoders, & ROM Wed, February 19 CEC 220 Digital Circuit Design Slide 1 of 18

Lecture Outline • Decoders and Encoders • Read-Only Memories (ROMs) Wed, February 19 CEC 220 Digital Circuit Design Slide 2 of 18

Decoders • A 3: 8 Line Decoder § A minterm generator!! How can we implement this with AND & OR gates? MSB LSB Wed, February 19 CEC 220 Digital Circuit Design Slide 3 of 18

Decoders • A 4: 10 Line Decoder – w/ active Low Outputs How can we implement this with AND & OR gates? Wed, February 19 No Output Decoded CEC 220 Digital Circuit Design Slide 4 of 18

Decoders An Example • Realize the following functions using a 4: 10 Decoder Wed, February 19 CEC 220 Digital Circuit Design Slide 5 of 18

Encoders • An Encoder performs the inverse function of a Decoder § A priority encoder “prioritizes” the inputs while encoding y 7 y 6 y 5 y 4 y 3 y 2 y 1 y 0 a b c d 0 0 0 0 0 1 0 0 0 0 1 X 0 0 1 1 0 0 0 1 X X 0 1 0 0 1 X X X 0 1 1 1 0 0 0 1 X X 1 0 0 1 X X X 1 1 0 1 1 X X X X 1 1 Assume that y 7 is given the highest Priority Wed, February 19 CEC 220 Digital Circuit Design Slide 6 of 18

Read-Only Memories (ROMs) • Read-Only Memories § n-address lines 2 n address locations each storing a “word” § m-output lines m-bits are stored at each address location o Each word is m-bits long ROM PROM EEPROM NAND Flash Wed, February 19 CEC 220 Digital Circuit Design NOR Flash Slide 7 of 18

Read-Only Memories (ROMs) • An Example § 3 address lines: 23 = 8 Words or storage locations § 4 -bits are stored in each “word” Wed, February 19 CEC 220 Digital Circuit Design Slide 8 of 18

Read-Only Memories (ROMs) • Basic ROM Structure Wed, February 19 CEC 220 Digital Circuit Design Slide 9 of 18

Read-Only Memories (ROMs) An Example • Develop a HEX (4 -bits) to ASCII (7 -bits) code converter § How many input (address) lines do we have? o Answer: 4 § How many memory locations will we have? o Answer: 24 = 16 § What is the size of the word stored in each memory location? Answer: The size of an ASCII code = 7 -bits HEX Number o Memory Array 24 words X 7 -bits … ASCII Wed, February 19 CEC 220 Digital Circuit Design Slide 10 of 18

Read-Only Memories (ROMs) An Example • Develop a HEX to ASCII code converter X Wed, February 19 A 5=A 4 CEC 220 Digital Circuit Design Slide 11 of 18

Examples • Implement a 4: 1 MUX, using four tri-state buffers and a 2: 4 decoder. I 0 I 1 I 2 I 3 2: 4 Decoder 1 2 4: 1 MUX Z 3 A B 0 1 2 3 Wed, February 19 0 CEC 220 Digital Circuit Design Slide 12 of 18

Examples • Which lines should be used as inputs to allow the 7442 4: 10 line decoder to be used as a 3: 8 decoder? Wed, February 19 CEC 220 Digital Circuit Design Slide 13 of 18

Examples • What size ROM is required to implement the 4 -to-10 line decoder? § How many inputs? o How many words? § How many outputs? o How many bits per word? Wed, February 19 CEC 220 Digital Circuit Design Slide 14 of 18

Examples • Use a ROM to implement an 8 bit priority encoder. § How many inputs? o How many words? § How many outputs? o How many bits per word? Wed, February 19 CEC 220 Digital Circuit Design Slide 15 of 18

Next Lecture • Programmable Logic Devices § PAL, PLA, CPLD, FPGA Wed, February 19 CEC 220 Digital Circuit Design Slide 16 of 18