n-bit comparator using 1-bit comparator

Slides:



Advertisements
Similar presentations
1 The 2-to-4 decoder is a block which decodes the 2-bit binary inputs and produces four output All but one outputs are zero One output corresponding to.
Advertisements

ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
ReturnNext A circuit that compares two binary words and indicates whether they are equal is called a comparator. Some comparators interpret their input.
VHDL Structural Architecture ENG241 Week #5 1. Fall 2012ENG241/Digital Design2 VHDL Design Styles Components and interconnects structural VHDL Design.
Comparator.
Lecture #9 EGR 277 – Digital Logic
Combinational Logic and Verilog. XORs and XNORs XOR.
1 Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 1 OF 3) COMPARATORS CODE CONVERTERS.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
AOI Logic Implementation © 2014 Project Lead The Way, Inc.Digital Electronics.
AOI Logic Implementation
 Arithmetic circuit  Addition  Subtraction  Division  Multiplication.
XOR, XNOR, and Binary Adders
A little bit of exercise.. ;). Exercise Given to you are some binary to decimal examples : Given to you are some binary to decimal examples : Tens Units.
Using building blocks to make bigger circuits
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 4 Step 1 in transitioning to behavioral modeling. We will wire behavioral.
AOI Logic Implementation
Exclusive OR Gate. Logically, the exclusive OR (XOR) operation can be seen as either of the following operations:exclusive OR (XOR) 1. A AND NOT B OR.
Computing Systems Designing a basic ALU.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
Building a Faster Adder
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
EE3A1 Computer Hardware and Digital Design Worked Examples 3 Test and testability (1)
Designing Combinational Logic Circuits
Branch : IT Semester : 3 PREPARED BY:- Rajpurohit Shravansingh ( ) Patel Dipesh ( ) Shah Maulin( )
Lecture # 10 University of Tehran
Dual Sparkle Circuit Green connections are wires – they can be any colour. Make sure all + and - connections match up. Make sure the larger battery terminal.
1 Arithmetic Where we've been: –Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: –Implementing the Architecture.
BR 8/99 Arithmetic Operations We will review the arithmetic building blocks we have previously used, and look at some new ones. –Addition –incrementer.
Songs HKOI Problem Description Dr. Jones wants to play the lowest key possible Musical notes are represented by positive integers Increasing the.
0808/0809 ADC. Block Diagram ADC ADC0808/ADC Bit μP Compatible A/D Converters with 8-Channel Multiplexer The 8-bit A/D converter uses successive.
Discrete Systems I Lecture 10 Adder and ALU Profs. Koike and Yukita.
Computer Arthmetic Chapter Four P&H.
Dr. Clincy Professor of CS
Logic Gates.
Subtitle: How to design the data path of a processor.
Combinational Logic Design&Analysis.
Swamynathan.S.M AP/ECE/SNSCT
Multiplexers and Demultiplexers,
Exclusive OR Gate.
Sequential Circuit: Counter
Combinational Circuit Design
1 times equals 4 2 times equals 8 3 times equals 12 And 4 times 4 is 16 5 times is 20 And 6 fours are 24 7 fours -----
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
Schematics 201 Lecture Topic: Electrical Symbols
King Fahd University of Petroleum and Minerals
Digital Logic & Design Dr. Waseem Ikram Lecture No. 16.
Logic Gates.
VHDL Structural Architecture
Digital Systems Section 12 Binary Adders. Digital Systems Section 12 Binary Adders.
CS 140 Lecture 14 Standard Combinational Modules
Multiplexers Anindya IE CSE.
Princess Sumaya University
AOI Logic Implementation
Logic Gates.
Multiple function unit design
74LS283 4-Bit Binary Adder with Fast Carry
Notes Over 1.7 Solving Inequalities
Notes Over 1.7 Solving Inequalities
Arithmetic Circuits.
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

n-bit comparator using 1-bit comparator Our focus is on making n-bit circuit using 1-bit building block Comparing two n-bit numbers for their equality A ----> An-1 An-2 …………A0 B ----> Bn-1 Bn-2………….B0 First, we shall compare the two numbers for equality Start with MSB and compare one bit at a time If the bit of one number is greater than the corresponding bit of the other number, then the number is greater. This becomes the solution Else, i.e if the two bits are equal, then compare the next bit. Repeat the last two steps

Basic building block for n-bit comparator 1-bit comparator forms the building block for comparing two n-bit numbers. E is the cascading signal Ei+1 is the Cascading input, Ei is the cascading output Ei+1 = 1 implies that the two numbers are not equal so far Ei+1 = 0 implies that the two numbers are equal so far If Ei+1 = 1, then Ei = 1 Else, Ei = Ei+1 + (Ai XOR Bi ) Ai Bi Ei+1 Ei

Using 1-bit building blocks to make n-bit circuit Using the building block, we can build an n-bit comparator circuit What is the value of input En ? The final result is, if E0 = 0, then A = B and if E0 = 1, then A != B An-2 Bn-2 En En-1 E1 E0 An-1 Bn-1 A0 B0

1-bit complex comparator Next, we compare the two numbers for A > B, A = B or A < B The basic building block for the purpose is as shown The primary inputs are Ai and Bi Cascading inputs are (A>B)in, (A=B)in and (A<B)in, and Cascading outputs are (A>B)out, (A=B)out and (A<B)out The equations can be directly written as (A>B)out = (A>B)in + (A=B)in . (Ai.Bi’) (A<B)out = (A<B)in + (A=B)in . (Ai’.Bi ) (A=B)out = (A=B)in . (Ai Bi + Ai’.Bi’) Ai Bi (A>B)in (A=B)in (A<B)in (A>B)out (A=B)out (A<B)out

1-bit simplified complex comparator The 1-bit complex comparator block is modified to have fewer cascading signals It has two primary inputs, two cascading inputs, and two cascading outputs The equations for the outputs are (A>B)out = (A>B)in + (A<B)in’ . ( Ai Bi’ ) (A<B)out = (A<B)in + (A>B)in’ . ( Ai’ Bi ) If both (A>B)out and (A<B)out are 0 then the two bits are equal Ai Bi (A>B)in (A<B)in (A>B)out (A<B)out

1-bit maximizer building block The 1-bit maximizer block is similar to the simplified complex comparator It has two primary inputs, one primary output, two cascading inputs, and two cascading outputs The primary output M is 1 if depending on which input is greater The equations for the outputs are (A>B)out = (A>B)in + (A<B)in’ . ( Ai Bi’ ) (A<B)out = (A<B)in + (A>B)in’ . ( Ai’ Bi ) M = (A>B)in . A + (A<B)in . B + (A>B)in’ . (A<B)in’ . (Ai + Bi) Ai Bi (A>B)in (A<B)in (A>B)out (A<B)out M