Problem: I

Binary Multiplication

           

 

All of us know simple multiplication rule.  Can we make a program to multiply two binary numbers? Well we can try.

 

 

Input specification:

Each case will define two binary strings (x & y). You can assume that length of each string will not exceed 30. The program will terminate with a 0 0.

 

Out put specification:

            Out put must be formatted like the following examples. You have to show the step by step procedure for the multiplication. Each result will be separated by an empty line.

 

Sample Input:

Output for Sample Input:

11 11

111 10

10 111

0 0

  11

  11

  --

  11

 11

----

1001

 

 111

  10

 ---

 000

111

----

1110

 

  10

 111

 ---

  10

 10

10

----

1110

 

 

------------------------------------------------

Problem setter: M. Mizanur Rahman