Interview Question

Interview

describe a logic system that given 2 numbers (of unknown

  binary length) output the greater number of the two
Answer

Interview Answer

1 Answer

0

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, Sign In or Sign Up.