Question about the relationship between the two numbers

Is there any connection between bits of numbers when one is divided by another? What is the relationship between bits 36 and bit sequences 9 or 4 or 12, or between 10 (1010) and 5 (101), or 21 (10101) and 7 (00111)?

Thank. I apologize if any suggestion is wrong, but I hope you understand what I want.

+3
source share
5 answers

Let's look at example 36.

36 = 0010 0100

36 4 * 9, i.e

 4 = 0100
 9 = 1001

If you multiply them (for example, by normal multiplication), you will have

    0100 x
    1001
 --------
    0100
   0000
  0000
 0100
 -------
 0100100

So essentially 0100 x 1001 = 0010 0100(you can repeat the same for any other pair of dividers, of course)

, - , 36, ? , , :)

: KNOWN , , , , , - . - .

+3

, , , . . , , , 3 . , .

+4

, , "" " " , ?

!

+1

, a b, a b ( ,

boolean isMultiple = a % b == 0;

) , , .

, ...

0

0 , n. -, , DonnyD ( ), , . , , , .

, /. , , , .

, - , PKI, , , . , , , .

0

Source: https://habr.com/ru/post/1751982/


All Articles