Tag Archives: unicputeam

TTL RISC CPU Project – Building a Programmable Program Counter

The latest episode of our project to build a CPU is now online.  It’s likely to be the last for a couple of months because of the summer holidays (and my internship – more to follow on this shortly).  The series (‘Mum, I am Building a CPU’) has now passed 1500 video views, so that’s fantastic.

In this episode (embedded below), I talk about constructing a program counter with support for Jump instructions.  We built this over two bread boards, and I go through first the logic and diagrams, then the actual circuitry.

Mum, I’m building a CPU – Performing Subtraction via Negation

This week, we published the latest episode in our video blog covering our journey constructing a CPU.  In this episode (embedded below), Charlie explains how we perform subtraction using our 8-bit full adder board.  If you just want to see the video, keep scrolling down, however if you’re looking for a quick simple explanation of some of the concepts (2’s complement and signed binary), take a look at this:

Let’s say we want to perform 7 – 5.  This is the same as 7 + (-5).  If we can represent the -5 in binary, we can simply put both through our added.  Luckily, we can because our CPU uses Signed Binary Values.

What does this mean?  Basically, we use the first (most significant bit) as an indicator as to whether the number is positive (msf = 0) or negative (msf = 1).

00000000 = 0
11111111 = -1
11111110 = -2

Let’s say we have a binary representation for positive number x.  To convert this to a negative number, we will flip every bit (1 <= 0, 0 <= 1), and then add one.  For example:

00000101 = 5
11111011 = -5

Initially, we performed this operation using not gates, however as Charlie explains in the video it’s much more efficient to use XOR’s!

Note, I did write a similar (and still relevant) post about this earlier, but the information in that is no longer completely correct, hence this post.

If you’re new to the series, you can catch up here!

Mum, I’m Building a CPU – 8-Bit Full Adder

The latest episode of the Unicputeam project has been published, so I’ve included it below. In this episode, Andrei talks about how the 8bit ripple adder works, which we will build on next time with a discussion of how the subtractor works.