Comparators are vital components in the arithmetic units of digital systems as they play a key role in comparing two numbers and determining their relative magnitudes. This comparison operation is crucial for establishing whether a number is greater than, equal to, or less than another number. A magnitude comparator is a type of combinational circuit used for comparing two numbers, A and B, and determining their relationship in terms of magnitude (greater than, equal to, or less than). A basic block diagram of an N-bit magnitude comparator is illustrated in Fig. 1. The result of the comparison is typically represented using three binary variables indicating whether A is greater than B, A is equal to B, or A is less than B.
When comparing two n-bit numbers, the comparator circuit requires 2n inputs and has 22n entries in the truth table. For example, a 2-bit comparator has 4 inputs and a truth table with 16 rows, while a 3-bit comparator has 6 inputs and a truth table with 64 rows. In the case of a 2-bit magnitude comparator, it is specifically designed to compare two numbers with two bits each, denoted as A1, A0, B1, and B0. Consequently, the corresponding truth table has 4 inputs and 16 entries.
Author(s) Details:
Ch. Ganesh,
Electronics and Communication Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Hyderabad, India.
T. Sravan Kumar,
Electronics and Communication Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Hyderabad, India.
S. Pallavi,
Electronics and Communication Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Hyderabad, India.
G. Sai Preetham Reddy,
Electronics and Communication Engineering, VNR Vignana Jyothi Institute of Engineering and Technology, Hyderabad, India.
To Read the Complete Chapter See Here