Define one's complement operator, C/C++ Programming

Assignment Help:

Define One's Complement Operator?

The one's complement operator, occasionally called the "bitwise NOT" or "bitwise complement" operator produces the bitwise one's complement of its operand. The operand should be of integral type. This operator performs common arithmetic conversions the result has the type of the operand after conversion.

x

~x

0

1

0

0

In the following instance the new value assigned to y is the one's complement of the original unsigned short value:

// Example of the one's complement operator

unsigned short y = 0xAAAA;  // value of y is 0xAAAA

y = ~y;                     // value of y is 0x5555


Related Discussions:- Define one's complement operator

What is virtual class and friend class, Friend classes are used when two or...

Friend classes are used when two or more classes are designed to work together and require access to each other's execution in ways that the rest of the world shouldn't be permitte

Displays the lower case and upper case alphabetical letters, Write a progra...

Write a program that displays both the lower case and upper case alphabetical letters using the following Format Lowercase        Uppercase a                        A

Compiler design limiting instruction, Ravi is a newbie to the programming a...

Ravi is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''''{'''' and end with ''''}

CarDealership, ABC Car Dealership needs your help to update the ordering sy...

ABC Car Dealership needs your help to update the ordering system. This car dealer is selling four types of vehicles: Sedan, Truck, SUV, and mini Van. And each type of vehicle can h

Simple program of c++ , Simple program of c++: int main() {    i...

Simple program of c++: int main() {    int   bushels;    float dollars, rate;                 cout                 cin >> dollars;                 cout

Explain the defination and declaration of union, Explain the Defination and...

Explain the Defination and Declaration of Union? Generally in terms the composition of a union may be defined as be as union tag { member 1; member 2; member m; }; Wh

First line starts with T, Byteland county is very famous for luminous jewe...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

What happens if you make call "delete this;"?, The code contains two built-...

The code contains two built-in pitfalls. First one, if it executes in a member function for an static, extern or automatic object, the program will possibly crash as soon as the de

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