![]() |
|
Re: Python Project: Binary Adding Machine
*bump* Anyone making progress?
|
Re: Python Project: Binary Adding Machine
I'll finish my project in a few weeks (not enough time atm) and if someone is interested I could provide a github-link to source.
Atm I coded what I described in my prev. post (I found a better way to update circuit-state). To do: add javadoc, gui, handle exceptions, check for loops, ... And last but not least create the binary adding machine, but it should be possible to simulate any kind of digital circuit. |
Re: Python Project: Binary Adding Machine
I'll give the github-link to my java-source files:
https://github.com/L8Fish/Circuits This is not finished at all, the code in the initial commits illustrates how I approached the problem. I coded it in a short amount of time. I made the commits also to experiment with git (which is new to me). Now I plan to pick it up again and tune/expand the code until it becomes a decent project including javadoc, gui, ... . I would appreciate any comments. |
Re: Python Project: Binary Adding Machine
Wow. I just downloaded and stared at the java code and it all looks Herculean, thus I am afraid to ask how I can run it...
I mean, I know how to run java code, but I don't know what file to start with. Nice work. I feel really lazy after looking at it. Hopefully someone here can review the work and give you some suggestions. I don't know any Java, so I have nothing to say but nice work. |
Re: Python Project: Binary Adding Machine
That's the reason why I need to do more of these projects:
Keep it well structured, ... and documented (not just make it work). I'm not satisfied with some implementations and javadoc has to be added. But some quick info: Component (interface) Element (abstract class implements Component) Wire (class implements Component) Input, Logic, Output (abstract class extends Element) InputAction, OutputAction (interface) AndGate, OrGate, NotGate (class extends Logic) Battery (class extends Input) Light (class extends Output implements OutputAction) Switch (class extends Logic implements InputAction) Circuit TestCircuit (method main) Code:
the example: |
Re: Python Project: Binary Adding Machine
I've finished my binary adding machine. I can add 2 very large binary numbers by using a circuit with more than 1000 wires (prolly some redundant wires). I make use of flexible blackboxes (xor -> half adder -> full adder -> ripple adder).
I get my blackboxes from pre-coded blackboxes. I also implemented a system to create them on the fly but there's a bug in it which I cannot solve very quick. After I solve this I will commit the code to github. Still messy stuff but I will continue working on this. A test-class however could be used pretty straight-forward. |
| All times are GMT -4. The time now is 06:17 PM. |
|
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 2008-2020, Two Plus Two Interactive