Building an 8-bit computer in Logisim (Part 2— Arithmetic)

Karl Rombauts
16 min readApr 25, 2020

In this part, we will be covering how to do all the standard arithmetic operations, addition, subtraction, multiplication, and division. We will also be covering other essential operations like bit shifting and circuits like multiplexers.

Addition

I know that we covered the adder circuit in the previous article, but I wanted to explore one more important topic, overflow error.

Overflow Error

What happens when we try and exceed the maximum value of an 8-bit number? Well, let’s have a look.

We start with the largest 8-bit number possible 11111111 = 255. Then we try and add 1 to it. As you can see for each column, we end up with 0 + 1 carry bit. This propagates all the way to the left-most column, and our final result is 100000000 = 256. However, we have a slight problem. We only have 8 bits to store a number, and 256 requires 9 bits. We have no space to store that last 1 in the 9th column. This means we end up rolling back over to 0. A real-world example of this is a tally counter that has reached 9999.

Tally counter

--

--