Standard library / math/bits
bits.Mul32()
Multiplies two unsigned words, returning high and low halves of the full-width product. Expected stdout: '0 42\n'.
Formal Syntax & Structure
go syntaxgo
func Mul32(x, y uint32) (hi, lo uint32)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | uint32 | First input operand (or sole input if unary). |
| y | uint32 | Second input operand. |
Return Value
(hi, lo uint32)
Multiplies two unsigned words, returning high and low halves of the full-width product.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/bits")
func main() { h, l := bits.Mul32(6, 7) fmt.Println(h, l)}