How To Design A Combinational Circuit In A Computer Program

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

Understanding Logic Design

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

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

5 Combinatorial Components. 5.0 Full adder. Full subtractor

CHAPTER 3 Boolean Algebra and Digital Logic

COMBINATIONAL CIRCUITS

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

Two-level logic using NAND gates

CSE140 Homework #7 - Solution

Combinational Logic Design

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

Let s put together a Manual Processor

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

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

Systems I: Computer Organization and Architecture

Gates, Circuits, and Boolean Algebra

Figure 8-1 Four Possible Results of Adding Two Bits

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, The Binary Adder

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Digital Electronics Detailed Outline

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.

The components. E3: Digital electronics. Goals:

Combinational circuits

CSE140: Components and Design Techniques for Digital Systems

Objectives. Units of Memory Capacity. CMPE328 Microprocessors (Spring ) Memory and I/O address Decoders. By Dr.

CMOS Binary Full Adder

Sistemas Digitais I LESI - 2º ano

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

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

Upon completion of unit 1.1, students will be able to

Logic in Computer Science: Logic Gates

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Binary Adders: Half Adders and Full Adders

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

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

LFSR BASED COUNTERS AVINASH AJANE, B.E. A technical report submitted to the Graduate School. in partial fulfillment of the requirements

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

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

DEPARTMENT OF INFORMATION TECHNLOGY

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

Counters and Decoders

Two's Complement Adder/Subtractor Lab L03

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

Lab 1: Study of Gates & Flip-flops

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

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

Chapter 7 Memory and Programmable Logic

CSE140: Midterm 1 Solution and Rubric

Lecture 5: Gate Logic Logic Optimization

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

BINARY CODED DECIMAL: B.C.D.

(1) /30 (2) /30 (3) /40 TOTAL /100

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

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

Combinational Logic Design Process

Questions 1. half adder sum. x y

Systems I: Computer Organization and Architecture

EE360: Digital Design I Course Syllabus

Register File, Finite State Machines & Hardware Control Language

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

Digital Circuit Design

Using Logic to Design Computer Components

ENGI 241 Experiment 5 Basic Logic Gates

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

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

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Layout of Multiple Cells

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

[ 4 ] Logic Symbols and Truth Table

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Computer organization

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

Contents COUNTER. Unit III- Counters

3.Basic Gate Combinations

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

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

Registers & Counters

Online Development of Digital Logic Design Course

Digital Logic Design Sequential circuits

Lecture-3 MEMORY: Development of Memory:

Method for Multiplier Verication Employing Boolean Equivalence Checking and Arithmetic Bit Level Description

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Gates, Plexers, Decoders, Registers, Addition and Comparison

Lecture 4: Binary. CS442: Great Insights in Computer Science Michael L. Littman, Spring I-Before-E, Continued

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

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

ASYNCHRONOUS COUNTERS

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

Simplifying Logic Circuits with Karnaugh Maps

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Copyright Peter R. Rony All rights reserved.

Lecture #21 April 2, 2004 Relays and Adder/Subtractors

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

Multipliers. Introduction

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Transcription:

Combinational Circuits in Computers (Examples) Combinational Logic Translates a set of Boolean n input variables ( or ) by a mapping function (using Boolean operations) to produce a set of Boolean m output variables ( or ). i f = F (i,i,, i n- ) i f = F (i,i,, i n- ) F i n- f m- = F m- (i,i,, i n- ) CS 6 Ward CS 6 Ward 2 esign of Combinational Circuits etermine input, output and the relationships connecting them Build truth table evelop K-map & simplify lter/simplify as necessary or desired erive Boolean function and circuit diagram CC esign Example F = if (BC) 2 3, otherwise Truth Table: B C F K-map: BC F = + BC B C F CS 6 Ward 3 CS 6 Ward 4

Multiplexers Eight-Input -Bit Multiplexer Multiplexer: combinational circuit with 2 n data inputs, n control inputs that select one of the data inputs as output Usage example: Loading the PC (Program Counter) from binary counter or instruction register or output from LU Example multiplexer: Eight-input multiplexer has 3 control inputs and 8 data inputs can be packaged in a 4-pin chip: 8 data inputs, 3 control inputs, output, ground, power F = BC + BC + BC 2 + BC 3 + BC 4 + BC 5 + BC 6 + BC 7 CS 6 Ward 5 CS 6 Ward 6 6-bit ddress PC Eight-Input -Bit Multiplexer F = BC + BC + BC 2 + BC 3 + BC 4 + BC 5 + BC 6 + BC 7 MUX can implement any Boolean function! CS 6 Ward 7 CS 6 Ward 8

MUX Implementation of F For example: F(,B,C,) = m (,4,5,8,,2,3) B C F 2 3 4 5 6 7 B C F ecoders ecoder: a combinational circuit that takes an n-bit number as input and uses it to select one of 2 n output lines Usage example: To select one of many memory chips (see slide 2) CS 6 Ward 9 CS 6 Ward 3 8 Bit ecoder K-Byte ROM Memory = BC = BC 2-4 decoder controlling references to a memory consisting of four 256 x 8-bit RM chips: 2 = BC 3 = BC 4 = BC 5 = BC 6 = BC 7 = BC CS 6 Ward CS 6 Ward 2

8-Bit Shifter [] rithmetic circuit: 8-bit shifter with 8 data inputs ( - 7 ), one control input (shift left or right?, C) and 8 outputs. Right shift: becomes Left shift: becomes When C is shift right, C is shift left 8-Bit Shifter [2] 2 3 4 5 6 7 2 3 4 5 6 2 3 4 5 6 Uses = & = & + = CS 6 Ward 3 CS 6 Ward 4 Comparator Circuit Comparator is a combinational circuit that compares 2 input words and produces if they are equal and if not Example circuit is a 4-bit comparator and uses 4 XOR gates and NOR Cost = 4 XOR, NOR, 2 inputs = 7 Half-dder rithmetic circuit: -bit half adder (doesn t have a carry as input) Can be used as basic block of a full-adder and chained together to create 8, 6, bit adders Sum = B CS 6 Ward 5 CS 6 Ward 6

Full-dder esign rithmetic circuit: -bit full-adder SUM: BC S = BC + BC + BC + BC Full-dder From SOP rithmetic circuit: -bit full-adder from Truth Table & K-Map Cost = 4 N, OR, 6 inputs = 2 C o : BC C o = B + C + BC Cost = 3 N, OR, 9 inputs = 3 CS 6 Ward 7 CS 6 Ward 8 Full-dder (2 Half-dders) rithmetic circuit: -bit full-adder (2 halfadders with carry in) Multi-Bit Ripple-Carry dder rithmetic circuit: (e.g., 4-bit adder) S = BC + BC + BC + BC = (B + B)C + (B + B)C = ( B)C + ( B)C = ( B) C Cost = 2 XOR, 2 N, OR, inputs = 5 C o = B + C + BC = B + (B+B)C + (+)BC = B + BC + BC + BC = B(+C) + (B + B)C = B + ( B)C CS 6 Ward 9 CS 6 Ward 2

Multi-Bit Carry-Select dder rithmetic circuits: (e.g., 32-bit adder) 3 6-bit adders, lower-half and 2 upperhalves (U, U) fed into U, fed into U. The correct upper half selected from lower half answer (one computation is wasted but it s still faster than ripple-carry adder) Replicate parallelism (have many upper halves) to get more speed (and more wasted computations) Multi-Bit Carry-Lookahead dder rithmetic circuits: Compute carry bits without reference to carry bits of previous stages C = B (no carry in) C = B + C + B C = B + B + B B C 2 = 2 B 2 + 2 B + 2 B + 2 B B + B 2 B + B 2 B + B 2 B B Complexity and compute time increase as additional bits are added Typically done in 4-8 bit units CS 6 Ward 2 CS 6 Ward 22 32-bit dder Using Four 8-Bit dders Simplified rithmetic Logic Unit (LU) rithmetic circuit: LU (rithmetic Logic Unit) Can compute N B, OR B, B, + B (add) Has 2 data inputs (, B), 2 control inputs (F, F ) to select of four functions above (N, OR, NOT, addition). So, 2 bit LU. In circuit on next slide, assume INV (inverse of ) is, EN (enable input ) and ENB (enable input B) are. CS 6 Ward 23 CS 6 Ward 24

Simplified LU Circuit CS 6 Ward 25