Quotient and remainder dividing by 2 ^ k ( a power of 2 ) | function to print remainder and quotient ; print Remainder by n AND ( m - 1 ) ; print quotient by right shifting n by ( log ( m , 2 ) ) times 2 is base ; Driver Code
< ? php function divide ( $ n , $ m ) { echo " Remainder = " . ▁ ( ( $ n ) ▁ & ( $ m ▁ - ▁ 1 ) ) ; STRNEWLINE TABSYMBOL echo ▁ " Quotient = " } $ n = 43 ; $ m = 8 ; divide ( $ n , $ m ) ; ? >