Data EncodingΒΆ

We use a set of bits to represent data of various kinds. Exactly how we decide to encode that data is an important part of programming. You need to understand how data is encoded, and understand the range of values available for every data type you use in a program.

It is also vitally important that you understand the difference between normal human math, and computer math. We simply cannot represent numbers in a machine accurately enough to suite all situations. Your code has to deal with the problems that can arise when your encoding is not adequate.

Note

You will learn a lot about that when you take a course in Discrete Math.

Here are notes covering the various ways we encode common data: