b := make([]byte, 1) b[0] = 255 fmt.Printf("%b ", b[0]) //11111111 fmt.Printf("%b ", b[0]>>7)//1fmt.Printf("%b ", (b[0]>>6) & 1)// = 11 & 01 = 1