Lecture notes for the Introduction to Computer Science I by James Tam |
There are three main parts to this section of notes: non-decimal based number systems, the computer storage and manipulation of negative and real numbers, and logic.
The first part of this section includes a brief introduction of different number numbers starting with the familiar decimal base and continuing on to binary, octal and hexadecimal. In addition students should learn how to convert to and from decimal and a number system of any base. Finally students should learn basic mathematical operations in binary.
The second part of this section teaches students how negative and real numbers are stored and manipulated on the computer in the form of complements (one's and two's) and floating point representations. This part of the notes also deals with conversions to and from unsigned binary and the signed representations, issues such as the limits in different representations (ranges in the values that can be represented) and the problems of overflow. Finally this part of this section of notes should provide students with a strong idea of how real values are represented on the computer and some of the limits of this form of representation (accuracy).
The final part of this section of notes covers basic logical operations: AND, OR, NOT, XOR, NAND and NOR.
Additional examples (some are a bit on the long side but most of them should provide good practice):
Given that there is time in lecture, the instructor can also spend some time on the following topic:
This is a section where the instructor should rely less on prepared slides. The online notes can be useful for described the basic concepts (e.g., binary, octal and hex) but most students will pick up the material when many examples are covered. Therefore while a few numerical examples are provided online, lectures should supplement this material with addition ones.