Overview

As you now know, everything in a computer is ultimately represented as bits, i.e. 1’s and 0’s! We are going to continue exploring the many “bitwise” operators that let us manipulate data at the bit level as well as start with the basics of C so that you can write simple functions that do bitwise manipulation.

Basic Learning Objectives

Before class, you should be able to:

  • Solve given bitwise operations
  • Be able to run the starter code for Assignment 1
  • Identify resources to write basic C code

Advanced Learning Objectives

After class, you should be able to:

  • Explain the process of homework revisions and exams retakes for the course
  • Get started on Assignment 1
  • Use GDB to debug your code

Resources

Read and complete the following:

Checks

Submit answers to the following on Moodle. Remember that these check questions are often very similar to how exam questions will look, so it’s good to try to solve them independently.

  1. Solve the following bitwise operation:
     1011010101
     &
     1001011011
    
  2. Assuming I have the basic boilerplate code for C and a variable int a = 5;, how could I print that variable (there are several correct approaches, you only need to list one).

  3. Have you been able to run the starter code for the assignment on mantis?

  4. If you’d like more practice, there are interactive exercises here and bitwise exercises here.