My Thoughts on CSS 422: Hardware and Computer Organization at the University of Washington Bothell

Winter 2021

In my Winter 2021 quarter, I took CSS 422 at the University of Washington Bothell. This course was a great introduction into the hardware of a computer and how a computer works at a lower level. After taking this course, I have a better understanding of how the different components of a computer are used together. The course also covered the assembly language with the Motorola 68000. In general, I learned a lot about the hardware of computers and how binary representation is used.

Table of Contents

Course Description

The course description from MyPlan:

An introduction to the architecture, operation, and organization of a modern computing machine. Topics covered include basic logic operations, state-machines, register models, memory organization, peripherals, and system issues. Assembly language taught in order to understand the instruction set architecture and memory model of the computer.

CSS 422 MyPlan Page

Introduction

During Winter 2021, I took CSS 422 which was taught by Munehiro Fukuda at the University of Washington Bothell. This course covers a lot of the hardware aspects of computers and how different components are used in a computer. In addition, our class covered the Motorola 68000 architecture and the assembly language for it. Most importantly, I think the main takeaway I learned from this course is how different things are represented in a computer. Using binary, we can use different encodings to represent different things like numbers or characters.

The Winter 2021 quarter at the University of Washington was completely remote. This might have made my experience different to what the class usually would be like. I outlined what I learned from a previous online quarter in another blog post here.

This post will outline my experience in CSS 422 and be structured similarly to my other posts. It may be helpful to read the post I wrote on CSS 342. CSS 342 is the only required prerequisite before taking this course.

The homework assignments that I have completed for this class will not be publicly available. This is to prevent others from plagiarizing. Instead, I will try and offer the important lessons that I learned from each assignment. Prior to posting this publicly, on March 25, 2021, I emailed my instructor to read this article for anything that might be deemed as academic misconduct. On the same day, I got approval from my instructor.

Homework Assignments

There were eight assignments that covered what we learned about each week in lecture. For some of these assignments, we had to use EASy68K and Logisim. EASy68K is a simulator for the 68000 assembly language that we covered in this class. Logisim is a tool that helps design and simulate logic circuits. These two applications were incredibly useful since I could test my assembly code and circuits to see if my understanding was correct.

For my particular section, the assignments were split into eight weekly assignments instead of four assignments that were submitted every other week. I think this helped reduce the overall workload since it was split more evenly throughout the quarter. Additionally, it was useful since we could refer back to the materials we covered that week.

Homework 1

In this homework assignment, we had to convert numbers between different bases (hexadecimal, decimal, octal, and binary). In addition, we used Two's complement to represent and convert negative numbers. Lastly, by following IEEE single-precision format, we had to convert floating point numbers.

In a base 10 decimal number, we use digits 0 through 9 to represent a number. However, since computers are represented in zeroes and ones, we have to use only these two digits to represent a number. These binary digits are called bits and you can represent larger numbers depending on the number of bits you have. For example, with only one bit, you can only represent the decimal numbers 0 and 1. However, with two bits, you can represent the decimal numbers 0, 1, 2, and 3. This is why in some programming languages, you need to determine whether a number should be an int or a long. These types have different sizes and allocate a different number of bits to be able to store a larger or smaller number.

To represent negative numbers, we use Two's complement and can look at the most significant bit (left-most bit). With Two's complement, we dedicate the one bit to determine whether or not a number is signed or not. However, this reduces the total number of available bits to store a number. So since our 2-bit system can only represent 4 numbers total, we can either represent it as a signed or unsigned number. With a signed number, the most significant bit is used to determine whether the number is positive or negative. If the number is unsigned, we do not need to worry about the sign of the number and can use both bits to represent only positive numbers.

For floating point numbers, we represent them in IEEE single-precision format. By following the specification, we can convert between a binary representation to an actual floating point number.

This assignment taught me how things can be represented in a way that computers understand. Since computers only understand zeroes and ones, we can use a specific format to encode negative numbers and floating point numbers. Similarly, to represent the A character in ASCII, we say that the decimal number is 65. Now, the decimal number 65 represents the A character whenever we are looking at ASCII text. However, the computer cannot understand decimal numbers, so we must use binary to represent the same number. The decimal number 65 is just another way of saying the binary number 1000001.

Homework 2 - 4

In Homework 2 - 4, we covered a lot of the 68K assembly language instructions and other related topics.

More specifically, we covered topics like:

  • register transfer language
  • converting 68K assembly language instructions to machine code
  • assembler errors
  • assembly programming
  • condition code register bits
  • different effective addressing modes
  • branch displacement

For these homework assignments it was important to understand the different instructions and know which ones to use in a particular situation. However, these homework specifications were very clear about which instructions to use, so it was easy to get started. My main resource during these assignments was the 68K manual. It is important to understand how to read documentation and in this case the 68K manual provided everything I needed to get started. If I needed more in-depth experimentation, I would just use EASy68K to test different instructions and see how it affected the simulator.

Homework 5 & 6

The next two homework assignments covered combinational and sequential circuits. The main difference between the two are that combinational circuits have no state and time. However, sequential circuits maintain states and change based on the current state and the inputs. These two assignments showed how computers are organized at a hardware level. For example, a combinational circuit can take bits as input and make an output bit change depending on the input. As we progressed into the sixth assignment, we covered sequential circuits and this showed me how computers can maintain state and memory.

During these assignments, we covered:

  • Boolean algebra
  • Karnaugh map
  • flip-flops
  • state transition diagram
  • state transition table

During these two assignments, it was really useful to use Logisim to test and visualize different circuits.

Homework 7

After covering flip-flops in the previous assignments to show how circuits can maintain state, we moved towards computer memory in Homework 7. In particular, we covered how smaller memory chips are used together to fit memory systems with different numbers of address and data lines. Additionally, we covered how circuits are used to decode when to write/read data and decipher between different addresses. Lastly, the assignment also focused on memory-mapped I/O and how the CPU communicates with memory.

Homework 8

The last assignment covered cache and memory mapping. Cache memory is the quickest in a computer and is used to hold frequently accessed data. In this course we covered three types of memory mapping: direct, fully associative, and set-associative. This allows for memory addresses to be mapped to space stored in the cache.

Final Project

The course had a group final project where me and my partner had to create a disassembler in 68K assembly language. For this project, we were given the last five weeks of the quarter to complete it. The basic idea was to take in a memory address range and convert the compiled machine code at those memory locations and disassemble it back into assembly instructions.

This project helped solidify my understanding of how everything in a computer is just a different encoding of binary. To determine different opcodes and effective addresses, we had to isolate specific bits in the machine code and decipher the original instruction based on those bits.

Exams

There were two exams for this course. The exams were difficult but were formatted similar to questions we discussed in class and in the homework assignments. In addition, we were given exam rehearsals the class before the actual exam. This was useful since we could work with other students and get an understanding of how the actual exam would be structured.

Midterm

The midterm covered:

  • number conversion
  • assembly instruction
  • computation in assembly programs
  • program and system control
  • assembly programming

Final

The final covered:

  • combinational circuits
  • Karnaugh maps
  • boolean math / algebra
  • sequential circuits
  • state transition diagram
  • state transition table
  • memory and I/O
  • cache memory

Overall Thoughts and Conclusion

The class was difficult but was really interesting because I learned a lot about the components of a computer and how they work together. My main takeaway from this course was how binary is used to represent different things for computers. Before taking this class, I did not really understand why people said computers are all zeroes and ones. However, this class showed me that binary is used just as a way to represent different things. Depending on how things are encoded, we can use binary to represent things in a way that a computer can understand.

Resources