8 bit simple computer

  • Coban
    20th Jun 2014 Member 4 Permalink

    Here the programing instruction for my computer:

     

    -The program must be writen with filter
    -The setup is made to initialise variables: the first column (3 bits) specifies an adress, the second (8 bits) the value which will be writen at the adress
    -The first column of the program (3 bits) specifies a memory adress which will be used by the instruction and which we can call Variable A
    -The second column of the program (4 bits) specifies an instruction for operation

     

    all instructions:

    0000: pass
    0001: del A
    0010: write ALU's value in A (del ALU's value and former A's value)
    0011: write buffer's value in A (del buffer's value)
    0100: print A
    0101: add A to the ALU
    0110: subtract A from the ALU
    0111: add not(A) to the ALU (it is a not which work whis the entire byte: not(01000100)=0)
    1000: add not(A) to the ALU (it is a not which work bit by bit: not(01000100)=10111011)
    1001: increment ALU's value
    1010: write A in the buffer
    1011: jump one line if A
    1100: add 11111111 to the ALU if A written in two's complement positive add 00000000 else
    1101: decrement ALU's value
    1110: go to the first line and continue
    1111: go to the first line and end program

     


    for exemple: a program which compute and print fibonacci sequence:

    setup:
    000 00000001 //a=1
    001 00000001 //b=1
    program:
    000 0100 //print a
    000 0101 //add a to ALU
    001 0101 //add b to ALU
    001 1010 //buffer=b
    000 0011 //a=buffer
    001 0010 //b=ALU's value (a+b)
    000 1100 //go to first line


    English is not my first language, please tell me if I made some english mistakes.

    Edited 3 times by Coban. Last: 20th Jun 2014
  • Protcom
    20th Jun 2014 Member 0 Permalink

    @Coban (View Post)

    English is not my first language, please say me if I made some english mistakes.

    I didn't read everything

    please tell me works better.

    It's awesome by the way. You even did the address and printer and other things that most people don't do.

  • massey101
    20th Jun 2014 Member 0 Permalink

    Very awesome. An interesting take on processor architecture using a single ALU register. What's the "Memory in the bottom right for?" You don't appear to be able to write or read from it in your instruction set? 

  • mecha-man
    20th Jun 2014 Member 0 Permalink

    Coban:

    English is not my first language, please say me if I made some english mistakes.

    "please say me" should be "please tell me"

    "0110: subtract A to the ALU" should be "0110: subtract A from the ALU"

    "wich" should be "which"

  • h4zardz1
    20th Jun 2014 Member 0 Permalink
    exemple is example.
    correction:
    -which will be used by the instruction, which we can call Variable A.

    english is not my first language too, i have problems with some words like "attnemt" and "consinder"
    Edited once by h4zardz1. Last: 20th Jun 2014
  • Coban
    20th Jun 2014 Member 0 Permalink

    @massey101 (View Post)

       This is the buffer, you can use it in order to transfer a value from a variable to another variable. see 0011 and 1010