RE: Did people lose their basic math skills ?

You are viewing a single comment's thread from:

Did people lose their basic math skills ?

in math •  8 years ago 

The correct answer is 10, of course!

(assuming the numbers are given in binary and operations are bitwise)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

you made me panick for a second but if it was binary it would be zero :)

"Bitwise operations" are the important keywords in this approach.

Can you explain. I don't get it :-) ?

Consider two bitstrings:
0101101011
1001011110

Their bitwise multiplication (aka "logical and") is the following string:
0001001010

Their bitwise addition (=subtraction, aka "logical xor") is the following string:
1100110101

"Bitwise" means you perform the operation separately for each corresponding bit. The first bit of the first string is 0, the first bit of the second string is 1, their product is 0, and their sum is 1 - these are the first bits of the corresponding result bitstrings, and so on.

Note that 1+1 is defined as 0, i.e. you "overflow the bit value", although this is not even important for the problem at hand.

thanks very clear

omg stawp