1
float a = 1000.1;  
int b = (int)a;  // how is this done?

Can anyone explain the bit level operations for converting a floating point to an integer?

dontloo
  • 10,067
  • 4
  • 29
  • 50
  • Does this help? https://stackoverflow.com/questions/20302904/converting-int-to-float-or-float-to-int-using-bitwise-operations-software-float – NPE Sep 29 '19 at 07:30

0 Answers0