teaching machines

CS 145 Lab 4 – Methods

Welcome to lab 4! If you have checkpoints from the last to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. You must work with a partner that you have […]

CS 145 Lecture 11 – Methods x4

Dear students, Let’s do one more of the exercises from last time! Middle public class Middle { public static void main(String[] args) { char a = ‘a’; char e = ‘e’; char middle = average(a, e); System.out.println(middle); } public static char average(char c1, char c2) { return (c1 + c2) / 2; } } This […]

CS 352 Lecture 11 – Subtracting

Dear students, We have built a large chunk of the core arithmetic and logic hardware inside a computer. We have built AND, OR, NOT, and other boolean gates. We have built an adder. We’ve also designed some components for selecting out bytes from RAM. Things are coming together! One thing that we are not able […]

CS 145 Lecture 10 – Methods and Memory

Dear students, Whoever you are, you need practice with methods. They are a concept that you probably didn’t encounter in your high school math classes, and you have no prior knowledge on which to build here. So, don’t be too hard on yourself if they don’t click immediately. Today, then, we devote our entire time […]

CS 352 Lecture 10 – Adders

Dear students, Learning is a cycle of exposing your inadequate understanding and then shoring it up. So, we start with a task to help you expose any misunderstandings: Write the truth table for a demultiplexer, which has two inputs (in and sel) and two outputs (a and b). (So there should be how many columns?) […]

CS 491 Meeting 4 – Let’s Play

Dear students, Today let’s do a Let’s Play. I’ve selected out a few computer science education games: The Foos Modulo Challenge Gidget Human Resource Machine Let’s play them together and discuss what they do well and what could be improved. Here’s your TODO list for next time: Continue creating your game. Next time we meet, […]

CS 145 Lecture 9 – Blackboxes

Dear students, We have seen methods as a means of capturing a process into a reusable component. Methods have some really nice advantages: They drop us into a smaller world with a smaller problem to solve. Instead of thinking about the grand mission of our program, we think about the baby step of the method. […]

CS 352 Lecture 9 – Muxes, Demuxes, and HDL

Dear students, We introduce today a couple of hardware components that will ultimately help us build memory. They are the multiplexer (or mux) and the demultiplexer (or demux). The mux takes in two inputs and a selector. The selector determines which of the two inputs feeds into the one output: if sel == 0 output […]

CS 352 Homework 2 – Gates – due before Thursday, October 13

See the PDF.

CS 145 Lecture 8 – Methods Cont’d

Dear students, Last time we started generating some circle art, but we stopped with only one circle. Once we get that working, let’s add a second random circle. And a third. And a fourth. And so on. We’ll find that the code quickly gets away from us if we simply copy and paste. Instead, we […]

1 2 3 4