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

Differentiate between exception and validation testing, Differentiate betwe...

Differentiate between exception and validation testing. - Validation testing is done to test the software in conformance to the needs specified. It aims to demonstrate that the

Discuss about fourth generation electronic computers, Fourth Generation (19...

Fourth Generation (1972-1984) The next generation of computer systems used the large scale integration (LSI -1000 devices per chip) and very large scale integration (VLSI - 100

How do you track down a transition by name, Question 1: a) How do you ...

Question 1: a) How do you track down a transition by name? b) Why Premiere Pro is considered a non-linear editor? c) Explain clearly the main problem that may arise wh

What do you mean by parallel virtual machine, Q.What do you mean by Paralle...

Q.What do you mean by Parallel virtual machine? PVM is essentially a simulation of a computer machine running parallel programs. It is a software package which allows a heterog

Differences b/w user level and kernel supported threads, What are the diffe...

What are the differences between user level threads and kernel supported threads? A thread, sometimes termed a lightweight process (LWP), is a fundamental unit of CPU utilizati

Describe the structure and function of a computer system, Question: a) ...

Question: a) Describe the structure and function of a computer system. b) The raw speed of a microprocessor will not achieve its potential unless a constant stream of wor

How many input ANDand OR gates are required, How many two input AND gates a...

How many two input AND gates and two input OR gates are required to realize Y = BD+CE+AB ? Ans. Here three product terms, therefore three AND gates of two inputs are needed.

Explain about batch system, Q. Explain about Batch System? A number...

Q. Explain about Batch System? A number of computer systems only did one thing at a time. They had a list of computer system can be dedicated to a single program till its c

Payroll pc, Purpose: Payroll processing and storage for the client database...

Purpose: Payroll processing and storage for the client database (accessed from the Reception-PCover the network),word processing (reports etc.) and spreadsheets. Software: . • W

Why wap gateways are used, Why WAP gateways are used? The Wireless Appl...

Why WAP gateways are used? The Wireless Application Protocol Gateway is a very unique product giving semi -automatic redirection of HTML documents to WAP compatible mobile phon

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