Saturday, June 29, 2013

Simpletron: A Simple Computer\Microprocessor

Simpletron: A Simple Computer\Microprocessor

In my early days of learning Java I had been provided with "Java How to Program" by Deitel from my college library. I wondered the initial week as to why we had been given this book instead of the standard Sun Microsystems Press Series, "Core Java 2 Volume 1 Fundamentals" by Dr. Cay S. Horstmann and Gary Cornell. Now, I realize in hindsight that it was a good choice on behalf of the library for us, who had first time exposure to Java in our engineering curriculum.


I don't mean to say that Core Java Volume 1 Fundamentals is not a good book, but its for programmers (already drilled with the art of programming, looking to learn Java for the first time) and those with at least one programming language familiarity. It doesn't contain enough large/complex real life examples as in Java How to Program. Also, Java How to Program was a somewhat composite book with a brief introduction of Advanced concepts which has been separated by Sun Microsystems Press into Volume 2 Advanced Concepts. Deitel also contains lots and lots of exercises for practice to hone your Java skills to a very high degree of perfection.

Now, returning to the topic of this blog. The thickness/volume of this book initially made it quite and intimidating task to initiate the learning process.


After my initiation into Java and a few months of tinkering of code on Netbeans IDE (Yeah, one of the first mistakes I did as a beginner was to use an IDE. Should've used the Terminal/Command Prompt and I'd have become better quicker), I was introduced by a friend of mine to "Head First Java" from O'Reilly by Kathy Sierra & Bert Bates. It is an excellent book for beginners!

While cementing my concepts, juggling between the three books and two IDEs (I started using Eclipse. It is the most widely used IDE), I frequently returned to Java How to Program for examples and exercises and one day I stumbled upon question number 7.35 Special Section: Building Your Own Computer (Page Number 309). I was instantly intrigued by the question and support material it contained to create a program which I would in later classes and years will come to know as a Microprocessor. If I'd have realized it at that time, it may have had become a daunting task (It's true that, ignorance is bliss).

In a few weeks I had completed the project and then went on to add a mnemonic conversion facility. It was a very good experience, I'll admit.

So, without further delay. Here's the source code to my Simpletron.

Download Source Code

Oh! And do comment and critique.

Screen Shots

[Note: I've not posted other screen-shots due to their intimidating and disturbing nature, especially with a lot of doubles printed in 2D Arrays may look a lot like advanced mathematics. Trust me it's easier. Also, try my code after you've attempted to built your.]

No comments:

Post a Comment