bits.Mul32() Function in Golang is used to find the 64-bit product of x and y. The execution time of this function does not depend on the inputs. To access this function, one needs to imports the math/bits package in the program.
func Mul32(x, y uint32) (hi, lo uint32)
Parameters: This function takes two parameter of uint32 type, i.e., x, y.
Note: (hi, lo) = x * y
Here, hi is the product bits’ upper half and, lo is the lower half returned.
Return Value: This function returns the 64-bit product of x and y.
64-bit product of x and y : 0 14
Number 1: 10 Number 2: 20 Upper half: 0 Lower half: 200
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.