# Elementary Computer Mathematics

In the last three decades of the twentieth century, the computer has evolved from a mainframe leviathan usable only by highly trained professionals to the personal computer in use on nearly every desktop. The first three decades of the 21st century promise even more dramatic changes, fueled by research in artificial intelligence, nanotechnology and even biotechnology. In order to be successful in this constantly changing field, computer professionals must be much more than merely knowledgeable users. The mathematics underlying these technologies changes far more slowly than the technologies themselves, and it is a thorough understanding of computer mathematics which enables the computer professional to adapt to the ever-changing technological landscape.

This hypertextbook is an introduction to the mathematics used in the design of computer and network hardware and software. Its goal is to prepare the student for further coursework in such areas as hardware architecture, operating systems internals, application programming, databases and networking. In it, we will survey topics in computer arithmetic and data representation, logic and set theory, graph theory and computer measurement.

The text contains a great deal of theoretical and technical information which you need to learn, as well as examples and exercises in a number of computations in which you need to become adept. But it also has something more. There are several intangible skills which are at the core of the computer professional's toolbox. These include a basic "numeracy" in binary and hexadecimal number systems, the ability to break up a complicated problem into a sequence of simpler problems, and the ability to see the similarities in things which do not appear related to the casual observer. This book attempts to help you develop those skills as you learn the information and become competent in the computations. Hence the method used to convert between number systems encourages numeracy, the problems in chapter 2 all require you to compute complex expressions in a step by step fashion, and the graphing problems encourage you to redraw graphs in a topologically equivalent but more useful manner to facilitate their solution.

It is assumed that the student has recently (and successfully!) completed a course in high school-level algebra. While we will make some use of that algebra, the primary prerequisite is a sufficient level of "mathematical sophistication." Unfortunately, sufficiency in this regard is difficult to measure except in terms of success in a course such as this one. Most of the topics discussed in this hypertext book will be unfamiliar to anyone with a traditional mathematical education. As a result, most students find this material extremely challenging.

This hypertextbook is called elementary, but it does not assume that you have to be spoon-fed: you are expected to be a serious student and a careful reader. This means that you are expected to work out all of the examples for yourself, and do all of the problems. When first approaching a problem, use the corresponding text as a research tool.

The text is often quite "concise": there is very little in the text which is not relevant at some point to latter portions of the text or to the problems.

After working through a few problems, read the text again and it will be much clearer: the only way to understand the mathematics of computers is to struggle through the problems which use it. You should not expect to understand how to work a problem simply by reading about it. As in all things, the learning is in the doing.

This hypertextbook assumes that you are running a browser which supports special fonts, tables, subscripts and superscripts (such as Netscape 4.x). Additionally, there are Java problem-generating programs which require a Java 1.1-capable browser (Netscape 4.06 or Internet Explorer 4.01, or newer).

### A Note on Notation

The subjects covered in this hypertextbook have a long history rife with various and sometimes conflicting notation. In cases where the usual notation is not easily rendered electronically, we will generally use notation common in computers and computer programming:

 & logical AND, set intersection | logical OR ~ logical NOT → implication ↔ equivalence + set union

Traditional notations which are easily reproduced electronically will be introduced as they appear in the text.

### Acknowledgments

We wish to thank Dr. Barbara Bardes, Dean of Raymond Walters College of the University of Cincinnati, for graciously supporting this effort.

We also wish to thank Professor Mark Thomas of the Department of Mathematics, Physics and Computer Science at Raymond Walters College, for his careful reading of the drafts.

### Getting Started

#### How mathematically sophisticated are you?

Suppose that you need to buy party favors for 19 people, and the favors cost \$1.89 each. How do you figure out the total cost (less sales tax)? Do you