need two more instructions

Discussion in 'General Electronics Chat' started by Robin Mitchell, Dec 21, 2009.

  1. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    734
    200
    Hi guys,

    I am currently deciding on the instructions for my new 4bit hybrid. Now, here is what i have so far:

    0000 NOP
    0001 ADD
    0010 SUB
    0011 AND
    0100 EXOR
    0101 OR
    0110 NOT
    0111 Display reg (A) (REG defines display)
    1000 If (REG = 0001, A < B) (REG = 0010, A=B) (REG = 0011, A > B)
    1001
    1010
    1011 Goto (A and B)
    1100 Pause (clock A cycles)
    1101 Shift (left (B = 0001) Right (B = 0010))
    1110 Take user input (A) and then store in (B)
    1111 Move (A) to (B)

    But i want to use it all. Now, are there any important ones i need or can you think of something usefull (like make a noise at a frequency)
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    STORE (register, address)
    LOAD (register,address)
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    A couple of useful instructions are conditional branch instructions.
    For example,

    SGE "Skip if Greater than or Equal"
    SLT "Skip if less than"

    hgmjr
     
  4. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    How many addresses does the bus have? 256 (8 bit) or 65K (16 bit)?
     
  5. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    734
    200
    err...thats a little complicated so..

    There are two four bit words (A and B), there is a four bit word (REG) that tells it where to store the info, there is a four bit instruciton and a two bit definer( never mind about that).

    Now, the goto jump uses word A, B and REG turning it into a 12 bit meaning i can have up to 4096 lines.

    ALU functions are four bit

    registers hold four bit word
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    So it is a 12 bit address line with a 4 bit data buss.

    I tried looking up an old chip, the CD4500, that I thought you might like to see. It was a single bit processor. It was most of a CPU on a 16 pin chip. The address line was a simple 8 bit ripple counter, another 4500 series chip. To loop the CPU chip would go passive until the counter reached the address it was looping to. Very crude, but it worked, and with 256 iterations a loop didn't take that long, and 256 was the total max length of a program.

    Unfortunately it is so obsolete all information seems to have disappeared off the web, which I find surprising.
     
  7. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    We used to joke about these:

    HCF - halt and catch fire

    EBB - empty the bit bucket
     
  8. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    734
    200
    Ok, 1001 is now HCF haha
    What does the empty the bit bucket do?

    1001 Might be a block statemen for the if - could ignore or do everything within the block, very useful for loops. For example:

    IF (a < B)
    {
    Do
    Do
    Do
    }
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Empty bit bucket?

    It erases it's program, then turns itself off, preferably in a manner it can't be turned on again.
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    A little beer at happy hour, and strange things come to mind when you're learning computers.
     
  11. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I like the novel where programmers went to a dimension where magic worked, and men were loosing. They wrote a compiler that treated magic as a programming language, instantly making a lot of humans major magicians. One of the error codes (I liked) was EOI, Execute Operator Immediately.

    Put a whole new dimension on video games.
     
Loading...