Chapter 3: Computing with Base-n Numbers
We are all accustomed to decimal (base-10) numbers. In this chapter, we will introduce numbers in other bases, describe arithmetic operations with those numbers, and convert numbers from one base to another. We will then move to binary digits (base-2), which are the foundation on which all computer operations are built, develop an approach to efficient arithmetic with them, and look at some of the core uses of binary, including Boolean algebra. Lastly, we will discuss hexadecimal (base-16) numbers and their uses in computer science. We will use Python code to do some computations such as converting decimal numbers to binary and hexadecimal and use Boolean operators to select and view data that satisfies a certain criterion.
In this chapter, we will be covering the following topics:
- Base-n numbers
- Converting between bases
- Binary numbers and their application
- Boolean algebra
- Hexadecimal numbers and their application...