Explain bitwise left shift and right shift operators, Computer Engineering

Assignment Help:

Bitwise Left Shift and Right Shift Operators: <<, >>

shift-expression :

additive-expression

shift-expression << additive-expression shift-expression >> additive-expression

The bitwise shift operators shift their first operand left (<<) or right (>>) by the number of positions the second operand specifies.

Example

In the following example, the right shift operator moves the data bits two positions to the right, thus changing the value of nNumA:

// Example of the bitwise right shift operator

int nNumA=8;   // beginning value is 8

nNumA >> 2;    // ending value is 2

 


Related Discussions:- Explain bitwise left shift and right shift operators

Briefly define the term isotype, Question: (a) (i) Briefly define the t...

Question: (a) (i) Briefly define the term "Isotype". (ii) With the help of diagrams, describe the rules of "Isotype". (b) Elaborate on your understanding of internationa

Unity - variety - principles of composition, Unity / variety Unity is ...

Unity / variety Unity is created by the use of elements that look like they belong together, in other words the piece will have a feeling of internal  consistency. The most

Explain the storage class extern, Explain The Storage Class extern The...

Explain The Storage Class extern The Storage Class extern : One method of transmitting information across blocks and functions is to use external variables. When a variable is

Show data representation for computation, Binary codes exist for any fundam...

Binary codes exist for any fundamental representation. Binary codes can be created for any set of discrete elements for example colors, spectrum, musical notes, chessboard position

what respects the advance builds, Describe your choice specifically and fu...

Describe your choice specifically and fully, explaining and discussing at length in what respects the advance builds upon or departs from present technology or practice and the sev

Explain the pdca cycle, Explain the PDCA cycle. PDCA is a four step pro...

Explain the PDCA cycle. PDCA is a four step problem solving method. The following are the description of each step: 1. P - Plan (Devise your Plan). Identify an opportunity a

What is the meaning of aliasing, a. What is the meaning of aliasing? What a...

a. What is the meaning of aliasing? What are its drawbacks? Describe a method to remove aliasing, using post filtering. b. How can you copy a Pixmap from one place to another

How to call a wml script from a wml page, WML & WML Script 1. How to ca...

WML & WML Script 1. How to call a WML Script from a WML Page? 2. Write a brief note on WML Script Operators and Expressions. 3. Write brief notes on WML Script Statements

Scanning tips, Don't scan at more resolution than needed. This saves both D...

Don't scan at more resolution than needed. This saves both Disk and time Space. Typically itisn't useful to scan at more than optical resolution because it adds no new informa

Determine the method for updating the main memory, The method for updating ...

The method for updating the main memory as soon as a word is removed from the Cache is known as  (A) Write-through                  (B) write-back   (C) protected write

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd