Close

loops!

A project log for 4 bit computer built from discrete transistors

This project is an attempt to teach myself about the inner workings of computers. Naturally I started from the bottom up.

zaphodzaphod 01/04/2015 at 17:040 Comments

I finally cleaned my bench so I can now fit all of the computer on it at once:

it's not assembled yet, but that is basically a year and a half of work.

I'm working on getting it all put together but right now I'm testing functionality one piece at a time, which brings me back to the title. I was able to make to program counter perform a loop! essentially I executed a JMP command, by making the program counter jump to an address other than 'current address+1'. basically what I did was hard-wire in a jump to memory address 6 at memory address 7, so rather than counting like this: 0,1,2,3,4,5,6,7,8,9,10,11 ... it would count like this: 0,1,2,3,4,5,6,7,6,7,6,7,6,7,6,7 ... that lays the ground work for loops in software. another thing that I don't think I have mentioned is that the program counter reloads to 1+the value expressed on the input bus, I.e. if you wanted to go to address 6 you would enter 5, and when the PC reloads it would reload to 5+1. it works this way because the logic was easier to build, so when programming JMP commands you have to remember that if you want to jump to ROM address 'n' you must express n-1.

Discussions