How to get the eight bit values of a variable with UInt8?

The simplest is:

julia> a = 0x0c
julia> digits(a, base=2, pad=8)
8-element Vector{Int64}:
 0
 0
 1
 1
 0
 0
 0
 0
6 Likes