Skip Navigation

Assignment: Numbers and Arithmetic

For this assignment, you will explore number bases, complements, shifting, and floating-point calculations. Internally, computers utilize complements and shifts to implement integer mathematical operations on binary numbers. Today’s systems also follow the IEEE 754 standard for floating-point arithmetic when non-integer numbers are required.

Page Contents

Background Material

Internally, computers utilize logic circuits to implement arithmetic operations on binary (base two) numbers. Two completely different sets of circuits are used: one set handles integer arithmetic, while another hardware component handles floating-point numbers (which are crude approximations of real numbers). In order to make computers compatible with one another, certain standards exist for defining how mathematical operations will be implemented.

To begin your journey of understanding how computers do math, see my Numbers and Arithmetic OER materials.

Requirements

Prepare a video presentation (or narrated set of slides) with the following information:

  1. Explain how integers work in decimal, binary, octal, and hexadecimal. Show how numbers are represented using powers of bases, working leftward from the ones place (base raised to the zero power).
  2. Using randomly generated integers, demonstrate subtraction using nine’s complement arithmetic.
  3. Explain how shifting works. Remember to distinguish between logical and arithmetic right shifts.
  4. Summarize the IEEE 754 standard. Be sure to mention precision levels, the number of representations for zero, the parts of a number in IEEE 754, and subnormal numbers.
  5. Distinguish between hard float architectures and soft float architectures.

If you elect to work with a partner, you should each present for approximately equal time.

Be sure to include the URLs to your portfolio (or both portfolios, if working with a partner) in the presentation.

Portfolio Items

Include the following items in your portfolio:

  1. An example of using nine’s complement arithmetic to perform subtraction.
  2. A quick overview that demonstrates left shifts, logical right shifts, and arithmetic right shifts.
  3. A diagram showing the parts of a number in IEEE 754.

Submission Requirements

Submit your presentation video to one of the weekly submission boxes for the course. If you’re working with a partner, only one person needs to submit the video.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.