Multiplication Table Multiplication Table
Elementary+
DE JA English

Alice took up the fan and gloves, and, as the hall was very hot, she kept fanning herself all the time she went on talking: 'Dear, dear! How queer everything is to-day! And yesterday things went on just as usual. I wonder if I've been changed in the night? Let me think: was I the same when I got up this morning? I almost think I can remember feeling a little different. But if I'm not the same, the next question is, Who in the world am I? Ah, THAT'S the great puzzle!' And she began thinking over all the children she knew that were of the same age as herself, to see if she could have been changed for any of them.

"I'm sure I'm not Ada," she said, "for her hair goes in such ...

2 x 7 =
AND
X 1 1 1 dec sum
1 1 1 1 7 7
0 0 0 0 0
OR
X 1 1 1 dec sum
1 1 1 1 7 14
0 1 1 1 7
XOR
X 1 1 1 sum
1 0 0 0 0 7
0 1 1 1 7
7 + 14 + 7 = 28

7 x 2 =
AND
X 1 0 dec sum
1 1 0 2 6
1 1 0 2
1 1 0 2
OR
X 1 0 dec sum
1 1 1 3 9
1 1 1 3
1 1 1 3
XOR
X 1 0 sum
1 0 1 1 3
1 0 1 1
1 0 1 1
6 + 9 + 3 = 18

You should help Stephan write a function to calculate this "multiplication". You are given two positive integers (n > 0), be careful with order of arguments.

Input: Two arguments as integers.

Output: The result of the Stephan's "multiplication", an integer.

Example:

checkio(4, 6) == 38
checkio(2, 7) == 28
checkio(7, 2) == 18
    

How it is used: In this task we play around with logical binary operations, the basis for computer science. Maybe you can find a use for this subject in cryptography?

Precondition: 0 < x < 100
0 < y < 100

You should be an authorized user in order to see the full description and start solving this mission.