## View Poll Results: do you use goto in c/c++/c#/etc programming?

Voters
15. You may not vote on this poll
• Everything should flow. No goto.

9 60.00%
• I like the flexibility. Yes, goto.

3 20.00%
• I'm still wondering what this has to do with logic gates.

3 20.00%

This is a discussion on addition within the A Brief History of Cprogramming.com forums, part of the Community Boards category; i read somewhere that computers add using some combination of logic gates, and that the only way multiplication could be ...

i read somewhere that computers add using some combination of logic gates, and that the only way multiplication could be done is through addition. is this true, and if so, how?

2. think of multiplication like this:

9 multiplied by 8 means 9 eight times over,
so 9 * 8 == 9+9+9+9+9+9+9+9.

starX
www.axisoftime.com

3. I believe you're thinking of boolean logic gates. You may be interested in the explination provided here.

4. about multiplication: what if the number were big? back when i had a tandy 1000ex(8.077 mhz, 1984 i think) basic could do a for i=1 to 5000, next loop in one second. is there some sort of help the processor gets?

5. the multiplication cannot actually be done by a computer due to the logic systems it uses, so the multipolication is carried out by bit-shifting and addition

6. Well, multiplication and loops are different beasts.

For multiplication: Technically, you could just have a multiplication table in your CPU, but the way I learned it, it's a combination of shifts, additions, and perhaps subtractions.

For loops: You can think of increment or decrement operators as even more basic than addition and subtraction. Loops are very important, so much that loop commands are commonly a part of a processor's architecture.

7. or you may be interested in wasting your time clicking the link provided here

8. Originally posted by Sean
or you may be interested in wasting your time clicking the link provided here
That is a stroke of pure genius which should be prominently displayed at the beginning of the FAQ. :)