Forums - Open Redstone Engineers
Branching systems - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Build Discussion (https://forum.openredstone.org/forum-50.html)
+--- Thread: Branching systems (/thread-575.html)

Pages: 1 2


Branching systems - EDevil - 07-16-2013

Hello everyone,

Due to my project a.t.m., i need a branching system. No worries, right? Well, not quite. You see, ever since i've been working with redstone, i used the following flags:

IF (ALU Output < 0) {Branch}
IF (ALU Output == 0) {Branch}
IF (ALU Output > 0) {Branch}

However, i've seen a lot of branching system nowadays that are using this system:

IF (A< B) {Branch}
IF (A == B) {Branch}
IF (A > B) {Branch}

Which one is, by your choice, the best to implement? I'll assume b.t.w. that i'll need a comparator for option nr.2.


RE: Branching systems - Thor23 - 07-16-2013

I would say the second one, since it is capable of comparing to any number including zero.


RE: Branching systems - Nickster258 - 07-16-2013

I can immediately tell that the second method is more conventional. Also, and ALU can be a comparator.


RE: Branching systems - CMOSprinkles - 07-16-2013

I find comparative functions difficult to implement in an ALU, do you have any examples Nickster258?


RE: Branching systems - Guy1234567890 - 07-17-2013

I use both :p


RE: Branching systems - Billman555555 - 07-17-2013

Currently in SAC I am using
Option B and IF (ALU == 0) {Branch}


RE: Branching systems - Guy1234567890 - 07-17-2013

hm. My cpu generates a flag wich is stored in its registers. This flag is a direct result of 1 or more base flags in sequence (in my case it is just Carry Out). Therefore, if the user wants to know something about the data, they can directly fetch the flag outputted and put it through a decoder to learn what it means.


RE: Branching systems - EDevil - 07-18-2013

Thanks for all of your responses guys! Srry for responding this late, im in the hospital a.t.m. with a pneumothorax. Not only does this hurt quite a lot, but my internet here is terrible as well, so you won't see me online for a couple of days.


RE: Branching systems - Guy1234567890 - 07-18-2013

D: i hope you get better!


RE: Branching systems - Billman555555 - 07-19-2013

Hope you get better :o

I have just changed my Flags (ALU) to:

If (SCout == 1) {Branch}
If (ACout == 1) {Branch}
If (A == B) {Branch}
If (A => B) {Branch}
If (A =< B) {Branch}