byte to binary string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there a way to convert a byte to a bit string? For Instance if the value
of the byte is 104; then I would like to convert that to a bit string of
'1101000'?
 
joethis,

If you want to do this, then I would recommend using the static ToString
method on the Convert class. It will take a byte (or any other integral
type), and allow you to specify a base to represent the number in. In this
case, you would pass two.

Hope this helps.
 
Back
Top