FISR edits
All checks were successful
CI / Typst formatting (push) Successful in 6s
CI / Typos (push) Successful in 7s
CI / Build (push) Successful in 8m57s

This commit is contained in:
Mark 2025-02-17 08:24:51 -08:00 committed by Mark
parent fc5a1cbbaf
commit 7c75c6b5c9

View File

@ -28,7 +28,7 @@ Rewrite the following binary decimals in base 10: \
#v(1fr)
#pagebreak()
#definition()
#definition(label: "floatbits")
Another way we can interpret a bit string is as a _signed floating-point decimal_, or a `float` for short. \
Floats represent a subset of the real numbers, and are interpreted as follows: \
#note([The following only applies to floats that consist of 32 bits. We won't encounter any others today.])
@ -118,13 +118,17 @@ Floats represent a subset of the real numbers, and are interpreted as follows: \
#problem(label: "floata")
Consider `0b01000001_10101000_00000000_00000000`. \
#hint([The underscores here do _not_ match those in @floatbits])
#v(2mm)
Find the $s$, $E$, and $F$ we get if we interpret this bit string as a `float`. \
#note([Leave $F$ as a sum of powers of two.])
#solution([
$s = 0$ \
$E = 258$ \
$F = 2^31+2^19 = 2,621,440$
$E = 131$ \
$F = 2^21+2^19$
])
#v(1fr)
@ -160,9 +164,9 @@ What value do we get if we interpret this bit string as a float? \
#solution([
This is 21:
$
2^(131) times (1 + (2^(21) + 2^(19)) / (2^(23)))
= 2^(4) times (1 + 0.25 + 0.0625)
= 16 times (1.3125)
2^4 times (1 + (2^(21) + 2^(19)) / (2^(23)))
= 2^(4) times (1 + 2^(-2) + 2^(-4))
= 16 + 4 + 1
= 21
$
])