Friday, November 16, 2018

Release 3.0 3






In this last release I will be creating physical diagrams for reference of the commands we will be building. To start I choose to work on the Adr command which gets two numbers and returns a product. I will put a picture below to help my explanation


 The first command i am working on is the Adr this command gets inputs from a and be and stores the result in S. Because we are only working with 1s and  0s there will be a time when we two 1s and we don't know how to fit that in. That is where we have cout, with this we can story any extra data.

The above is a half adr, as you can probably see there is no place for you to send the extra input when you are done, this why we add something called the full adr.



 As you can see we have added an extra input this is where the cout from the last adr goes. Now that we understand the simple concepts lets move on to something more challenging. Although our cpu will be  in 16 bits i have created a simple eight bit adr.




 In this case we start with a simple half adr at the top because there is no input coming from cin yet, but if there is need for it, the cout will pass it to the next command.

The reason we have physical diagrams like this is, it helps us understand what we are programming and what the code is supposed to be doing what inputs we expect and so on. With more work we can add stuff like this for all the commands
























No comments:

Post a Comment