Addition & Base Conversion


Let's talk about addition. This is something that we find very easy- almost second nature- to do in our own heads. However, it's something that we should take a closer look at should we attempt to figure out how a computer systematically does this.

If you're at the University of Maryland, you've most likely either taken 250 already, or are taking it while taking this class. This is good, because you get the theoretical background for how computers add numbers. However, 250 leaves out a few key parts of the digital analogy that I think can be represented excellently using Minecraft blocks.

This is where we'll also talk about number systems and base conversions. As humans, we use the decimal system, and that's for a variety of reasons. A good start is noting that most of us are born with ten fingers in total.

However, the decimal system is hardly optimal for computers. To the contrary- 10 is a nightmarish number of 'states' for a computer to keep track of. It's much more simple for the digital systems that we've designed to keep track of two states: 'on' and 'off'. This holds true even in the digital systems we build within Minecraft.

If you're having trouble understanding this number system difference, consider the simple example in c3.5 after understanding the contents of c3.3 and c3.4

Why Adders?

We learn adders for a simple reason- it's great to have all these numbers, but at the end of the day, we should get to the good stuff: doing exciting things with these numbers.

What's the most exciting thing you can do with numbers? Math.

It just so happens that the easiest arithmetic operation (the one that we'll start off with) to perform with numbers is addition. Following that logic, our first stop on this excellent adventure is the wonderful world of adders.

Base Conversions?

Earlier, we talked about how decimal was the easiest for humans (unless you're strange, of course), and how binary was the easiest for digital systems. As we know, binary is also easier for the digital systems we will create in Minecraft.

The reason for this is that in the digital constructs of today, and in Minecraft, it's highly simple to keep track of two states: 'on' and 'off'. We'll talk more about this in future sections.

For now, we're going to focus on what'll allow us to easily interface with these numbers. In other words, we'll create hardware that allows us to convert binary (base-2) to decimal and vice versa. We'll also generalize this concept to allow you to convert between any number system.

In Relation to Other Classes

By this point in the semester, 250 and 216 should have introduced you to the above two concepts already. Feel free to look to those classes for a quick review, should you need more than what this textbook provides.

For those of you outside of the University of Maryland, we're talking about a Discrete Math and an Intro to Computer Systems course, respectively.