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

Find point-to-point link required in fully connected network, The number of...

The number of point to point links required in a fully connected network for 50 entities is? The number of point to point links needed in a completely connected network for 50

What is sap locking, What is SAP locking? It is a mechanism for describ...

What is SAP locking? It is a mechanism for describing and applying logical locks to database objects.

What is structured programming, What is structured programming? Structu...

What is structured programming? Structured Programming: means the collection of principles and practices that are directed toward developing right programs which are simple to

Interrupt signal interconnection network (isin), Interrupt Signal Interconn...

Interrupt Signal Interconnection Network (ISIN) When a processor needs to send an interruption to another processor, then this interrupt initial goes to ISIN, through which it

Select-options and parameters statement , The fields specified by select-op...

The fields specified by select-options and parameters statement cannot be grouped together in the selection screen. No, the fields specified by select-options and parameters s

How can i delete a file, The Standard C Library function is removing. (This...

The Standard C Library function is removing. (This is thus one of the few questions in this section for which the answer is not ''It's system-dependent.'') On older, pre-ANSI Unix

Explain ai applications, AI Applications Search is a important elemen...

AI Applications Search is a important element of an AI system, and search functions are executed on huge quantities of complicated structured data by means of unstructured in

Example of variables and quantifiers - first-order logic, Example of Variab...

Example of Variables and quantifiers: We should have started with something such which reflects the fact that we're really talking for some meal at the Red Lion, neverthe

Benefits of having densely packed integrated circuits, What are benefits of...

What are benefits of having densely packed Integrated Circuits? These are stated below: Reliability: The integrated circuit interconnections are in fact more reliable

Assembly language programes, Program to calculate the value of the series 1...

Program to calculate the value of the series 1+x+x2+x3+.... +xn. Read the values of ''x'' and ''n'' from the keyboard.

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