Open Side Menu Go to the Top

08-06-2012 , 10:26 PM
*bump* Anyone making progress?
Python Project: Binary Adding Machine Quote
Python Project: Binary Adding Machine
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Python Project: Binary Adding Machine
08-07-2012 , 08:36 AM
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.
Python Project: Binary Adding Machine Quote
08-21-2012 , 08:09 AM
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.
Python Project: Binary Adding Machine Quote
08-22-2012 , 01:25 AM
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.
Python Project: Binary Adding Machine Quote
08-22-2012 , 05:04 AM
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:
batt0 --- switch0 --- not0 ---
                                            
                                             and0 --- light0                         
batt1 --- switch1 ---                 
                                or0 ---
batt2 --- switch2 ---

test.makeAction(pos,act);//uses the switches
//pos = 3, 4 or 5 
//act = 0 or 1 
//instead of 3, 4 or 5 I should use the reference to the correct InputAction-object
//instead of 0 or 1 I should use a final variable

Last edited by cyberfish; 08-22-2012 at 05:23 AM.
Python Project: Binary Adding Machine Quote
08-27-2012 , 05:35 PM
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.
Python Project: Binary Adding Machine Quote
Python Project: Binary Adding Machine
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Python Project: Binary Adding Machine

      
m