Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Variable Inverse In C language

Status
Not open for further replies.

prafiee

Newbie level 5
Joined
Feb 10, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,331
How can I inverse a variable in C language for using in AVR Microcontroller? In other words, consider I have a variable as: a = 0b01011010, I want to inverse this variable and in save it as: b = 0b01011010; that is, msb of variable a now rolles as lsb of variable b and vice versa.
I would be appreciated of your attention.
 

if you use this sign " ~ " variable inverse.
for example : a = ~0b01011010 is equal to a=0b10100101
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top