Breaking

सोमवार, 13 अप्रैल 2020

BCA 2nd Sem Notes- Masks

  • UNIT-I (Array)
Definition
Declaration & initialization of 1D 
Accessing array elements
Displaying array elements
Sorting arrays
Arrays and function
Declaration & initialization of 1D
Accessing and Displaying
Memory representation of array [Row Major, Column Major]
Multidimensional array






  • UNIT-II (Pointers)
  • Definition
    Declaration & initialization
    Indirection operator
    address of operator
    pointer arithmetic
    dynamic memory allocation
    arrays and pointers
    function and pointers






  • UNIT-III (Strings)

  • strlen(),strcpy(),strcat() ,strcmp()

  • UNIT-IV (Structures)
  • Definition

  • UNIT-V                                  (C Preprocessor)


  • UNIT-VI                                (File Handling)

  • Masks



    Masking is the process or operation to set the bit on to off or off to on in a byte, nibble or word.

    1. Mask means to block.
    2. Masking is the process by which, only required data is retained and the rest is masked (blocked)
    3. Masking can be done using Bitwise Operators
    4. Most Commonly Used Bitwise Operator is AND(&)

    A mask defines which bits you want to keep, and which bits you want to clear.
    Masking is the act of applying a mask to a value. This is accomplished by doing:
    • Bitwise ANDing in order to extract a subset of the bits in the value
    • Bitwise ORing in order to set a subset of the bits in the value
    • Bitwise XORing in order to toggle a subset of the bits in the value
    Below is an example of extracting a subset of the bits in the value:
    1. Mask: 00001111b
    2. Value: 01010101b
    Applying the mask to the value means that we want to clear the first (higher) 4 bits, and keep the last (lower) 4 bits. Thus we have extracted the lower 4 bits. The result is:
    1. Mask: 00001111b
    2. Value: 01010101b
    3. Result: 00000101b


    कोई टिप्पणी नहीं:

    एक टिप्पणी भेजें