Jun 21 2014

Building a CPU Part I – Implementing logic gates

For a long time now, I was thinking to myself: “I know how to develop softwares, And I also have a little bit of practice with drivers and compiling operation systems (I even tried to write my own code to a boot sector and run it), But I never really understood how CPU works”.

So I’ve decided to take matter into hands and try to build a CPU. At first I thought about creating it all from scratch, But quick enough I discovered that the amount of transistors I will have to solder is enormous (I will soon enough show that even a simple NAND gate requires 4 transistors). So I’ve decided to build it on FPGA which will make life easier, and instead of creating my own architecture, I’ve decided to try and mimic the 6502 microprocessor, which is the CPU used by NES. If everything will go according to plan, I will be able to play Super-Mario on my own CPU.

The first post will have nothing to do with FPGA, as logic gates are provided out-of-the-box when using FPGA, so this part will have nothing to do with my implementation of the 6502 microprocessor. But according to my belief this part is the most important one, because the logic gates are the basic building blocks of any electronic device, in particular a CPU.

Continue reading

Nov 22 2013


For a while now, I was looking for a good encrypted XMPP client, something that will support PGP for example.
I even considered developing one myself, But then I’ve found out about Psi.

Psi is a simple to use open-source XMPP client, that has PGP integrated into it. It works with GTalk (Google Chat) and Facebook. All you need to do is install it, generate your key (if you don’t have one already) and add your friends public key.

The software can function as normal XMPP client as well, Meaning if your friend doesn’t have it, you can discuss in plain-text mode. If you will send him an encrypted message, he will see an error message indicating that the message is encrypted: “[ERROR: This message is encrypted, and you are unable to decrypt it.]”.

Aug 8 2013

OsDown – A script to download subtitles

Lately I’ve been watching a lot of movies using Apple TV as a streamer.
I am using Beamer as the streaming app for my macbook air. Beamer also supports streaming with subtitles, which is a very cool feature, but you need to download the subtitles manually.

A year ago, I’ve built a Mac app called Sheeplayer¬†which is a basic video player with the capabilities of downloading subtitles automatically from OpenSubtitles. Today I’ve decided to extract this capability into an independent script so I will be able to download the subtitles automatically to a given folder without executing any other program.

The script can be found at my github at: https://github.com/DiGMi/OsDown.