Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
C
what does the ^ symbol mean in c language
what does the ^ symbol mean in c language
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
suchithra
New Member
Join Date:
Nov 2015
Posts:
1
#1
what does the ^ symbol mean in c language
Nov 19 '15, 08:05 AM
^ meaning in c language
^ symbol meaning of c language
mbizup
New Member
Join Date:
Jun 2015
Posts:
80
#2
Nov 19 '15, 10:45 AM
It's NOT an exponent, like it is in other languages...
In C, the ^ is "Exclusive OR" (XOR). That means 'either one or the other, but not both'.
In binary,
1 ^ 1 = 0
1 ^ 0 = 1
0 ^ 1 = 1
0 ^ 0 = 0
Bitwise:
00 ^ 00 = 00
00 ^ 01 = 01
00 ^ 11 = 11
01 ^ 01 = 00
01 ^ 00 = 01
11 ^ 00 = 11
11 ^ 01 = 10
etc ...
Last edited by
mbizup
;
Nov 19 '15, 10:53 AM
.
Reason:
Added examples to show bitwise XORs on more digits.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment