2 votes 2 votes The total number of comparisons performed in a 8-bit magnitude comparator consist of inputs A[A4, A3, A2, A1] and B[B4, B3, B2, B1] then condition for A>B is : A 255 x 26 B 255 x 27 C 255 x 28 D 255 x 29 Digital Logic digital-logic + – gauravkc asked Jan 27, 2018 gauravkc 1.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes for A > B = (2 (^ (2^n) ) – 2^n )/2 (n = number of bits ) = (2 (^ (2^8) ) – 2^8 )/2 = (2 (^ (16) ) – 2^8 )/2 = ((2^8) * (2^8) – 1) )/2 = 128(255) = 255 x 2^7 vipin.gautam1906 answered Dec 2, 2020 vipin.gautam1906 comment Share Follow See all 4 Comments See all 4 4 Comments reply aforgate commented Jan 7, 2021 reply Follow Share Can you explain more ? 0 votes 0 votes aforgate commented Jan 7, 2021 reply Follow Share Like what exactly question wants to ask . And what is formula you have used. 0 votes 0 votes vipin.gautam1906 commented Jan 7, 2021 reply Follow Share Say you have 1 bit comparator and making comparation between A and B A B A>B A<B A=B 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 Now see.. with 1 bit we get 4 encodings...2^2n for A = B we get 2 encodings… which is 2^n A > B and A< B will always have an equal number of encodings..observe the table above. therefore just divide everything by 2. All encodings after removing A = B …. now encodings for A<B or A>B will be → (2^2n – 2^n)/ 2 put 8 in place of n… (2^2*8 – 2^8) / 2 2^8(2^8 - 1) / 2 2^7(255) – > 255 x 2^7 1 votes 1 votes aforgate commented Jan 8, 2021 i edited by aforgate Jan 8, 2021 reply Follow Share Thank you so much bro. But here it is given 8 bit but in question it have 4 bits in A and 4 bits in B . It means it is 4 bit comparator ??? 0 votes 0 votes Please log in or register to add a comment.