This computer has a data bus and a control bus. and on those busses there are external devices that you can send data to/from. the ALU is the same as My old Computer design at https://circuitverse.org/users/15083/projects/8-bit-cpu-80eab5d4-e248-4c33-960d-08b58cd655c3.the opcodes are also the same as my previus vertion.
also this one has a large display at the bottom that displays the time as the X and the line of code executed as the Y and the data bus value as the color.
the default program loads the UI data into ALU register A and loads ram address 1 as ALU register B. witch makes a accumulator. and then displays the value to the user output and the number display, if the user input value == 0 then jump to line 7 and resets the value to zero.
To start, pres the start button.
I am working on a new CPU that is much better. it will also have a link to a assembler(made in javascript).
you can fork it and improve it and do whatever you want with it. Enjoy !!!
An 8-bit addition/subtraction unit with two's complement arithmetic and an accumulator.
BCD displays are added for nicer user experience.
First steps in CircuitVerse
My first Computer, its still in Development, and am working on more space for your Code, more commands and etc.
I know this thing is not good at all, but it does its job and here are the possible instructions:
"01" -> Moves Value from next Adress to Register0. Example: Code "01 05" Loads Value 5 in Register0
"02" -> Moves Value form R0 to R1. Example: "02"
"03" -> Addes value from R0 and R1 and saves it in A. Example: "03"
"04" -> Moves Value from A to R0. Example: "04"
"05" -> Jumpes to given Adress in Code. Example: "05 00" Jumpes to Adress 00 in Code
"06" -> Compares if R0 and R1 are equal. Example: "06"
"07" -> Jumpes to given Adress if Command "06" returns false. Example: "07 03", Jumps to Adress 03 if "06" returns false
I know there are missing a lot of usefull commands, but this was my first test and i will work on it to get it better.
Is there any way to get an clock faster than 50ms?
8 bit multiplir
A programable CPU/Proccessor/computer/whatever this qualifies as! 256 bytes of RAM/Memory, a working ALU and processor, and programable. Takes commands as 32 bit inputs, explained at the top of the "CURRENT PROGRAM" subcircuit, currently setting the first variable to 3 and then incrementing it. to edit the program, change the constants at the top of the CURRENT PROGRAM subcircuit to the commands you want(commands are listed in the processor subcircuit). note: variables, if not set to a value somewhere previous in a program, will not be 0, but undefined(red). also, all numbers are stored as 8 bit, and will roll over. there is no difference between adding 255 and subtracting 1. if you want to use a different ALU, make sure to either adjust commands in the programs you make or use the same ones as mine.
8-bit Calculator
Description:
This project Can do 4 different operations on a number Add, subtract, Multiply, and Divide.
How to Use:
Type in the keyboard, to type numbers, and note if you go over 255 it might break (click clear to fix).
Click the button for an operation. Note: Click on the same operation again to remove it. This will be useful when changing operations because if you do not do so it will think that it needs to do 2 operations at the same time.
Click the button that says selected data to choose from the top or bottom when typing in the numbers.
How it Works:
Inputs are converted to BCD and Binary. the binary is then put into all of the operations(Add, Subtract, Multiply, Divide)
ADD: Use a ripple carry adder.
Subtracter: Adder with an Invert B and a Carry-In. if Carry Out on then it is a positive number and if off it is a negative. If negative it will then invert again and add on, to get the negative result.
Multiplier: I have no idea how this one works.
Divider: Same here(I did have to double the input size thought)
The outputs of all these operations into a multiplexer which chooses what input will go into the display.
Display: HEX display
Answer: convert binary to BCD(very hard) I made it but I did use help by watching a tutorial.
Note: I only used the logic from 0:52 to 3:00