We can think of the multiplexor (or mux) as a data selector, the diagram below illustrates a four input mux. X Y

Similar documents
Computer Systems Architecture

Contents Circuits... 1

CPS311 Lecture: Sequential Circuits

MODULE 3. Combinational & Sequential logic

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

COMP2611: Computer Organization. Introduction to Digital Logic

CS8803: Advanced Digital Design for Embedded Hardware

Analogue Versus Digital [5 M]

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

CS Part 1 1 Dr. Rajesh Subramanyan, 2005

THE KENYA POLYTECHNIC

(Refer Slide Time: 1:45)

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Encoders and Decoders: Details and Design Issues

Laboratory Objectives and outcomes for Digital Design Lab

Section 001. Read this before starting!

Previous Lecture Sequential Circuits. Slide Summary of contents covered in this lecture. (Refer Slide Time: 01:55)

COMP sequential logic 1 Jan. 25, 2016

EXPERIMENT 8 Medium Scale Integration (MSI) Logic Circuits

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Chapter 8 Functions of Combinational Logic

Chapter 8. The MAP Circuit Discussion. The MAP Circuit 53

Chapter 4. Logic Design

IT T35 Digital system desigm y - ii /s - iii

Chapter 7 Memory and Programmable Logic

WINTER 14 EXAMINATION

EE292: Fundamentals of ECE

TYPICAL QUESTIONS & ANSWERS

Experiment (6) 2- to 4 Decoder. Figure 8.1 Block Diagram of 2-to-4 Decoder 0 X X

Chapter 9 MSI Logic Circuits

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

For Teacher's Use Only Q Total No. Marks. Q No Q No Q No

Logic. Andrew Mark Allen March 4, 2012

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

VU Mobile Powered by S NO Group

Computer Architecture and Organization

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 2018 EXAMINATION MODEL ANSWER

CSE 352 Laboratory Assignment 3

DIGITAL ELECTRONICS MCQs

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Digital Logic Design: An Overview & Number Systems

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Chapter 2. Digital Circuits

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

6.3 Sequential Circuits (plus a few Combinational)

WINTER 15 EXAMINATION Model Answer

EC6302-DIGITAL ELECTRONICS II YEAR /III SEMESTER ECE ACADEMIC YEAR

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

EECS150 - Digital Design Lecture 2 - CMOS

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Music Electronics Finally DeMorgan's Theorem establishes two very important simplifications 3 : Multiplexers

FUNCTIONS OF COMBINATIONAL LOGIC

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Combinational vs Sequential

1. Convert the decimal number to binary, octal, and hexadecimal.

WELCOME. ECE 2030: Introduction to Computer Engineering* Richard M. Dansereau Copyright by R.M. Dansereau,

Note 5. Digital Electronic Devices

A Review of logic design

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Page 1) 7 points Page 2) 16 points Page 3) 22 points Page 4) 21 points Page 5) 22 points Page 6) 12 points. TOTAL out of 100

Why FPGAs? FPGA Overview. Why FPGAs?

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Digital Circuits ECS 371

Logic Devices for Interfacing, The 8085 MPU Lecture 4

CS8803: Advanced Digital Design for Embedded Hardware

Principles of Computer Architecture. Appendix A: Digital Logic

Introduction to Digital Electronics

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Lab #10: Building Output Ports with the 6811

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Logic Design II (17.342) Spring Lecture Outline

Asynchronous (Ripple) Counters

CS 61C: Great Ideas in Computer Architecture

University of Florida EEL 3701 Fall 1996 Dr. Eric M. Schwartz

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

COMP12111: Fundamentals of Computer Engineering

EECS150 - Digital Design Lecture 9 - CPU Microarchitecture. CMOS Devices

BUSES IN COMPUTER ARCHITECTURE

ME 515 Mechatronics. Introduction to Digital Electronics

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST

Logic Design Viva Question Bank Compiled By Channveer Patil

Hardware Design I Chap. 5 Memory elements

Software Engineering 2DA4. Slides 3: Optimized Implementation of Logic Functions

ET398 LAB 4. Concurrent Statements, Selection and Process

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

Microprocessor Design

ELEN Electronique numérique

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM

CHAPTER 4: Logic Circuits

11. Sequential Elements

North Shore Community College

Introduction Actel Logic Modules Xilinx LCA Altera FLEX, Altera MAX Power Dissipation

Subject : EE6301 DIGITAL LOGIC CIRCUITS

Transcription:

Hardware Building Blocks Multiplexors and decoders We have established that we can build ANY logic circuits entirely from NAND gates or NOR gates. This is fine in theory but a pretty idiotic thing to do in practice. Gates represent the lowest level of integration available to the designer, if we go any lower we begin to think of discrete transistors. At the opposite end of the scale we have VLSI and ULSI or whatever the acronym of the day is, in which devices can have millions of transistors. It is difficult to imagine that the designers of the latest PC processors (Athlons etc) would use NAND gates in their designs it would take ages to simply draw such a circuit let alone design it! However it would be wrong to dismiss this idea until very recently, Cray supercomputers were produced entirely from very simple devices. In reality the digital designer has a bewildering armoury of high level components at his/her disposal. Take a look in the PRIMLOGI and 7400DEVS libraries in LogicWorks. These are a small step up from basic gates and 7400DEVS actually represent real chips which you can go out and buy. It is important to realise that these devices exist. It s somewhat less important to know how they all work unless you actually need to use one in a design. One or two exceptions are worth a closer look, partly because they are such a small step up from primitive gates, and also because they can sometimes behave just like gates. Multiplexors and decoders A common problem which faces the digital designer is the routing or distribution of data. Multiplexers and decoders are frequently used to achieve this. We can think of the multiplexor (or mux) as a data selector, the diagram below illustrates a four input mux. A B C D T X Y In this example, one of the inputs (A,B,C, or D) is routed to the output (T). Which input is selected is determined by X and Y, so we can represent the behaviour of this device using a truth table:

X Y T 0 0 A 0 1 B 1 0 C 1 1 D It can help to think of the multiplexor as the hardware equivalent of a look-up table which you might have encountered in software, and an interesting application is to use the mux to look-up logic functions. Look carefully at the diagram above it is a mux but drawn as a rectangle instead of a triangle (both representations are quite common) and the inputs have been hard-wired as ones and zeroes. Consider the truth table for this device: S0 S1 Q 0 0 0 0 1 1 1 0 1 1 1 0 It looks remarkably like the EX-OR truth table which we ve seen before! In fact, by wiring the inputs appropriately we can make this behave like any gate we choose. Multiplexors are available off the shelf in various sizes; 2,4,8, and 16 input devices are commonly available. Decoders Unfortunately, the term decoder is rather over used, but in the present context we can think of it as being the opposite of a mux. A data distributor rather than a data selector. The terms demultiplexor and decoder are often used interchangeably. Which term to use is usually suggested by the context. We ll begin by considering a 4 output device (usually described as a 2 to 4 decoder). As usual we ll use a truth table to describe the operation of this device.

The device has active low outputs (0 means true ) and the E input can mean either of two things: if we are talking demultiplexors then it is the data input, whereas, for a decoder, it is an Enable signal. The important part of the table is contained in the grey (or yellow!) rectangle. E S0 S1 Q0 Q1 Q2 Q3 1 X X 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 Just as muxes come in various sizes decoders do too. There is no point in a 1 to 2 decoder (draw the truth table and you will see that we could build it with a single inverter!). 2 to 4, 3 to 8, and 4 to 16 are the common variants. The diagram below illustrates a 3 to 8 decoder with active high outputs. Internally the device is quite simple, although no-one in their right mind would actually attempt to build a decoder using discrete gates it is instructive to consider how such devices might be made:

The inputs to the decoder are a 3-bit binary pattern which can have eight possible forms (000 to 111). Each of these corresponds to a single output. Another way of looking at this is to think of the outputs as logic functions: This leads naturally to using the decoder to implement more complex logic functions. Consider the following truth table: A B C T 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 We could derive a Boolean expression for T, simplify it and build a circuit with NAND gates (or whatever). We could use a Karnaugh map perhaps. Or we could implement the function directly by using a decoder: One of the most common applications of decoders is in memory addressing in microcomputer systems. Suppose we have a simple microprocessor system which has a RAM chip, an EPROM chip, a parallel I/O device and a serial I/O device. In this particular example we will consider the signals which are appropriate to the 680X microprocessor families, however the problem is very similar for almost any microprocessor.

When the microprocessor puts an address on the address bus it asserts a strobe (in this case E) to indicate that the address is valid. The purpose of the address decoding is to enable the appropriate chip; typically we would use a 2-4 decoder (with active low outputs) to perform this function: In this example O 0 is asserted when A15 and A14 are both zero, which means all addresses from 0000H to 3FFFH. Similarly, O 1 is asserted when A15 is zero and A14 is one, corresponding to addresses in the range 4000H to 7FFFH, and in the same way, O 2 is asserted for addresses in the range 8000H to BFFFH, and O 3 for addresses in the range C000H to FFFFH. As we have four devices in our memory map all that we need to do is to connect the outputs from the decoder to the /CS (Chip Select) inputs of our devices and hey presto! We almost have a complete microprocessor system! Remember though, that by using the 2-4 decoder we have divided the 64K memory map into four equally sized 16K chunks. As long as our devices occupy 16K or less then this is fine, as an added bonus in this case we can also connect /E to the enable input of the decoder (G) so that our chips will only be enabled when the address is guaranteed to be valid. Suppose now that our EPROM chip is 16K and our RAM chip is 32K. We can not use the simple strategy outlined above so let's look more closely at the memory map:

This time the best solution is probably to use a 3-8 decoder which divides the memory map into 8 chunks, each of which is 8K in size. We need to allocate four of these chunks to the RAM chip, two to the EPROM and one each to the I/O devices. This is quite easily achieved using AND gates (you may have thought OR gates but remember that the logic is active low again).