After discovering bit fields for discovering the bits of the ieee754 representation:
https://www.geeksforgeeks.org/program-for-conversion-of-32-bits-single-precision-ieee-754-floating-point-representation/
uses binary right shift operator:
https://www.tutorialspoint.com/cprogramming/c_bitwise_operators.htm
I developed my algorithm:
https://gist.github.com/bshambaugh/fab368ae62da5f326b8876005de710d8 by watching:
https://www.youtube.com/watch?reload=9&v=8afbTaA-gOQ
But Now that I know about bit fields, I see them everywhere:
https://www.tutorialspoint.com/cprogramming/c_bit_fields.htm
https://www.cs.yale.edu/homes/aspnes/pinewiki/C(2f)FloatingPoint.html
Perhaps the computer represents things in IEEE754, and since unions have one location in memory then setting up bit fields in the union exposes the bits selectively from the float
Sunday, December 6, 2020
selecting bits selectively from the float
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment