5 Combinatorial Components. 5.0 Full adder. Full subtractor



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

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

COMBINATIONAL CIRCUITS

Sistemas Digitais I LESI - 2º ano

Understanding Logic Design

Let s put together a Manual Processor

Systems I: Computer Organization and Architecture

Combinational Logic Design

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.

Chapter 2 Logic Gates and Introduction to Computer Architecture

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

Two-level logic using NAND gates

Combinational circuits

Binary Adders: Half Adders and Full Adders

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

EE360: Digital Design I Course Syllabus

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

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

CHAPTER 7: The CPU and Memory

Computer organization

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

CHAPTER 3 Boolean Algebra and Digital Logic

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

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

CSE140: Components and Design Techniques for Digital Systems

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

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

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Register File, Finite State Machines & Hardware Control Language

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

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

DEPARTMENT OF INFORMATION TECHNLOGY

3.Basic Gate Combinations

Gates, Circuits, and Boolean Algebra

16-bit ALU, Register File and Memory Write Interface

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

CPU Organisation and Operation

MICROPROCESSOR AND MICROCOMPUTER BASICS

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Computer Architecture

Chapter 10 Computer Design Basics

Figure 8-1 Four Possible Results of Adding Two Bits

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

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

The string of digits in the binary number system represents the quantity

Systems I: Computer Organization and Architecture


CSE140 Homework #7 - Solution

Microprocessor & Assembly Language

Two's Complement Adder/Subtractor Lab L03

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

CONTENTS PREFACE 1 INTRODUCTION 1 2 NUMBER SYSTEMS AND CODES 25. vii

Chapter 9 Computer Design Basics!

1 Classical Universal Computer 3

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

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

Lab 1: Full Adder 0.0

Combinational-Circuit Building Blocks

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

HOMEWORK # 2 SOLUTIO

Gates, Plexers, Decoders, Registers, Addition and Comparison

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

BINARY CODED DECIMAL: B.C.D.

Lecture N -1- PHYS Microcontrollers

Computer Organization. and Instruction Execution. August 22

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

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

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

Systems I: Computer Organization and Architecture

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Lecture 8: Binary Multiplication & Division

Digital Electronics Detailed Outline

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Sequential Circuit Design

MACHINE INSTRUCTIONS AND PROGRAMS

Solution for Homework 2

An Effective Deterministic BIST Scheme for Shifter/Accumulator Pairs in Datapaths

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Lecture 2. Binary and Hexadecimal Numbers

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Computer Systems Design and Architecture by V. Heuring and H. Jordan

ANALOG & DIGITAL ELECTRONICS

The components. E3: Digital electronics. Goals:

Digital Multiplexer and Demultiplexer. Features. General Description. Input/Output Connections. When to Use a Multiplexer. Multiplexer 1.

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Operating Manual Ver.1.1

DB19. 4-Bit Parallel Adder/ Subtractor. Digital Lab Experiment Board Ver. 1.0

Multipliers. Introduction

Transcription:

5 Combatorial Components Use for data transformation, manipulation, terconnection, and for control: arithmetic operations - addition, subtraction, multiplication and division. logic operations - AND, OR, XOR, and NOT. comparison operations - greater than, equal to, and less than. bit manipulation operations - shift, rotation, extraction, and sertion. terconnect components - selectors, and buses - used to connect different components together. conversion components - decoders and encoders - used for conversion between different codes. universal components - ROMs and programmable-logic arrays (PLAs) - used primarily the design of control units. 5. Full adder x i y i c i c i+ s i i c i+ = x i ' y i ' c i + x i ' y i c i ' + x i y i ' c i ' + x i y i c i = (x i ' y i + x i y i ') c i ' + (x i ' y i ' + x i y i ) c i = (x i y i ) c i ' + (x i ~ y i ) c i = (x i y i ) c i = x i ' y i c i + x i y i ' c i + x i y i c i ' + x i y i c i = x i y i (c i ' + c i ) + c i (x i ' y i + x i y i ') = x i y i + c i (x i y i ) x i y i X c i+ c i Cout C S Circuit for Full Adder s i Full subtractor b x y b out d Comment x-b -y = d = - = -- = borrow 2- = --= with no borrow --= with no borrow x=-=- because of b =, therefore, borrow 2-=. Fally, -= x-b -y=borrow 2--= --= with no borrow x-b =-=. Then -=borrow 2-=

2 x'y 2 x'b yb xy b xy b b = x b + x y + yb out x y d = x y b = b = b = b + xyb ( x y + xy) + b ( x y + xy ) ( x y) + b ( x y) x y + x yb + xy b b X b out b out FS b d Circuit for Full Subtractor 5. Ripple-carry adders d x 7 y 7 x 6 y 6 x 5 y 5 x 4 y 4 x y x 2 y 2 x y x y c out c 7 c 6 c c c 5 c 4 2 c c s 7 s 6 s 5 s 4 s s 2 s s 5. Adder / Subtractor S x 7 y 7 x 6 y 6 x 5 y 5 x 4 y 4 x y x 2 y 2 x y x y S Function Comment X + Addition X + + Subtraction c c 6 c c out 5 c c 4 2 c 7 c c f 7 f 6 f 5 f 4 f f 2 f f 5.4 Logic Unit

5.5 Arithmetic-Logic Unit (ALU) a b a 2 b 2 a b a b S S M c c c 4 c 2 c Overflow f f 2 f f Arithmetic Extender () The modifies the second operand and passes it to the to perform the arithmetic. M S S Function Name Function X c Decrement A A all s Add A + B A B Subtract A + B + A B Increment A + A all s Functional table M S S b i y i Truth table SS bi 2 y i = MS b i + MS b i Map representation S'b'i S'bi S S M b i y i = MS S b i + MS S b i + MS S b i + MS S b i = MS b i (S + S ) + MS b i (S + S ) = MS b i + MS b i y i Schematic diagram

Logic Extender () The logic operations are performed the logic extender. The s are used simply as connections for the outputs. M S S Function Name Function X c Complement A A AND A AND B A AND B Identity A A OR A OR B A OR B Functional table a i b i M S S x i Indices map a i, 4 a i b i a i, 4 a i + b i 7,, 5 X X a i pass to Truth table S S M x i Schematic diagram M = M = SS ai bi 2 2 5 4 2 2 5 4 S S M a i b i 8 9 8 9 x i = M S S a i + M S S b i + S a i b i + S a i + Ma i Map representation Simplified schematic diagram x i Carry signal c Notice that the functional table, c = MS Overflow signal c 4 The carry-out of the most significant bit represents an overflow the case of unsigned arithmetic. Overflow The XOR of the carry-outs of the two most significant bits represents the overflow the case of 2 s complement arithmetic.

5.6 Decoders / Demultiplexers To enable only one of n components. E A A C C 2 C C A A E Decoder 2 C C 2 C C 2-to-4 Decoder E A 2 A A E E E E E E E C 7 C 6 C 5 C 4 C C 2 C C -to-8 decoder implemented with -to-2 decoders 5.7 s / Multiplexers (MUX) S S D D D 2 D S S D D 2 D D 2 MUX 4-to- MUX D 7 D 6 D 5 D 4 D D 2 D D D 7 D 6 D 5 D 4 D D 2 D D S S S S S S S S S S 2 Decoder 2 4 5 6 7 S S 2 S 8-to- mux implemented with 2-to- muxes y y 8-to- mux implemented with a decoder

5.8 Buses A bus is for connectg several components together, however, only one component can send data to the bus at any one time. To construct a bus, use a tristate driver, whose output provides three different values,,, and Z. The value Z represents a high-impedance state which can be thought of as a disconnection from the bus. E D E D Bus E Z D 5.9 Priority Encoders A priority encoder has: n puts, D n-, D, m outputs, A m-, A, where n = 2 m, which represents the dex (decimal value) of the most significant put bit D i that has a value equal to. an additional output call Any, which will be whenever any of the puts has a value that is different from. 2-to- priority encoder D D Encoder Any A 4-to-2 priority encoder D D 2 D 2 Encoder Any A A D D D A Any X D D 2 D D A A Any X X X X X X 5. Magnitude Comparators A comparator compares two positive tegers X and and then generates two boolean results G and L as follows: Test G L X > X X < X X X = For the n-bit tegers X and, we compare them one bit at a time, startg with the most significant bit, G i = (x i > y i ) or [(x i = y i ) and (G i- > L i- )] L i = (x i < y i ) or [(x i = y i ) and (G i- < L i- )]

x y x y G L a b a b 8 9 2 2 5 4 a b a b G = a b + a a b + b a b 2 x y x y 2 5 4 8 9 G L = a b + a a b + b a b L 5. Shifters and Rotators Use selectors to implement. S 2 S S Comment D No shift Not used ShiftLeft(D) Shift left RotateLeft(D) Rotate left ShiftRight(D) Shift right RotateRight(D) Rotate right

Left Input S d d 2 d d Right Input 2 2 2 2 S S 2 y y 2 y y 5.2 Read-Only Memories ROMs can be thought of as a universal logic element that is able to implement concurrently several different Boolean functions that are defed on the same set of variables. A 6 4 ROM can implement 4 functions. Programmable ANDs and ORs. a a b c d b c = d a a b c d b c = d Use a 6 4 ROM to implement the followg two functions: f = w x' y' z + w x' y z' + w' x y' z' f = x y + w' z + w x' y OR array z y x w A A A 2 A 2 4 5 6 4-to-6 7 decoder 8 9 2 4 5 f f

5. Programmable Logic Arrays (PLA) ROMs are not very efficient when we use them to implement sparse functions, i.e. functions with only a small number of s because such cases, many of the words the ROM will have a value of, which is a waste of silicon area. A PLA differs from a ROM the address decoder. Instead of a full decoder, PLAs use a programmable decoder call an AND array. Use a 4 8 4 PLA to implement the followg two functions: f = w x' y' z + w x' y z' + w' x y' z' f = w' x y + w y' z M S S A A 2 A b A OR array AND array 2 4 5 6 7 output array f f 2 f f c y