You are on page 1of 10

DIGITAL SYSTEMS WLE-103

DESIGN OF 4-BIT MAGNITUDE COMPARATOR

In this lecture you will learn about:

Magnitude comparator How to design a 4-bit comparator

WHAT IS A MAGNITUDE COMPARATOR

A magnitude comparator is a combinational circuit that compares: Two numbers, A and B, and then determines their relative magnitudes. A>B A=B A<B

BASIC INTRODUCTION TO THE TOPIC Inputs First n-bit number A Second n-bit number B Outputs 3 output signals (GT, EQ, LT), where:

1. GT = 1 IFF A > B 2. EQ = 1 IFF A = B 3. LT = 1 IFF A < B Note: Exactly One of these 3 outputs equals 1, while the other 2 outputs are 0`s

4-bit magnitude comparator Inputs: 8-bits (A 4-bits , B 4-bits) A and B are two 4-bit numbers Let A = A3A2A1A0 , and Let B = B3B2B1B0
Inputs have 28(256) possible combinations

Not easy to design using conventional techniques

4-BIT MAGNITUDE COMPARATOR Algorithm


Consider two numbers, A and B, with four digits each:

4-BIT MAGNITUDE COMPARATOR

4-BIT MAGNITUDE COMPARATOR

4-BIT MAGNITUDE COMPARATOR Gate implementation for the three output variable shows a lot of logic circuitry being used repeatedly. For example: The unequal output can use the same gates that are needed to generate the equal output This is a multi level implementation and it has a regular pattern

TOPIC
ENDS

HERE!

You might also like