Experiment 7: Magnitude comparators

Similar documents
EGC221: Digital Logic Lab

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Signals and Systems Digital Logic System

NAND, NOR and XOR functions properties

Combinational Logic. By : Ali Mustafa

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

EXPERIMENT #4: SIMPLIFICATION OF BOOLEAN FUNCTIONS

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Digital Logic (2) Boolean Algebra

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Gates and Flip-Flops

Sample Test Paper - I

Fundamentals of Digital Design

Implementation of Boolean Logic by Digital Circuits

Boole Algebra and Logic Series

Combinational Digital Design. Laboratory Manual. Experiment #6. Simplification using Karnaugh Map

Logic Gates and Boolean Algebra

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 2. Digital Logic Basics

Chapter 1: Logic systems

Chapter 3 Combinational Logic Design

Exam for Physics 4051, October 31, 2008

University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Midterm Examination

1 Boolean Algebra Simplification

Please read carefully. Good luck & Go Gators!!!

Combinational Logic. Course Instructor Mohammed Abdul kader

Unit 3 Session - 9 Data-Processing Circuits

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Function of Combinational Logic ENT263

Boolean Algebra & Digital Logic

Logic Design. Chapter 2: Introduction to Logic Circuits

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

MC9211 Computer Organization

CS 226: Digital Logic Design

Chapter 2: Switching Algebra and Logic Circuits

10/14/2009. Reading: Hambley Chapters

Unit 8A Computer Organization. Boolean Logic and Gates

Computer organization

University of Florida EEL 3701 Fall 1996 Dr. Eric M. Schwartz

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

NTE74LS181 Integrated Circuit TTL Arithmetic Logic Unit/Function Generator

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

EEE130 Digital Electronics I Lecture #4

Boolean Algebra. Philipp Koehn. 9 September 2016

Floating Point Representation and Digital Logic. Lecture 11 CS301

to become literate in most common concepts and terminology of digital electronics

CprE 281: Digital Logic

Chapter 2 Combinational Logic Circuits

Computer Organization: Boolean Logic

CprE 281: Digital Logic

Digital electronic systems are designed to process voltage signals which change quickly between two levels. Low time.

CHAPTER1: Digital Logic Circuits Combination Circuits

Boolean Algebra, Gates and Circuits

Foundations of Computation

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

CSE 20 DISCRETE MATH. Fall

Circuits & Boolean algebra.

Building a Computer Adder

DEPARTMENT OF ECE Faculty of Engineering and Technology, SRM University 15EC203J DIGITAL SYSTEMS LAB

Digital Electronics I

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

COMBINATIONAL LOGIC FUNCTIONS

Lecture (02) NAND and NOR Gates

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

Combinational logic systems

Switches: basic element of physical implementations

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

Chapter 7 Logic Circuits

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

mith College Computer Science CSC270 Spring 16 Circuits and Systems Lecture Notes Week 2 Dominique Thiébaut

Logic Gates - Introduction

Chapter 2 Boolean Algebra and Logic Gates

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Systems I: Computer Organization and Architecture

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Chapter 2 Combinational Logic Circuits

Logic Design. Digital Logic. Goal: to become literate in most common concepts and terminology of digital electronics

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Digital Electronics Circuits 2017

THE LOGIC OF COMPOUND STATEMENTS

CprE 281: Digital Logic

Cs302 Quiz for MID TERM Exam Solved

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

University of Florida EEL 3701 Summer 2015 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Tuesday, 30 June 2015

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Transcription:

Module: Logic Design Lab Name:... University no:.. Group no: Lab Partner Name: Experiment 7: Magnitude comparators Mr. Mohamed El-Saied Objective: Realization of -bit comparator using logic gates. Realization and implementation of 2-bit comparator using logic gates on breadboards. Implementation of 4-bit magnitude comparator using IC 7485. Components Required: Mini Digital Logic Trainer. IC Type 7486 Quadruple 2-input XOR gates. IC Type 748 Quadruple 2-input AND gates. IC Type 74 Quadruple 2-input NAND gates. IC Type 74 Triple 3-input NAND gates. IC Type 74L85 4-bit magnitude comparator. Switches for inputs and LED displays for outputs. Theory: Magnitude comparator is a combinational logic circuit that compares between two binary numbers A and B and determines their relative magnitudes. The output of the circuit is specified by three binary variables whether: A>B, A=B or A<B. Figure Block diagram of n-bit Magnitude Comparator. One -bit Magnitude Comparator: A comparator used to compare two -bit binary numbers. It has two binary inputs A, B and three binary outputs: greater than, equal and less than relations. Figure 2 below shows the block diagram and truth table of a single bit magnitude comparator. A B A=B A<B A>B (a)block diagram Figure 2 (b) Truth table

The Boolean functions describing the -bit magnitude comparator according to the truth table are: (A > B) = A'B (A = B) = A'B' + AB= ( A B) ' (A < B ) = AB' The logic diagram for -bit binary comparator implemented by XOR and basic logic gates is shown below in figure 3. Figure 3 Logic Diagram of -bit Comparator So we conclude that digital comparators actually use Exclusive-NOR gates within their design for comparing their respective pairs of bits. Two -bit Magnitude Comparator: A comparator used to compare two 2-bit numbers. It has 4 binary inputs (number A: A A, number B: B B ) and 3 binary outputs: greater than, equal and less than relations. Figure 4 below shows the block diagram and truth table of a two bit magnitude comparator. (a)block diagram (b) Truth table Figure 4 Using key-map, the simplified Boolean function for the outputs A>B, A=B and A<B is shown below: A>B: =A B '+A 'A B 'B '+A A B B ' = A B '+A B '(A 'B '+A B ) = A B '+A B '(A B ) ' A=B: =A 'A 'B 'B '+ A 'A B 'B + A A 'B B '+ A A B B =A 'B '+ A B ) (A 'B '+ A B ) = (A B ) ' (A B ) ' A<B: =A 'B +A 'A 'B 'B +A A 'B B = A 'B +A 'B (A 'B '+A B ) = A B '+A B '(A B ) ' 2

Based on the simplified Boolean functions for the three outputs A>B, A=B and A<B, the logic diagram of the 2-bit magnitude comparator is shown below: Figure 5 Logic Diagram of 2-bit Comparator Four-bit Magnitude Comparator: A comparator used to compare two 4-bit words. The two 4-bit numbers are word A: A 3 A 2 A A, and word B: B 3 B 2 B B ) So the circuit has 8 inputs and 3 binary outputs: A>B, A=B and A<B. (a)block diagram (b) Pin description for IC 7485 Figure (6) Figure 4 shows the block diagram and pin configuration of IC 7485 for 4-bit magnitude comparator. Three inputs are available for cascading comparators. This comparator generates an output of at one of three comparison outputs such that: If word A is bigger than word B; A>B output is, If word A is smaller than word B; A<B output is, If word A is equal to word B; A=B output is. 3

This IC can be used to compare two 4-bit binary words by grounding I (A>B), I (A<B) and I (A=B) connector input to Vcc terminal. How 4-bit comparator it works? Equality: Word A equal word B iff: A 3 =B 3, A 2 =B 2, A =B, A =B. Inequality: If A3 = and B3 =, then A is greater than B (A>B). Or If A3 and B3 are equal, and if A2 = and B2 =, then A > B. Or If A3 and B3 are equal & A2 and B2 are equal, and if A =, and B =, then A>B. Or If A3 and B3 are equal, A2 and B2 are equal and A and B are equal, and if A = and B =, then A > B. If A3 = and B3 =, then A is less than B (A<B). Or If A3 and B3 are equal, and if A2 = and B2 =, then A < B. Or If A3 and B3 are equal & A2 and B2 are equal, and if A =, and B =, then A<B. Or If A3 and B3 are equal, A2 and B2 are equal and A and B are equal, and if A = and B =, then A < B. Part A: Lab Practice Procedure:. Check all the components for their working. 2. Insert the appropriate ICs into the IC base. 3. Make connections as shown in the circuit diagram in figure 5. 4. Verify the Truth Table and observe the outputs. 5. Repeat the same steps but for the circuit diagram in figure (6) and apply inputs in the following table, also record the output at each: Conclusions: Magnitude comparator is studied. 4

Module: Logic Design Lab Name:... University no:.. Group no:. Lab Partner Name: Mr. Mohamed El-Saied Part B: Lab. Exercise: Students are directed to do the following exercise.. Name the logic gate used for testing the equality of two bits. Also draw the logic symbol and truth table. 2. Derive the Boolean expressions of 4-bit comparator. Draw the logic diagram for this comparator. 3. Design an 8 bit comparator using a two chips of IC 7485? 5