teaching machines

CS 352 Lecture 22 – Hello, ARM

Dear students, I want to take a few minutes to explore the next homework assignment, which was inspired by the game Human Resource Machine. But let’s do that at the end of class, rather than the beginning. At this point in the semester, we leave our textbook behind and jump into an industry-grade architecture: ARM. […]

CS 352 Lecture 21 – Assembler Cont’d

Dear students, Today we continue work on our assembler. In short, this is our development checklist: strip out the cruft (unnecessary whitespace, comments) identify addresses for all code labels resolve all symbols to addresses convert text instructions to binary We accomplished steps 1 and 2 last time, but didn’t test it. Let’s write a quick […]

CS 352 Lecture 20 – Assembler

Dear students, In homework, you’ve been working on chapters 1, 2, and 3 of our textbook. Your next homework will be chapter 5, which involves tying everything you’ve built into a complete computer, albeit in HDL form. In lecture, we’ve hit upon chapter 4, which covers assembly for this computer. Today we discuss chapter 6, […]

CS 352 Lecture 19 – Jumping

Dear students, We now jump into jumps. Normally, the flow of control goes from top to bottom in a sequence of code. But that’s not how it works in our high-level code, where we have loops and conditionals. At the assembly level, there is no such thing as if. Nor is there while or for. […]

CS 352 Lecture 18 – Alumem and Jumping

Dear students, The next homework requires doing some HDL tricks that I don’t think are necessarily intuitive. Rather than continuing to build on a wobbly foundation, let’s sketch out schematics for some of these components. We’ll visit these: DMux4Way, Inc16, LeastByte (which is not part of any homework), ALU, Bit, Register, RAM8, RAM64, and PC. […]

CS 352 Lecture 17 – Catchup

Dear students, Last week lots of good misunderstandings of memory came up. When misunderstandings appear, the right things are happening. Conflict surfaces in your brain, which is step 1 of learning. Step 2 is resolving that conflict. Today, then, I want to start by revisiting some ideas of how memory and pointers work in C […]

CS 352 Lecture 16 – Hack Assembly Cont’d

Dear students, Today we continue discuss low-level ideas of assembly language using Hack. We start with a little number I like to call What Does This Do. I will show some code, which you should read any mentally evaluate. After a few moments, we’ll discuss. WDTD #1 @R0 D=M @R1 M=D @R0 D=M @R1 M=D+M […]