Outline Analysis of Combinational Circuits Signed Number Arithmetic

Slides:



Advertisements
Similar presentations
Modular Combinational Logic
Advertisements

Combinational Circuits
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
التصميم المنطقي Second Course
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
Combinational Logic Chapter 4. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Combinational Logic Chapter 4.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Chapter 3 Combinational Logic Design
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Combinational Circuits
Combinational Circuits
Digital Logic Lecture 08 By Amr Al-Awamry. Combinational Logic 1 A combinational circuit consists of an interconnection of logic gates. Combinational.
Combinational Logic Design
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Logic Chapter 4.
Combinational Logic Chapter 4. Digital Circuits Combinational Circuits Logic circuits for digital system Combinational circuits the outputs are.
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Combinational Circuits
Combinational Logic. Outline 4.1 Introduction 4.2 Combinational Circuits 4.3 Analysis Procedure 4.4 Design Procedure 4.5 Binary Adder- Subtractor 4.6.
Digital Arithmetic and Arithmetic Circuits
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
Digital System Ch4-1 Chapter 4 Combinational Logic Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
1 Combinational Logic Design Digital Computer Logic Kashif Bashir
CHAPTER 4 Combinational Logic
Unit 2 Combinational Circuits. Introduction Logic circuits for digital systems may be either combinational or sequential. A combinational circuit consists.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Circuits
CEC 220 Digital Circuit Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices Adders,subtractors, ALUs.
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Chapter 4 Combinational Logic. 4.1 Introduction   Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Mantıksal Tasarım – BBM231 M. Önder Efe
Chap 3. Combinational Logic Design
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Combinational Circuit Design
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Chapter 4 Combinational Logic
Combinatorial Logic Design Practices
FIGURE 4.1 Block diagram of combinational circuit
INTRODUCTION TO LOGIC DESIGN Chapter 4 Combinational Logic
Ch 4. Combinational logic
Digital System Design Combinational Logic
Chapter-4 Combinational Logic
XOR Function Logic Symbol  Description  Truth Table 
ECB2212-Digital Electronics Numbering Systems
Arithmetic Circuits.
Presentation transcript:

Outline Analysis of Combinational Circuits Signed Number Arithmetic Binary Adder-Subtractor Binary Multiplier Magnitude Comparator Decoders Encoders Multiplexers Three-state Gates

Analysis of Combinational Circuits Given a combinational circuit diagram determine the function of the circuit. Label all gate outputs with arbitrary symbols. Determine the functions for each gate output. Repeat the process until the function for the outputs are obtained. Substitute the functions for arbitrary symbols until out functions are expressed in terms of input variables.

Combinational Circuit Analysis

Combinational Circuit Analysis

Combinational Circuit Design Given a specification for the circuit: Determine the number of inputs and outputs Derive the truth table for the output functions Obtain simplified Boolean functions for each output Draw the logic diagram using gates and verify the design (simulation, manually)

Combinational Circuit Design Example 1 Problem: Number-of-1s Counter Design a circuit that counts the number of 1s present on three inputs a,b,c and outputs that number in binary using two outputs, y and z. abc=001  yz=01 abc=011  yz=10

Combinational Circuit Design Example 1

Combinational Circuit Design Example 1 y=ac+bc+ab z is an odd-function

Combinational Circuit Design Example 2 Implement a circuit that can detect (output=1) whether a pattern of at least three adjacent 1’s occur anywhere in a an 8-bit input. if input abcdefgh=00011100 output=1. if input abcdefgh=01010110 output=0. if input abcdefgh=00111110 output=1.

Combinational Circuit Design Example 2 Truth Table for Pattern Detector There are 8 input variables. The truth table will have 2^8=256 rows. In this case try the to find equation that lists the possible occurrences of three 1s in a row. Output z=abc+bcd+cde+def+efg+fgh

Combinational Circuit Design Example 2

Combinational Circuit Design Example 3 Problem: Convert BCD code to Excess-3

Combinational Circuit Design Example 3

Combinational Circuit Design Example 3

Combinational Circuit Design Example 3

Half Adder X + Y = C S

Half Adder Verilog

Half Adder Verilog Using XOR Verilog 2001,2005 Syntax

Binary Adder - Subtractor

Binary Adder - Subtractor

Binary Adder - Subtractor 2-level AND-OR implementation

Binary Adder - Subtractor Using 2 Half-Adders

Binary Adder - Subtractor Verilog Description

Verilog Dataflow Modeling Dataflow modeling uses assign statements for continuous assignment The data type net is used to represent physical connection between circuit elements. A net is declared by wire or by declaring an identifier to be an output port. A continuous assignment assigns a value to a net. assign Y=A & B specifies that output of an AND gate is connected to wire Y.

Verilog Operators

Binary Adder - Subtractor

4-bit Binary Adder

Binary Adder Carry Propagation Each gate generates a delay d called propagation delay. Propagation delay in a circuit is delay of a gate times the number of gate levels. In a full adder the input carry cin propagates to output carry cout through an AND gate followed by an OR gate. One stage of a full adder generates 3d delay. For four stages of a 4-bit full adder total delay is 4*3d=12d.

Carry Lookahead

Carry Lookahead Adder

Carry Lookahead For a 4 bit adder

Carry Lookahead Generator

Carry Lookahead Adder

Signed Numbers Signed number representation: Use most significant bit as sign bit . If sign bit=0 number is positive sign bit=1 number is negative Three types of signed number representation. For 8-bit number +9=00001001 Sign Magnitude: +9=00001001 -9=10001001 Signed 1-s complement: +9=00001001-9=11110110 Signed 2-s complement: +9=00001001 -9=11110111

Signed Addition and Subtraction Add the numbers including the sign bits, discarding a carry out of the sign bits (2’s Complement) The sign of the result is computed in step 1. For subtraction in x – y use y, get –y

Overflow If the numbers are unsigned overflow is the carry from most significant position. If the numbers are signed Result is different from what it is supposed to be  Then there is overflow When carry into sign bit position and carry out are not equal

Binary Adder-Subtractor Binary subtraction can be done by using complements. In the figure when M=0 S=A+B when M=1 S=A+(2^4-B)+1

Decoders A decoder is a combinational circuit that converts binary information from n-input lines to a maximum of 2^n unique output lines. Decoders are called n-to-m line decoders where m <= 2^n

Decoders

4-to-16 Decoder using two 3-to-8 Decoders

Boolean Function Implementation using Decoders Using a n-to-2n decoder and OR gates any functions of n variables can be implemented. Example: S(x,y,z)= Σ(1,2,4,7) C(x,y,z)=Σ(3,5,6,7) Functions S and C can be implemented using a 3-to-8 decoder and two 4-input OR gates

Implementation of S and C

Encoders An Encoder performs the inverse operation of a decoder. Has 2^n or less input lines and n outputs.

Encoders Octal to binary encoder outputs x,y,z are: x=D4 + D5 + D6 + D7 y=D2 + D3 + D6 + D7 z=D1 + D3 + D5 + D7 If more than one input is 1 there will be an ambiguity. Usually a priority between inputs are set so that the code for the highest priority input is generated.

Priority Encoder A priority encoder will assign priorities to its inputs. It will also have an output V =1 for valid inputs and V=0 for all inputs are 0.

Multiplexer A multiplexer is a combinational circuit that selects information from one of many input lines and directs it to a single line.

4x1 Multiplexer

Implement Boolean function using Multiplexer Using a 4x1 multiplexer

Example Using 8x1 multiplexer implement

Three State Gates The tri-state gate acts as a switch opened or closed by the control input C.

Multiplexer with tri-state buffers

Chapter 4 - Summary Analysis of Combinational Circuits Signed Number Arithmetic Binary Adder-Subtractor Binary Multiplier Magnitude Comparator Decoders Encoders Multiplexers Three-state Gates