Interview Question

Anonymous Interview

describe a logic system that given 2 numbers (of unknown

  binary length) output the greater number of the two

Interview Answer

1 Answer


subtract the numbers. represent each of the numbers in two's complement and also the result of the subtraction. if the MSB of the subtraction is 1 than the first number is larger, else the second one is.

Interview Candidate on Feb 12, 2010

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up