NVIDIA interview question

4. Fixed point math questions. For example, how do you compute 17/2 without resorting to floating point math?

Interview Answers

Anonymous

13 Aug 2016

4. Multiply 17 and 2 by 10, so 170 and 20, and divide 170 by 20 to get 85. Your answer is 85, and you can't divide 85 by 10 again because you'll lose that 0.5. Fixed point math basically says you redefine your numbers so 10 in your system is 1 in the "real world" system.

1

Anonymous

2 Apr 2019

17/2 is right shift 17 by 1 bit. Which will be 8.