Computer Organization I, Spring 2011, Exercise 4
You are expected to (try to) solve the problems on your own or with your study team before the meeting.
The problems are partially covered in Book.
Book Chapters 5, 9.2, 9.4 should cover the content.
Problems:
- Integers. Assume, that integer number -13 is stored in memory in byte address 0x1230. What are the contents of bytes 0x1230-0x1233, when that number is stored in the following representation:
- 32 bit Big-Endian sign and magnitude
- 32 bit Big-Endian two's complement
- 16 bit Big-Endian two's complement
- 8 bit Big-Endian two's complement
- 16 bit Big-Endian biased by 32767
- 32 bit Little-Endian two's complement
- 8 bit Little-Endian two's complement
- Floating point numbers
- Give an example of a real number that can be exactly represented as floating point number.
- Give an example of a real number that can not be exactly represented as floating point number. How big is the error?
- What is binary number 101101.1010 in decimal?
- What is IEEE floating point representation of desimal number 5.1? Is it exact or not?
- Compute the values for expressions "(1.0666668-1.0666666) * 1.23456" and "1.0666668*1.23456 - 1.0666666*1.23456" using some programming language supporting 32-bit IEEE floating points. Insert some output statement in the first expression before the multiplication, (see, e.g.. test.c), so that the compiler would not optimize the code too much. Why are the results different? Which one is correct? Why would using 64-bit IEEE floating point numbers (C:n or Java data type double) remove this discrepancy?
- Hamming code.
- Show how error correcting Hamming code recognizes and corrects a mistake when in a 7-bit data "011 0100" the 3. bit from left has changed erroneously into zero: "010 0100".
These 7 bits contain both the data and parity bits.
- How many wires (bits) does one need to protect a 32-bit data bus with error correcting Hamming code?
(We want to move 32 bits of data in addition to the parity bits)
- Why is Hamming code not a good approach to secure LAN or WAN data transfers?
- Do level C TitoTrainer problems c-200, c-310, c-420 and c-440.
(If you want, you may do all other level b TitoTrainer problems)
Tiina.Niklander@cs.helsinki.fi