Bits and Bytes in C:

  1. Bit:

  2. Byte:

  3. Size of Data Types (in bytes):

    Use sizeof() to determine the size of any data type in your system:

    printf("Size of int: %lu bytes\\\\n", sizeof(int));
    
    
  4. How Data is Stored in Memory:

  5. Endianness:

    Example:

    int num = 0x12345678;
    
    
  6. Bitwise Operations in C:

    Example:

    int x = 5;  // 00000101 in binary
    int y = x << 1;  // Left shift: 00001010 (5 * 2 = 10)
    
    
  7. Bit Masking: