Digital comperator : 1-bit and multi-bit Name: Krutarth shah Enrollment no:2404010107068
What is digital comperator ? A digital comperator is a combinational logic circuit that compares two binary numbers and indicates whether one is greater than, less than, or equal to the other.
Types of Digital comperator : 1) Identity Comparator: This type has a single output that is active (high) only when the two input numbers are identical. All other outputs are inactive. 2) Magnitude Comparator: This is the most common type, which provides three outputs to indicate the complete relationship between the two input numbers: Such as A>B, A<B, A=B;
1-BIT COMPERATOR WORKING :- A < B (Less Than): This output is only high (logic 1) when A is 0 and B is 1. The Boolean expression is A’B. A = B (Equal To): This output is high when both inputs are the same (both 0 or both 1). The Boolean expression is A’B’ OR AB. A > B (Greater Than): This output is only high when A is 1 and B is 0. The Boolean expression is AB’.
2-BIT COMPERATOR
4-BIT COMPERATOR CASE 1: A=A1,A2,A3,A4 B=B1,B2,B3,B4 A>B-> A3>B3 OR IF A3=B3 and A2>B2 OR IF A3=B3 and A2 =B2 and A1>B1 OR IF A3=B3 and A2=B2 and A1=B1 and A0>B0
CASE 2 : A<B A3<B3; OR IF A3=B3 and A2<B2; OR A3=B3 AND A2=B2 AND A1<B1; OR IF A3=B3 AND A2=B2 AND A1=B1 AND A0<B0;