CPS 104 Notes

These are various things that I have composed for Duke’s architecture course, CPS 104, over my time as a student in and later TA for the class. These were originally newsgroup posts or emails to instruct students. I modified them to be more suitable to a more general audience for everyone’s enjoyment. If you find any errors, please send me an email to let me know.

  • Two's Complement

    Two’s complement is not a complicated scheme and is not well served by anything lengthy. Therefore, after this introduction, which explains what two’s complement is and how to use it, there are mostly examples.

  • Floating Point

    This document explains the IEEE 754 floating-point standard. It explains the binary representation of these numbers, how to convert to decimal from floating point, how to convert from floating point to decimal, discusses special cases in floating point, and finally ends with some C code to further one’s understanding of floating point. This document does not cover operations with floating point numbers.

  • Cache

    The purpose of this document is to help people have a more complete understanding of what memory cache is and how it works. I discuss the implementation and comparative advantages of direct mapped cache, N-way set associative cache, and fully-associative cache. Also included are details about cache design. I try to give a complete treatment of the more important aspects of cache.

  • MIPS Examples

    This document is not intended as a beginner’s guide to MIPS. It is intended for people that have coded some with MIPS and feel somewhat comfortable with its use. If this is not you, you will not get much out of this document.

  • Virtual Memory

    This document explains in a fair amount of detail the paged virtual memory system in line with the discussions of the CPS 104 lectures and notes on the subject.