| | | | <- prev | |

Bits and Bytes

  • Smallest directly accessible datum is the byte
  • Byte = 8 bits
  • Byte range of values:
    • 00000000 … 11111111 (base 2 binary)
    • 000 … 377 (base 8 octal)
    • 0 … 255 (base 10 decimal)
    • 00 … FF (base 16 hexadecimal)
  • Byte also size of ascii char
  • C and C++ provide access to individual bits via bit operations
  • Use these bit operations to manipulate individual bits
  • C++, but not C, provides a way to descend to the bit level inside a class implementation while remaining at a more abstract level for applications: the class

<- prev | | Top of Page | 2. A BitVector Class - 1 of 10