Sunday, 16 November 2014

Bit Wise Operations

17:46

Object Oriented Programming
Lab Report
Bit Wise Functions:
Left Shift
            Left Shift makes the number to shift towards left. This sequence is used in Binary Number system and conversion is done in binary number system. Considering an example will help to understand it properly.
e.g.
·         An 8 bit number (10010101) in Base 2.
·         Make 3 left shift of the red number 1
Solution:
            Hence by left shifting it we will get a number
                        (10101000) in Base 2

Right Shift
            Right Shift makes the number to shift towards right. This sequence is used in Binary Number system and conversion is done in binary number system. Considering an example will help to understand it properly.
e.g.
·         An 8 bit number (10010101) in Base 2.
·         Make 3 right shift of the red number 1
Solution:
            Hence by right shifting it we will get a number
                        (00010010) in Base 2
Logical Operators
        I.            AND
      II.            OR
   III.            NOT
    IV.            XOR
Symbols Notation and Operations for Logical Operators:

     I.        AND     &       Multiplication         (A&B)
   II.        OR      |        Addition       (A|B)
 III.        NOT    ~       Inverter        (A~)
  IV.        XOR    ^        A`B +AB`      (A^B)





Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 All in One. All rights resevered. Designed by Templateism

Back To Top