View Single Post
Old 09-07-2008, 08:55 PM   #9 (permalink)
S0ULphIRE
S0ULphIRE's Avatar
 
01001100011011110110110

Join Date: Mar 2007

Location: Perth, Australia

Posts: 1,973

S0ULphIRE has a spectacular aura aboutS0ULphIRE has a spectacular aura about

Send a message via MSN to S0ULphIRE
Default Re: Noob at C++, just looking for some beginner help.

ok, try binary first then. There are only two possible values: 1 and 0. All you need to know is that 0+0=0, 0+1=1, and 1+1=10 (NOT ten, but One Zero) It's very important that you keep in mind that if you see 1000 in binary it's 'One Zero Zero Zero'.
so you'd count like this:
00 (0 decimal)
01 (1) ------ when I added 1 to 00 I got 01, (0+1=1)
10 (2) ------ when I added 1 to 01 I got 10, (1+1=10)
11 (3) ------ when I added 1 to 10 I got 11, (0+1=1)
100 (4) ------ when I added 1 to 11 I got 100, (1+1=10)

The last example maybe needs a bit more explaining. Taking the problem one digit at a time:
we added "1" to the first digit in "11". 1+1=10.
Now we have "0" where the first "1" used to be, and the "1" from our "10" answer is in the same place as the second "1" in "11" e.g. 1(1-on-top-of-other-1)0
With the two 1's in the same place, they need to be added. 1+1=10
So our final answer is 'OneZeroZero' or '100'
__________________
"As a result of all this hardship, dirt, thirst, and wombats, you would expect Australians to be a dour lot. Instead, they are genial, jolly, cheerful, and always willing to share a kind word with a stranger, unless they are an American."
-- Douglas Adams

Click this if I helped you
>>>><<<<
S0ULphIRE is online now