Lab 1: Bits

Introduction

The purpose of this assignment is to become more familiar with bit-level representations of integers. You'll do this by solving a series of programming "puzzles". Many of these puzzles are quite artificial, but you'll find yourself thinking much more about bits in working your way through them.

Like many of the lab assignments in this course, this assignment has:

  1. a writeup that gives detailed instructions as well as
  2. a starter code tarball (.tar) file
Before downloading the starter code, note that you will work on all lab assignments on the CS department machine called wilkes. If you have an account on knuth, you have one with the same user name and password on wilkes. Further, your home directory on knuth is cross-mounted on wilkes. But note, some of the lab assignments will not work on knuth; be sure to always work on wilkes in CS 105.

Connecting and Working on wilkes

As mentioned in the lab writeup, to edit files and run programs on wilkes, you will need to use ssh to access the machine and work from the command line.

Most students prefer to use their own computer to connect to wilkes. A convenient approach is to use Visual Studio Code with the ssh extension that will allow you to both edit files with a text editor and run commands on wilkes via the command line. See this guide for Using Visual Studio Code to work with Remote Files.

There are also some MacOS machines in the McGregor computer labs. You can connect to wilkes from those using the terminal app (it looks like a black square with the command prompt ">"). Or you could even use the terminal app on your own computer. More details on how to use ssh to login via the terminal are in the Bits lab writeup.

Due Date and Submission

This assignment is due February 7th, 1:15pm.

As described in the handout, you can submit your work from the command line on wilkes in your lab assignment directory:

cs105submit -a 01 bits.c