ECE-1021
HOMEWORK #1
(Last Mod: 27 November 2010 21:38:41 )
In addition to the Modules, you should be reading the first four chapters in the textbook. Do not worry too much about studying the information in these chapters - just read them. Make a list of items in those chapters which are new to you and/or which you don't understand. Bring that list with you to the lecture following the first exam and be sure to ask questions about anything not covered.
The goal of this assignment is for you to gain proficiency in working with different number bases and number representations. As such, your work must reflect your ability to perform these operations, not the ability of the design team that developed your calculator. You may therefore use a calculator to perform base-10 computations only. Specifically, you may not use calculator functions that perform number base conversions or that permit you to work with numbers in any base other than decimal. You may use such functions to check your work only. You must show your work on all problems that require computation to receive credit.
Using the method of repeated multiplication and/or division as appropriate, perform the following conversions.
1,000,000 to hex
0x8676 to decimal
1100 1011 0101b to decimal
47624 octal to decimal
255 to binary
0xD7F5 to binary
1101 0111 1111 0101b to decimal
6253417 to base-5
Represent the value π in decimal, hex, and binary to the six radix places.
Represent the value e in decimal, hex, and binary to the equivalent of at least four decimal places.
Represent the length of a light year, in meters, using normalized exponential notation in decimal, hex, and binary. The mantissa should have enough digits to represent the number to an accuracy of 0.01%.
Represent the charge of an electron, in coulombs, using normalized exponential notation in decimal, hex, and binary. The mantissa should have enough digits to represent the number to an accuracy of 0.1%.
Prepare Hexadecimal Addition and Multiplication Tables similar to that found in Module I for base-8. You may either prepare separate tables or a combined table.
Perform the following computations directly in hexadecimal. For the division problems, if the quotient is not an integer, show the result both in quotient/remainder form and also as a fixed point result to two hexadecimal places.
0xCB + 0x1D
0xCB - 0x1D
0xCB x 0x1D
0xCB / 0x1D
0xFACE + 0xBEAD
0xFACE - 0xBEAD
0xFACE x 0xBEAD
0xFACE / 0xBEAD
In decimal, what is the range (minimum, maximum) of a byte, word, and dword when used to represent signed integers using a two's complement representation?
Represent the following decimal values as two-byte signed integers using singed binary, offset binary, and two's complement representations. Express the results both in hex and in binary.
+10,000.
-10,000.
+1
-1
-32,767
What are the decimal equivalents of the following values if each is a two-byte signed integer using a two's complement representation?
0xFFFF
0x8000
0x7FFF
0x0000
0xBEAD
0xFACE
0x6666
0x5000
Consider a two-byte signed fixed-point representation using two's complement and having eight-bits to the right of the radix point.
What is the largest positive value that can be represented?
What is the smallest positive value that can be represented?
What value, in decimal, is represented by a pattern of all 1's?
For the IEEE Single Precision Floating Point Format:
What is the smallest non-zero positive value that can be represented?
What is the largest value that can be represented?
What is the smallest value x such that 1+x can be represented?
What is the static range of this representation?
What is the dynamic range of this representation?
How many significant figures (in decimal) does this representation have?
What is the largest integer, n, such that all integers from 0 through n can be exactly represented?
What is the speed of light, in meters/second, in this representation (express the bytes in hex)?
The string "ECE-1021: Homework #1" is stored at memory location 0xC000.
What are the values stored at each of the relevant memory locations?
Using a Little Endian protocol, the following values are stored in memory at the indicated locations:
Address 0xDFFC: four billion stored as a four-byte unsigned integer.
Address 0xDFF8: π stored as a IEEE single precision floating point value.
Address 0xDFF6: negative ten thousand stored as a signed two-byte integer.
Address 0xDFF0: The string "Hello".
What values are in each of the sixteen bytes in the range 0xDFF0 through 0xDFFF?
What value is obtained by reading a IEEE single precision floating point value from address 0xDFFC?
What value is obtained by reading a Big Endian four-byte signed integer from memory location 0xDFF0?