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

Gui status in a program from the object browser, Can we create a gui status...

Can we create a gui status in a program from the object browser? Yes.  You can make a GUI STATUS in a program using SET PF-STATUS.

Name the numerous household devices, Name the Numerous household devices ...

Name the Numerous household devices Numerous household devices now use microprocessors to control their different functions. The following is just a sample of common devices (d

What are condition codes, What are condition codes? In many processors,...

What are condition codes? In many processors, the condition code flags are kept in the processor status register. They are either set are cleared by lots of instructions, so th

Explain about cd-rom and dvd-rom, Q. Explain about CD-ROM and DVD-ROM? ...

Q. Explain about CD-ROM and DVD-ROM? Optical disks employ Laser Disk Technology that is the latest and most promising technology for high capacity secondary storage. Advent of

Automated injection, There are tools to automate the process of SQL Injecti...

There are tools to automate the process of SQL Injection into login and other fields. One hacker process, using a one tool, will be to search out a number of weak targets using Goo

Illustrate tcp - ip networking model, Q. Illustrate TCP - IP Networking Mod...

Q. Illustrate TCP - IP Networking Model? TCP/IP is an acronym for Transmission Control Protocol / Internet Protocol. It is a collection of applications, protocols and services.

Explain about truth table and logic diagram, Q. Explain about truth table a...

Q. Explain about truth table and logic diagram? A Boolean function can be realized in a logic circuit employing the basic gates: - AND, OR & NOT. Concern here for illustration

DATA DICTIONARY, DATA DICTIONARY ON ONLINE QUIZ SYSTEM

DATA DICTIONARY ON ONLINE QUIZ SYSTEM

Show the ranges of port numbers, Q. Show the ranges of Port numbers? P...

Q. Show the ranges of Port numbers? Port numbers are divided into three ranges: Well-known ports are those from 0 through 1,023. Registered ports are those from

Microprocesseor, In8085 are of the following statements is not true.A) Co-p...

In8085 are of the following statements is not true.A) Co-processor is interfaced in max mode. B) Co-processor is interfaced in MIN mode C )Co-processor is interfaced in max/min mod

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