gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

OffTopic > Gotta do a school presentation on Binary Addition

#114150 - Edelnutte - Thu Jan 04, 2007 5:41 pm

Hey guys I gotta do a presentation on binary Addition. I know its just & but my teacher said I gotta tell how it works in the CPU. He also said I might wright a few programs. I think assembler would also be nice but I have no Idea. I don't know where to look for that stuff because it's a pretty small topic (actually just about 1 and 0 ^^) I'd appreciate any help.

#114152 - poslundc - Thu Jan 04, 2007 5:54 pm

Edelnutte wrote:
I know its just &


Oy.

Quote:
I don't know where to look for that stuff because it's a pretty small topic (actually just about 1 and 0 ^^) I'd appreciate any help.


I'm not clear from your post exactly what aspect of binary addition you're supposed to be investigating. But you might start here: http://en.wikipedia.org/wiki/Binary_arithmetic

Dan.

#114153 - Lick - Thu Jan 04, 2007 5:56 pm

You -could- use the key input as an example of how to see which keys are pressed. If the topic isn't fit, you should really go to your teacher and ask for something 'bigger'.
_________________
http://licklick.wordpress.com

#114154 - poslundc - Thu Jan 04, 2007 5:59 pm

Also check: http://en.wikipedia.org/wiki/Adder_%28electronics%29

Dan.

#114155 - Sausage Boy - Thu Jan 04, 2007 6:00 pm

You might want to have a look at http://www.play-hookey.com/digital/adder.html to see how it works in the cpu.
_________________
"no offense, but this is the gayest game ever"

#114174 - sgeos - Thu Jan 04, 2007 11:29 pm

Edelnutte wrote:
Hey guys I gotta do a presentation on binary Addition.

Addition works the same regardless of the radix (base of the numbering system; 10 for decimal, 2 for binary) used. (I'm glad I don't have to do your presentation. I'd probably be failed for saying something like that. =) You could look into the electrical aspects of CPUs, arithmetic on computers. Most CPUs have a carry flag.

Note the &= is binary addition without carry. The radix you use will certainly affect the results of addition without carry.

-Brendan

#114180 - tepples - Thu Jan 04, 2007 11:59 pm

sgeos wrote:
Edelnutte wrote:
Hey guys I gotta do a presentation on binary Addition.

Addition works the same regardless of the radix (base of the numbering system; 10 for decimal, 2 for binary) used.

This is correct, assuming that your radix point is an integer greater than 1. Irrational bases exist.

Quote:
Note the &= is binary addition without carry. The radix you use will certainly affect the results of addition without carry.

No, ^= (XOR) is bitwise addition. &= is bitwise multiplication.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#114181 - sgeos - Fri Jan 05, 2007 12:11 am

tepples wrote:
sgeos wrote:
Addition works the same regardless of the radix (base of the numbering system; 10 for decimal, 2 for binary) used.

This is correct, assuming that your radix point is an integer greater than 1. Irrational bases exist.

Interesting. I had not considered anything other than an integer greater than one.

tepples wrote:
Quote:
Note the &= is binary addition without carry. The radix you use will certainly affect the results of addition without carry.

No, ^= (XOR) is bitwise addition. &= is bitwise multiplication.

My bad. Thanks for the correction.

-Brendan

#114519 - Edelnutte - Mon Jan 08, 2007 6:29 pm

Thank you very much guys that helped me a lot!

#114621 - sgeos - Tue Jan 09, 2007 4:13 pm

Edelnutte wrote:
Thank you very much guys that helped me a lot!

Very welcome. Best of luck!

-Brendan

#118462 - Edelnutte - Tue Feb 13, 2007 6:02 pm

Ok I just have a few more, more detailed questions.
How is a Binary adder implemented in actual Hardware, what happens if the sum overflows, and how do carry look ahead adder work?

#118464 - Optihut - Tue Feb 13, 2007 6:22 pm

Edelnutte wrote:
Ok I just have a few more, more detailed questions.
How is a Binary adder implemented in actual Hardware, what happens if the sum overflows, and how do carry look ahead adder work?


These days it is so easy to find almost any information that you are looking for - the tools of choice are http://www.google.com and http://en.wikipedia.org/

poslundc has already mentioned the page, which answers at least 2 of your 3 questions: http://en.wikipedia.org/wiki/Adder_%28electronics%29