Joined: 30 Oct 2020 Posts: 30 Location: The netherlands
Posted: Mon Nov 02, 2020 2:39 pm Post subject:
Yes those are the datatypes, I understand..but what I'm struggling with is the float is such a small number, and the int form so large? Maybe I should read a bit about floating point values first
Everything gets converted to 0s and 1s (bits) when stored as data on a computer. Those different values you're seeing - i.e. integers and floats - are different ways of interpreting the same sequence of 0s and 1s. Viewing one type of data as another doesn't make sense most of the time.
Unsigned integers are just stored in base 2. Signed integers use two's complement. Floating point values are encoded as is defined in technical standard IEEE 754 & ISO/IEC 60559. All multi-byte values are stored in little endian.
For floating point numbers, read this for a basic introduction:
http://steve.hollasch.net/cgindex/coding/ieeefloat.html _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum