project report 2-bit comparator
Post on 27-Oct-2014
477 Views
Preview:
DESCRIPTION
TRANSCRIPT
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
UNIVERSITY OF ENGINEERING
AND TECHNOLOGY TAXILA, Sub-
Campus Chakwal
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
Group Members
Zohaib Jahan 10-ECT-96
Muhammad Sarwar 10-ECT-93
Shahzad Hussain 10-ECT-67
Javaid Alyas Lodhi 10-ECT-71
Muhammad Waqas 10-ECT-63
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
Defintion :
A digital comparator or magnitude comparator is a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than, less than or equal to the other number.
Applications :
Comparators are used in a central processing units (CPU) and microcontrollers. Examples of digital comparator include the CMOS 4063 and 4585 and the TTL 7485 and 74682-'89. The analog equivalent of digital comparator is the voltage comparator. Many microcontrollers have analog comparators on some of their inputs that can be read or trigger an interrupt.
Implementation :
Consider two 2-bit binary numbers A and B such that
A = A1 . A0
B = B1 . B0
Here each subscript represents one of the digits in the numbers.
Equality
The binary numbers A and B will be equal if all the pairs of significant digits of both numbers are equal, i.e.,
A1 = B1 and A0 = B0
Since the numbers are binary, the digits are either 0 or 1 and the boolean function for equality of any two digits Ai and Bi can be expressed as
.
xi is 1 only if Ai and Bi are equal.
For the equality of A and B, all xi variables (for i=0,1,2,3) must be 1.
So the quality condition of A and B can be implemented using the AND operation as
(A = B) = x1
The binary variable (A=B) is 1 only if all pairs of digits of the two numbers are equal.
Project of DLD : 2-Bit Comparator
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
Inequality
In order to manually determine the greater of two binary numbers, we inspect the relative magnitudes of pairs of significant digits, starting from the most significant bit, gradually proceeding towards lower significant bits until an inequality is found. When an inequality is found, if the corresponding bit of A is 1 and that of B is 0 then we conclude that A>B.
This sequential comparison can be expressed logically as:
(A>B) and (A < B) are output binary variables, which are equal to 1 when A>B or A<B respectively.
Circuit Diagram
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
The operation of a two bit digital comparator can be expressed as a truth table:
Truth Table
Ao A1 B0 B1 F1 F2 F3 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 1 0 0
Equations :
Minterms
A=B F1 = (0,5,10,15)
A<B F2 = (4,8,9,12,13,14)
A>B F3 = (1,2,3,6,7,11)
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
K-MAPS for Functions F1 , F2 , F3 are :
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
Project Rep0rt for Digital Logic Design : 2-bit comparator
Zohaib Jahan 10-ECT-96 facebook.com/zohaibjahan
THE END
UNIVERSITY OF ENGINEERING AND
TECHNOLOGY TAXILA, Sub-Campus Chakwal
(Report made by Zohaib Jahan: BSc Electronic Engineering )
www.facebook.com/zohaibjahan ::: zohaibjahan@yahoo.com
top related