Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots



Similar documents
Lecture 8: Synchronous Digital Systems

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Let s put together a Manual Processor

COMBINATIONAL CIRCUITS

Counters and Decoders

Binary Adders: Half Adders and Full Adders

CHAPTER 3 Boolean Algebra and Digital Logic

2.0 Chapter Overview. 2.1 Boolean Algebra

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Basic Logic Gates Richard E. Haskell

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Gates, Circuits, and Boolean Algebra

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Chapter 2 Logic Gates and Introduction to Computer Architecture

Combinational circuits

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Two-level logic using NAND gates

Module 3: Floyd, Digital Fundamental

Digital Controller for Pedestrian Crossing and Traffic Lights

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Combinational Logic Design

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Flip-Flops, Registers, Counters, and a Simple Processor

CS311 Lecture: Sequential Circuits

BOOLEAN ALGEBRA & LOGIC GATES

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

Base Conversion written by Cathy Saxton

3.Basic Gate Combinations

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Digital Logic Design Sequential circuits

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Combinational Logic Design Process

Logic Reference Guide

7. Latches and Flip-Flops

Seven-Segment LED Displays

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

Decimal Number (base 10) Binary Number (base 2)

Contents COUNTER. Unit III- Counters

Copyright Peter R. Rony All rights reserved.

NUMBER SYSTEMS. William Stallings

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

Figure 8-1 Four Possible Results of Adding Two Bits

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

=

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Lecture 5: Gate Logic Logic Optimization

Digital Electronics Detailed Outline

Lab 11 Digital Dice. Figure Digital Dice Circuit on NI ELVIS II Workstation

(Refer Slide Time: 00:01:16 min)

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

Asynchronous Counters. Asynchronous Counters

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

5 Combinatorial Components. 5.0 Full adder. Full subtractor

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

BINARY CODED DECIMAL: B.C.D.

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

CHAPTER 11 LATCHES AND FLIP-FLOPS

Lecture-3 MEMORY: Development of Memory:

Lesson 12 Sequential Circuits: Flip-Flops

ASYNCHRONOUS COUNTERS

A Digital Timer Implementation using 7 Segment Displays

Counters are sequential circuits which "count" through a specific state sequence.

CSE140: Components and Design Techniques for Digital Systems

Systems I: Computer Organization and Architecture

Domain of a Composition

CSE140: Midterm 1 Solution and Rubric

Section 1.4 Place Value Systems of Numeration in Other Bases

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

Simplifying Logic Circuits with Karnaugh Maps

MICROPROCESSOR AND MICROCOMPUTER BASICS

DEPARTMENT OF INFORMATION TECHNLOGY

The components. E3: Digital electronics. Goals:

ELEC EXPERIMENT 1 Basic Digital Logic Circuits


26 Integers: Multiplication, Division, and Order

Lecture 7: Clocking of VLSI Systems

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

EE360: Digital Design I Course Syllabus

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

5.1 Radical Notation and Rational Exponents

Lab 1: Study of Gates & Flip-flops

Sistemas Digitais I LESI - 2º ano

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

COURSE SYLLABUS. PRE-REQUISITES: Take CETT-1303(41052); Minimum grade C, CR.

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Lecture 8: Binary Multiplication & Division

Pre-Algebra Lecture 6

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

Transcription:

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots Registers As you probably know (if you don t then you should consider changing your course), data processing is usually done on fixed size binary words. Data are stored in computers in registers which can be thought of simply as collections of D-type flip-flops. The schematic diagram of such a register is shown as a functional block below: By convention we number the bits from 0 to N 1 for an N-bit register and interpret its contents as the positive numerical value N n=1 (2n )O(n). (However, it is important to remember that bits are bits are bits and the interpretation of what they represent is not fixed). There are many short hand notations for registers. Three of the most common ones are shown below: Registers can contain either data or control bits and are the fundamental building blocks of digital computers. One of the most basic operation between registers is register transfer which means the copying of the contents of one register into another without the loss of data in the first one. As a first exercise, we will build the hardware for a general register transfer engine which contains eight registers and may be represented by the following schematic diagram: On each clock pulse (falling edge for example) the selected destination register is loaded from the selected source register. Only the selected register receives a pulse, all others therefore remain unchanged. By setting the switches before a pulse the contents of any one register can be transferred to any other register. Hence, the order of events is: 1. Select the input register 2. Select the output register 3. Generate a clock pulse to transfer DOC112: Computer Hardware Lecture 12 1

The Register Transfer Circuit using a Multiplexer and a Demultiplexer Clearly we will not use a mechanical switch in practice. Instead, to select the source register we use the multiplexer circuit which we hae seen earlier in the course. To select the destination register we will use a demultiplexer circuit (sometimes called a decoder or a binary to unary converter). The circuit of a 4-1 multiplexer is shown as a functional block in figure 1. We have added an enable line which must be set to 1 for the connection to be made. We shall see that this is a very useful feature in due course. Most CAD systems supporting digital circuit design provide a comprehensive range of functional units, but it will never be complete. Suppose we are using a system which has only 4-to-1 multiplexers and we want an 8-to-1 device, we use functional reasoning to do this and arrive at circuit shown in figure 2. Following the same principle we can simply and quickly design a multiplexer of any size. Figure 1: 4 to 1 Multiplexer Figure 2: 8 to 1 Multiplexer Having implemented an 8-1 multiplexer we can now wire up the select SRC register switch. We need one multiplexer for each bit of the registers, and they will all share the same control inputs (S 2 S 1 S 0 ). The wiring for bit i is: Some interesting properties of multiplexers Functionally, multiplexers have a clear dedicated function. This does not mean that they cannot be used for other purposes. For example, you could have used it for your hardware assessed course work which you have just completed and you could have designed your circuit in ten minutes! Let s say have the functions A(XOR)B for (C1,C2)=00, B for 01, A B for 10 and function (A +B) for 11. Noticing that a multiplexer can provide four different functions, and the simplifying the equations so that A(XOR)B = (A B +AB ) = ((A B) (AB ) ) and that A +B = (AB ), you could have built the following circuit: DOC112: Computer Hardware Lecture 12 2

The control functions select between the four inputs which are generated by simple circuits. Demultiplexers Let us get back to our original problem of the general register transfer circuit. We have solved the problem of selecting any one of the registers as a source register by desigining an 8-1 multiplexer. We still have to select a proper destination register and we do this by allowing only one register to receive a clock pulse. All other registers will not change. The circuit for this function is called either a demultiplexer (aka decoder or binary to unary converter). The circuit diagram of a 2-4 demultiplexer with enable is shown in figure 3. If the enable is zero then all outputs are zero. However if the enable is set to 1 then exactly one of the four outputs (D00, D01, D10 and D11) is one, and the others are zero. The output that is 1 is selected by the slelect inputs (S1, S0). Does this remind you of anything? Well, it may remind you of minterms. Because a decoder is a minterm decoder! It can also be considered a binary to unary converter. A three-input decoder has eight outputs, a four-input one has sixteen outputs. Using the functional approach we can build 3-8 demultiplexer in the same way that we constructed the 1-8 multiplexer. The circuit is shown in figure 4. Figure 3: 2 to 4 Decoder Figure 4: 3 to 8 Decoder The two 2-4 decoders are neatly combined by making use of their enable inputs, but we need an extra eight AND gates to provide the enable function for the 3-8 decoder. We see that the functional approach to hardware design does not necessarily provide the smallest circuit. Remembering that the decoder is a minterm generator we note that we could use one to solve the coursework problem in under 1 minute! We use a 4-to-16-decoder,and a sixteen-input OR gate. All we need do is connect the minterms that we need to the OR gate. It may cost more in terms of silicon area, but think of the saving in design time. As we saw in lecture 4, there are special purpose chips called field programmable gate arrays that allow very fast prototype design using this functional design concept. The Final Circuit We have shown how the multiplexer and the demultiplexer are used to build our register transfer engine. Remember that with this circuit, when a clock pulse is applied, the contents of any selected register can be transfered into any other register. We write this operation symbolically as: The final circuit is: R dest R source DOC112: Computer Hardware Lecture 12 3

Comparator Circuits We will conclude this general discussion on looking at digital circuits from a functional point of view by showing how to build a comparator circuit. The input to a simple binary comparator circuit usually comes from two registers; thus the inputs are considered to be two simple positive binary numbers of n bits, say number A and B. There are three outputs and, just like a decoder, exactly one of the outputs is equal to 1. The three outputs indicate the conditions A > B, A = B, or A < B. We can realise (again, functional thinking!) that we need to provide only two outputs, since the third one is the NOR function of the other two. We could design the circuit buy setting up an 8-input (256 line) truth table and attempt to minimise the canonical equation. However, we would not get very far with our K-maps. The other possibility is to write down Boolean equations making use of functional thinking of the sort: A is larger than B if A3 is equal to 1 and B3 is equal to 0 (remember, we have only positive binary numbers in the range of 0 to 15) A is larger than B if A3 and B3 are equal to each other and A2 is equal to 1 and B2 is equal to 0 etc Again, functionally thinking, the fact that A3 = 1 and B3 = 0 can be expressed by the Boolean equation A3 B3 = 1 and the fact that A3 is equal to B3 is the Boolean equation (A3 B3) = 1 which expands to (A3 B3 + A3 B3 = 1). Thus, we can write the Boolean equation as: A > B = A3 B3 +(A3B3+A3 B3 ) ((B2A2 )+(A2 B2+A2 B2 ) ((A1 B1 )+(A1 B1+A1 B1 ) A0 B0 ))) and go from there. But, there is an easier (i.e. functional) way of solving this problem. We can first build a one-bit comparator: DOC112: Computer Hardware Lecture 12 4

add an enable, and take away the A < B which we don t really need and then functionally build a four-bit one: DOC112: Computer Hardware Lecture 12 5