Tech/Basics/Binary

From lathama
< Tech‎ | Basics
Jump to navigation Jump to search

Convert to Binary

To convert to binary, subtract the largest 2^N bit size from you range and repeat marking 1 for numbers you can subtract. For 8 bits here is an example.

234
  1. 1(128)
  2. 1(64)
  3. 1(32)
  4. 0(16)
  5. 1(8)
  6. 0(4)
  7. 1(2)
  8. 0(1)
Leaves us with 11101010 for 234