<aside> 💡 Will take precedence over longs, and ints.

</aside>

$$ (-1)^sM 2^e $$

Untitled

Guide: Converting Denary to Float

<aside> 💡 Guide: Converting to Floating Point Numbers

Denary to Float: 4.75 (8bit representation)

  1. Find the 2s complement representation of 4 Keep dividing 4 by 2 and keep track of the remainder
4 0
2 0
1 1
- -

0100 - 4

  1. Find the 2s complement representation of 75 (keep multiplying by 2 and turn into 1 when it is 1 or greater
.75 1.5 1
.5 1 1
- - -

0011

  1. Add the exponent Part

    $100.0011*2^0$

  2. Normalize the Mantissa $1.000011*2^2$

  3. Calculate the Exponent with $bias = 2^{k-1}-1$$E = exponent+bias$ $E = 2+3 = 5$ in binary that is 101

  4. Represent Exponent 101

  5. Represent Mantissa we take the 0011 (rest of the 1 area)

  6. Represent Sign Bit negative so -1

1 101 0011

Reversing the Floating Point Encoding - doing the backwards operation

Exponent Bits = 3, thus the bias is 3

E = exp + bias 5 = exp + 3 = EXP = 2

1.0011 * 2^2 100.11 = 2^0 4.75

</aside>

Normalized Numbers

Denormalized Values

Untitled

Rounding

Addition/Multiplication

Untitled