Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
xor
- Page 1
Re: XOR Swap still viable algorithm?
Programming
Software Development
17 Years Ago
by mcldev
XOR
is a assembler command. So... it executes very fast. Inside … operations on the processor which are generally more expensive than
XOR
operations. But here's the deal by the time you… program in C++ using
XOR
is not recommended unless you are performing special bitwise operations…
Re: xor linked list
Programming
Software Development
17 Years Ago
by phoenixlsk
…are a curious use of the bitwise exclusive disjunction (
XOR
) operation, here denoted by ⊕, to decrease storage requirements… –> next –> next –> next –> An
XOR
linked list compresses the same information into one address field… by storing the bitwise
XOR
of the address for previous and the address…
Re: xor
Programming
Web Development
12 Years Ago
by cereal
…php $a = true; $b = true; $c = false; echo ($a
xor
$b) ? 'true':'false'; # output: false because $a and $b are… both true echo ($a
xor
$c) ? 'true':'false'; # output: true because $a is…can be written also like this: <?php if($a
xor
$b) { echo 'true'; } else { echo 'false'; } ?&…
XOR HELP
Programming
Software Development
14 Years Ago
by jamesbondbest
HERE IS SIMPLE
XOR
PROGRAM WHEN I TRY TO COMPARE TWO SAME STRINGS ENCRYPTED …
Re: XOR HELP
Programming
Software Development
14 Years Ago
by tux4life
… useful anyway. [B]**[/B] - [ICODE][I]nul-byte[/I] [B]
XOR
[/B] [I]character of encryption key[/I][/ICODE] will reveal…
xor
Programming
Web Development
12 Years Ago
by arcticM
so i checkied how to swap 2 variables without a 3rd one and I found this solution - $x ^= $y ^= $x ^= $y; but I don't understand what the
xor
(^) does! never used it before and php.net has some strange examples I don't get.. can someone explain to me what is this thing and how it works?
Re: xor
Programming
Web Development
12 Years Ago
by diafol
Example If you have two variables ($a and $b), which for the sake of argument can each be true or false. Logical operators AND / OR will return TRUE if: AND: ONLY when $a AND $b are both true OR: When either $a OR $b is true OR when both are true
XOR
: Only when either $a OR $b is true BUT NOT when both are true
Re: xor
Programming
Web Development
12 Years Ago
by diafol
You need to look at binary: 12 = 1100 9 = 1001 **
XOR
** The exclusive either/or bits here: 0101 The 1000 isn't as it's common to both numbers 101 binary = 5 in decimal
XOR Swap still viable algorithm?
Programming
Software Development
17 Years Ago
by ShawnCplus
…supposedly faster but the shear coolness of an
XOR
swap makes it more attractive to me.…? For anyone that doesn't know what an
XOR
swap is here goes [code=c++] int first…;\nSecond: "<< second << endl; //
XOR
Swap first ^= sec; sec ^= fir; fir ^= sec; //…array [code=c++] cout<<"
XOR
Swap"<< endl; cout<<…
Re: XOR encryption newbie
Programming
Software Development
15 Years Ago
by tux4life
…you apply this approach to bits (that is: apply
XOR
bitwise): Say, you have two bytes which respectively look…the whole thing by exactly doing the same: (bitwise)
XOR
both, the encrypted data and the encryption key together,… data[/I]) 00001101 ([I]encryption key[/I]) -------- ([B]
XOR
[/B]) 10110111 ([I]decrypted data, original data[/I])[/CODE] So…
XOR Encryption problem
Programming
Software Development
14 Years Ago
by Ricky65
…going wrong. Advice appreciated. Ricky My code: [CODE]//
XOR
Encryption #include <stdio.h> #include &…lt;string.h> //
XOR
Encryption key char XORkey [] = "simples"; void…char output[] = "C:\\test_encrypted.txt"; //
XOR
data and write it to file XOR_encrypt(input, output, …
Re: XOR Swap still viable algorithm?
Programming
Software Development
14 Years Ago
by arkoenig
… operations on the processor which are generally more expensive than
XOR
operations. [/QUOTE] Really? Why do you think so? …one fetch and one store. An
XOR
requires two fetches, one store, and the
XOR
operation itself. So why do …you think that three
XOR
operations would be faster than…
XOR encoder
Programming
Software Development
13 Years Ago
by chubakueno
… "An error happened";} } file.close(); } int
xor
(int a, int b)// I know about the ^ operator,… is only for learning purposes { _asm{ mov eax,a
xor
eax,b } } char* encode_file(char * memblock, char * …(i=0; i < size; i++){ *(encoded_char+i) =
xor
(*(memblock+i),*((key+i%strlen(key)))); } return encoded_char; } int main…
Re: xor linked list
Programming
Software Development
17 Years Ago
by Ptolemy
… advantage of the butterfly effect using
XOR
. If you take the
XOR
of two values and
XOR
it with either value, you get… the other value: [code] 123
XOR
456 = 435 (butterfly radix) 435
XOR
123 = 456 435
XOR
456 = 123 [/code] They're obscure…
XOR binary addition
Programming
Software Development
12 Years Ago
by somjit{}
i was searching for a code to perform binary
XOR
addition. Exams coming up, and needed to a quick…ip_base); result=decNum1^decNum2; // dec equivalent of
XOR
addition printf("\n
xor
output:\n\n "); for(i;i<…, Info & Coding theory more generally refers binary
XOR
as "modulo-2 addition". :)
Re: XOR Swap still viable algorithm?
Programming
Software Development
17 Years Ago
by vijayan121
the
xor
swap algorithm fails if you try to swap a variable …
Re: XOR Swap still viable algorithm?
Programming
Software Development
14 Years Ago
by 0dark
As said before
XoR
fails if you try to swap a variable with itself. Not only that but it also fails if you try to swap variables with the same value. Try it and you'll see. I personally use std:: Swap(a,b) even though I think it's slower.. Sorry, didn't read the rules before posting. u.u
Re: XOR Gate - Digital Design
Programming
Computer Science
14 Years Ago
by emilo35
…) * D) + (B(not) * C * D) a complete
XOR
gate. In that case, it would be some kind of… incomplete, inverted
XOR
gate that I've never heard of, so …. However, I have some guidelines for you:
XOR
means exclusive OR, which in turn means that …case is if you would like an ordinary
XOR
gate with the ability to enable/disable output …
XOR Equation Expansion
Programming
Software Development
15 Years Ago
by einjelle
… included in our specifications that the user could also input
XOR
operations, which my parser couldn't handle. So now,… I am looking for existing codes in expanding
XOR
equations so that the expanded equation would just be the… be substituted and processed by the parser. like this one: /*
XOR
= & */ (A&(B&C)) = ABC + A'B…
XOR without declared variables
Programming
Software Development
14 Years Ago
by p@rse
… and finally figured out how bit-level works when using
XOR
, but most of the time, the vars were already declared… key I am stuck. But see when I want to
XOR
pass ^ key I want the key to know the pass…(pass) << endl; chLen = strlen(pass); //Count strlen for
XOR
encryption cout << " # of Integers: " <<…
XOR Gate - Digital Design
Programming
Computer Science
14 Years Ago
by speedy94519
I have a reduced function and one of the product terms is: B * C(not) * D + B(not) * C * D. Is that considered an
XOR
gate? Im aware that B * C(not) + B (not) + C is an
XOR
gate because When i do the truth table it has the characteristic of an
XOR
gate, but Im not sure about that terms above. Thank you
XOR linked list
Programming
Software Development
12 Years Ago
by shanki himanshu
Since in
XOR
linked list current pointer store the
XOR
of addresses of previous and next node. my question is how do we
XOR
two pointers?
Re: XOR Gate - Digital Design
Programming
Computer Science
14 Years Ago
by emilo35
If i'm not mistaken, (B * C(not) * D) + (B(not) * C * D) can be rewritten as (B
XOR
C) * D I'm not sure if this is what you're after. But if I were to construct a triple gate
XOR
, I think it would look like this: (B(not) * C(not) * D) + (B(not) * C * D(not)) + (B * C(not) * D(not)) Good luck to you! Emil Olofsson
Re: XOR Encryption
Programming
Software Development
13 Years Ago
by doug65536
… the key. You take those extremely random numbers and
xor
them with the data, giving you seemingly completely random …seed (key), and do the
xor
operation again on the encrypted data. Doing an
xor
again on the encrypted data with… the same number will undo the original
xor
(that you did when encrypting) into the original data.…
Xor Logical Operator in C++
Programming
Software Development
15 Years Ago
by n.utiu
WE have the && operator, the || operator, but
xor
is only implemented as '^' . And this causes a lot of confusion. Let's take this case: 2 == 2 ^ 2 generates a logical operation instead of bitwise operation , therefore returning a true value. What do yo think: Should the C++ standard have a
xor
logical operator? Why ?
Re: Xor Logical Operator in C++
Programming
Software Development
15 Years Ago
by mrnutty
…;1163467]WE have the && operator, the || operator, but
xor
is only implemented as '^' . And this causes a lot of…. What do yo think: Should the C++ standard have a
xor
logical operator? Why ?[/QUOTE] Usually, noobs have problems with this…
Re: Xor Logical Operator in C++
Programming
Software Development
15 Years Ago
by Banfa
I have been programming for 20 years and I can say I've missed the absence of a Logical
XOR
operator where as I know for a fact I would miss the absence of a Bitwise
XOR
operator.
Re: XOR Gate - Digital Design
Programming
Computer Science
14 Years Ago
by speedy94519
yeah thats what I was after. SO, (B * C(not) * D) + (B(not) * C * D) , is considered an
XOR
type gate correct?
Re: XOR Gate - Digital Design
Programming
Computer Science
14 Years Ago
by Haneen Dweikat
hey ... it's D*(B
XOR
C )
Re: XOR linked list
Programming
Software Development
12 Years Ago
by nmaillet
The `^` is used for
XOR
operations; see [Boolean Operations](http://www.cplusplus.com/doc/boolean/).
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC