244 views

2 Answers

1 votes
1 votes
In $A_{3}A_{2}A_{1}A_{0}$ there are maximum 16 terms.

Similarly in$B_{3}B_{2}B_{1}B_{0}$ also has 16 terms.

So, for $A>B$

When $B=0$, A could take 1 to 15, i.e. 15 terms.

When $B=1$, A could take 14 terms.

..................................

When $B=14$, A could take only 15

So, 15 terms of B could takes $1+2+3+..........+15$ terms for A

So, total $\frac{15\times 16}{2}$=120 terms
0 votes
0 votes

truth table contents will be 22n

total comparisons will be 16 * 16 =256 

out of which 16 will be equal for the A=B(ex: A=0000 , B=0000---one case)

Now for A>B and A<B

there must be equal number of cases so leftover cases will be 256 - 16= 240

so only for A>B = 240/2 =120 is the answer

Related questions

1 votes
1 votes
2 answers
1
0 votes
0 votes
3 answers
3
0 votes
0 votes
1 answer
4