Explain the working of a 2-bit digital comparator, Computer Engineering

Assignment Help:

Explain the working of a 2-bit digital comparator with the help of Truth Table.

Ans.

Digital comparator is a combinational circuit which compares two numbers, A and B; and evaluates their relative magnitudes. The outcome of the comparison is given by three binary variables which indicate whether A = B or A > B or A < B.

Comparators can be implemented for comparing multi-bit numbers. Figure (a) demonstrates the block diagram of an n-bit comparator. This acquires two n-bit numbers A and B as inputs and the outputs are A = B, A > B and A < B. Depending on the relative magnitude of the two numbers, one of the outputs will be HIGH. Table no6.2 provides the truth table of a 2-bit comparator.

1920_block diagram of n bit compartor.png

Fig.(a)block diagram of n bit compartor

(I) If the magnitude of the inputs A and B are equal (that is, A = B): see two numbers, A and B as inputs along with two digits each that is, A1, A0 and B1, B0. The two numbers are equivalent if all pairs of significant digits are equal that is, if A1 = 0, A0 = 0, B1 = 0, B0 = 0, then A1 = B1 and A0 = B0. For illustration if A1 = 0, A0 = 0, B1 = 0, B0 = 0, then pairs of significant digits that is, A1 = B1 = 0 and A0 = B0 =0.  Output for this combination turns into 1 for A = B and 0 for A < B and A > B. It is specified in the Truth Table.

 (II) If the magnitude of the input A is greater than or less than B (that is, A > B or A < B): To find out if A is greater than or less than B, we inspect the relative magnitude of pairs of significant digits starting from the most significant position. If the two digits are equivalent, we compare the subsequent lower significant pair of digits. The comparison of these continues till a pair of unequal digits is reached.

(i)If the input A is greater than B (that is, A > B):  If the consequent digit of A is 1 and that of B is 0, we terminate that A > B.  For illustration if A1 = 0, A0 = 1, B1 = 0, B0 = 0, then pairs of significant digits are A1 = B1 =0, and A0 (that is, digit 1) > B0 (that is, digit 0). It is illustrated in the Truth Table.

(ii) If the input A is less than B (that is, A < B): If the consequent digit of A is 0 and B is 1, we determine that A < B.  For illustration if A1 = 0, A0 = 0, B1 = 0, B0 = 1, then pairs of significant digits are A1 = B1 =0, and A0 (that is, digit 0) < B0 (that is, digit 1). It is illustrated in the Truth Table.

 

Inputs

 

 

 

Outputs

 

A0

B1

B0

A > B

A = B

A < B

0

0

0

0

1

0

0

0

1

0

0

1

0

1

0

0

0

1

0

1

1

0

0

1

1

0

0

1

0

0

1

0

1

0

1

0

1

1

0

0

0

1

1

1

1

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

0

1

0

0

1

0

0

1

1

0

0

1

1

0

0

1

0

0

1

0

1

1

0

0

1

1

0

1

0

0

1

1

1

0

1

0

 

Table no.2 Truth Table of a 2-Bit Comparator


Related Discussions:- Explain the working of a 2-bit digital comparator

Classification of pipeline processors, Classification of Pipeline Processor...

Classification of Pipeline Processors In this part, we explain various types of pipelining that can be useful in computer operations. These types depend on the following factor

Pseudocode, 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

What are links and associations, What are links and associations? Link ...

What are links and associations? Link is a physical or conceptual connection between objects. A link is an instance of an association.  Association is a explanation of group

Input device used in computer system, Input device used in computer system:...

Input device used in computer system: An input device is typically a mouse or keyboard, the input device is the conduit through which data and instructions enter a computer. A

What are the page headers for secondary lists, What are the page headers fo...

What are the page headers for secondary lists? On secondary lists, the system does not show a standard page header and it does not trigger the event. TOP-OF-PAGE.  To make page

Kruskal''s, Image Segmentation with Minimum Spanning Forests (50 points). D...

Image Segmentation with Minimum Spanning Forests (50 points). Develop a Python 3 implementation of the image segmentation algorithm that we explored on the first day of class. Your

RS232C schematic diagram, Can someone provide me a scehmatic diagram of RS2...

Can someone provide me a scehmatic diagram of RS232C with explanation?

How enterprises are using bpr in their e-business processes, One of the mos...

One of the most important competitive strategies for E-Businesses today is business process reengineering. BPR is more than automating business processes to make modest improvement

Explain dead code elimination, Explain briefly Dead code Elimination of the...

Explain briefly Dead code Elimination of the commonly used code optimization techniques Dead code Elimination: Code which is unreachable or which does not influence the pr

Find 10s complement for decimal number, Q. Find 10's complement for decimal...

Q. Find 10's complement for decimal number? Adding 1 in 9's complement produces 10's complement. 10's complement of 0256 = 9743+1 = 9744. Please note on adding the number in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd