# Homework 1: Numerical Representations and Basic ISA's

Assigned Thursday, April 5, 2012 Friday, April 13, 2012 at 17:00

## Introduction

The purpose of written homework assignments is to get you thinking about the topics being covered in lecture and in readings in the textbook which are not represented in the hands-on, programming lab assignments. These written assignments also better prepare you for course examinations. It is worth noting that the book contains many pratice problems similar to the problems we ask on these written assignments. The solutions for those practice problems are located at the end of each chapter and should give you a feel for the kind of answers we expect you to turn in for these kind of assignments.

## Logistics

Since these written homeworks are not programming lab assignments, you will turn in your assignment online as electronic documents in PDF format. We will not accept any paper submissions.

We will provide solutions to all of the problems in the written homework assignments in a timely fashion after the assignment is due. Since the late policy affords you a maximum of three late days, we cannot release solutions until the Wednesday following the assignment's due date, at the earliest.

## Questions

1. What is the 32-bit and 64-bit hexadecimal value of the number -256 if:
1. It is represented with the sign-and-magnitude representation?
2. It is represented in ones' complement representation?
3. It is represented in twos' complement representation?
2. Given a floating-point format with a k-bit exponent and an n-bit fraction, write formulas for the exponent E, significand M, the fraction f, and the value V for the quantities that follow. In addition, describe the bit representation.
1. The number 12.0
2. The largest odd number that can be represented exactly
3. The smallest positive number
3. From the textbook: Problem 2.89 (section on denormalized values is extra credit)
4. From the textbook: Problem 3.56

## Notes

Make sure you are using the 2nd edition of Computer Systems: A Programmer's Perspective. If you're not using the right book, you might be doing the wrong problems!