HW10: done 2.4
This commit is contained in:
parent
27f3164015
commit
7e07f017e2
2 changed files with 14 additions and 1 deletions
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
\documentclass[12pt]{article}
|
||||
\title{Assignment 10}
|
||||
\title{Computer Architecture -- Assignment 10}
|
||||
\author{Claudio Maggioni \and Tommaso Rodolfo Masera}
|
||||
\date{}
|
||||
|
||||
|
@ -116,4 +116,17 @@ $1010011010.01000000000000\ =\ 2^9\ +\ 2^7\ +\ 2^4\ +\ 2^3\ +\ 2^1 +\ 2^{-2}\ =\
|
|||
|
||||
\subsection{Exercise 2.4}
|
||||
|
||||
In order to compute the number of IEEE 754 single-precision floating point numbers between 0 and 1 (both included), we first consider
|
||||
a constant positive ($= 1$) sign bit (and therefore we do not count it in our calculation of possible permutations).
|
||||
|
||||
Then we count the number of denormalized numbers (including 0), which is: $2^{23} = 8388608$.
|
||||
|
||||
After that, we count the number of valid from $2^{126}$ to $2^{1}$ included, which is 126. All these exponents will generate
|
||||
a number $< 1$ even with the highest possible mantissa. Then, we compute the number of numbers with these exponents, equal to:
|
||||
$126 * 2^{23} = 1056964608$.
|
||||
|
||||
Finally, we consider the number 1 itself (0x3f800000) and we sum all the combinations: $8388608 + 1056964608 + 1 = 1065353217$
|
||||
|
||||
Therefore, there are 1065353217 IEEE 754 single-precision floating point numbers between 0 and 1 (both included).
|
||||
|
||||
\end{document}
|
Reference in a new issue