Monday, December 8, 2008

4 bit Micro-Computer

It was a bright sunny day, as I was walking in front of the scruffy canteen of buet, a colossal star told me that the assigned 4 bit computer requirements are available on Palashi. Well it included no more than 16 instructions. They include logical AND, OR, XOR, XCHG, ADD, SUB, PUSH, POP, JZ(jump if zero), SHIFT right, CALL address, LOAD etc. After passing the mid term in despair, I finally came up with a operational design which could do the previous. Even though this looks a bit cumbrous, there was no energy left to pretty it up. The instructions are written on the RAM and the instructions are executed sequentially.

0000=add a,b
0001=sub a,b
0010=xchg b,a
0011=rcl b
0100=shr a
0101=mov address,b
0110=xor a,address
0111=and a,b
1000=or b,address
1001=out a
1010=jz address
1011=push a
1100=pop a
1101=call address


Sabih Uddin Omar said...

I was here too lol

Anonymous said...

dude, who uses 4 bit these days?

Iftekhar said...

he who must not be named!