bits.Reverse8() Function in Golang with Examples Last Updated : 19 Apr, 2020 Comments Improve Suggest changes Like Article Like Report Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Reverse8() function which is used to find the reversed order of the value of a. To access Reverse8() function you need to add a math/bits package in your program with the help of the import keyword. Syntax: func Reverse8(a uint8) uint8 Parameters: This function takes one parameter of uint8 type, i.e., a. Return Value: This function returns the value of a with its bits in reversed order. Example 1: C // Golang program to illustrate bits.Reverse8() Function package main import ( "fmt" "math/bits" ) // Main function func main() { // Using Reverse8() function a := bits.Reverse8(5) fmt.Printf("Reverse order of %d: %b", 5, a) } Output: Reverse order of 5: 10100000 Example 2 : C // Golang program to illustrate bits.Reverse8() Function package main import ( "fmt" "math/bits" ) // Main function func main() { // Using Reverse8() function a1 := bits.Reverse8(9) fmt.Printf("Reverse8(%08b) := %b\n", 9, a1) a2 := bits.Reverse8(13) fmt.Printf("Reverse8(%08b) := %b\n", 13, a2) } Output: Reverse8(00001001) := 10010000 Reverse8(00001101) := 10110000 Comment More infoAdvertise with us Next Article bits.Reverse8() Function in Golang with Examples K Kirti_Mangal Follow Improve Article Tags : Go Language Golang-bits Similar Reads bits.Reverse() Function in Golang with Examples Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Reverse() function which is used to find the reversed order of the value of a. To access Reverse() functi 1 min read bits.Reverse16() Function in Golang with Examples Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Reverse16() function which is used to find the reversed order of the value of a. To access Reverse16() fu 1 min read bits.Reverse32() Function in Golang with Examples Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Reverse32() function which is used to find the reversed order of the value of a. To access the Reverse32( 1 min read bits.Reverse64() Function in Golang with Examples Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Reverse64() function which is used to find the reversed order of the value of a. To access Reverse64() fu 1 min read bits.ReverseBytes() Function in Golang with Examples Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides ReverseBytes() function which is used to find the reversed order of the value of a. To access ReverseByte 2 min read Like