| CompOrg Fall 2003 Homework #1 FAQ | ||
| CompOrg Home | HW1 Description | ||
| Question: | For the last 2 questions, can we use comparison operators (
< > ==, etc.) ?
|
||||||||||||||||||||||||||||
| Answer: | No. Only bitwise logic and boolean logic operators! |
||||||||||||||||||||||||||||
|   |   | ||||||||||||||||||||||||||||
| Question: | What is to stop someone from using hex/binary calculator to do part of question 1? | ||||||||||||||||||||||||||||
| Answer: | Nothing. But you won't be allowed to use a calculator on the test. |
||||||||||||||||||||||||||||
|   |   | ||||||||||||||||||||||||||||
| Question: | Do I need to use Unix for the C programs? | ||||||||||||||||||||||||||||
| Answer: | There are no C programs required! Problem 2 asks for C expressions, Problem 3 can be solved with a single expression, although you can also provide a little C code logic as well (for example, a few if statements). It may certainly be useful to actually write programs to test your code! You can do this with any C compiler on any machine. The code required for both problems could be tested in a C++ program as well. Don't give us the entire program, we just want the expressions that answer the questions. |
||||||||||||||||||||||||||||
|   |   | ||||||||||||||||||||||||||||
| Question: | The bias representation of the exponent in IEEE floating point numbers is confusing - I can't do the homework! | ||||||||||||||||||||||||||||
| Answer: | Keep in mind the difference between a representation and a value. Given an IEEE floating point number (you are given the bits that make up the representation), you need to come up with a value for the exponent. To determine the value of the exponent you do the following:
What if you know the value of the exponent and want to come up with the bit pattern that is used to represent that value in an IEEE 32-bit floating point number? Do this:
|
||||||||||||||||||||||||||||
|   |   | ||||||||||||||||||||||||||||