Intro Logistics Prep
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:
- DiS Sec 4.6 Bitwise Operators
- Assignment 1 - get the starter code onto
mantis
and make sure that you can run it - DiS Sec 1.1 Getting Started Programming in C - note that this section compares Python to C, you can find Java versions in Sec 16 if you are interested
- Skim the next few DiS sections to get a feel for print statements, if statements, functions, and arrays
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.
- Solve the following bitwise operation:
1011010101 & 1001011011
-
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). -
Have you been able to run the starter code for the assignment on
mantis
? - If you’d like more practice, there are interactive exercises here and bitwise exercises here.