I'm not sure if this would go into the windows board or the general board, but anyways... Why in the world is there a '|' symbol when it's identicle to '+'?
Printable View
I'm not sure if this would go into the windows board or the general board, but anyways... Why in the world is there a '|' symbol when it's identicle to '+'?
they don't look identical to me. one is a long narrow beam, and the other is a small cross. very clear difference.
what?! it's a joke... about the symbols '|' and '+'... look at them as a symbol, they are not identical. i have -no- clue as to what you're talking about brewbuck.
Pointless topic, no? So what's the punchline?
Bam! :-dQuote:
Pointless topic, no? So what's the punchline?
Cha-Ching!
(lol damn it, why doesn't ctrl+c work on these forums? i always have to right-click-copy)
brewbuck, i was the one that was joking, not him.
>> I was assuming the person actually meant something serious by the question.
I did.
>> i think it's time for me to go home, finally off work! wooo~! this thread should just be deleted, lol.
Actually, you should deleted.
Also, I notied there is another duplicate: '&~' = '-'
yarin, my best guess, there are two sets of symbols for instructions to manipulate information, those used in the decimal system through out history in mathematics, and those designed to mimic logic gates in math/engineering.
it doesn't have to do with the fact that they overlooked duplicates or anything.
you'll find an equivalent logical operation for a whole lot of things.
They don't do the same thing, so they aren't duplicates.
Okay, I know quite well what '+' & '-' do. So please enlighten me on what '|' & '&~' do. :)
Ah ha! Simple's an editor. :devil:
>> http://www.eskimo.com/~scs/cclass/int/sx4ab.html
Ohh, sting... So how come when I replace all my narrow beams with pluses, everything still works the same?
BTW: Nevermind my last say, and good link, thanks.
Try replacing your "pluses" with "narrow beams". :rolleyes:
:rolleyes:Code:#include <stdio.h>
int main(void)
{
printf("2 + 2 = %d\n", 2 + 2);
return 0;
}
You're annoying me just fyi.
Code:#include <iostream>
int main()
{
std::cout << "5 + 7 = " << (5+7) << "\n\n";
std::cout << "5 | 7 = " << (5|7) << "\n\n";
std::cout << "5 - 7 = " << (5-7) << "\n\n";
std::cout << "5 &~ 7 = " << (5&~7) << "\n\n";
}
>> You're annoying me just fyi.
<homer>Woo Hoo!!!</homer>
lol, oh damn, i wanted to know what the technical term for the '|' was, and when I typed it in to google, the page went blank!?! ...gah, it won't return any results at all.
I guess it's a 'bar'... ?
my friend says 'pipe', cool. alright.
I believe the technical name is "vertical bar".
Pipe is what it's used for when chaining commands together in a shell/command prompt, e.g. find -name "*.c"|xargs grep printf|wc -l, which will show how many lines of "printf" there are in the .c files recursively the current directory.
--
Mats
See Wikipedia for the name:
I use vertical bar, and I'll understand you if you said pipe. (I'd give you odd looks for "Sheffer stroke" though.) "vertical bar" would probably be the most understood.Quote:
The name of the character (|) is the Sheffer stroke, though often referred to as a pipe (by the Unix community) and Vertical bar, verti-bar, vertical line or divider line by others.
Broken bar (¦) is a separate character.
Although if you're dealing with code, you might want to use the name of the operation (binary OR) and not "vertical bar".
Having just taken a Unix Programming course and learned how cool pipes are, I now refer to it as a pipe, even though it's not.
One is a addition operator and one is a bitwise or operator, quite different by any opinion.
Heh. Not a very good title for a thread eh?
I've also noticed that '*' = '+', lol
for example
yet, if I replace + with *,Code:2 + 2 = 4
OMG!Code:2 * 2 = 4
</sarcasm>
bitwise operators == logical operators which are the fundamental bases to mathematical operations (in computing)!
| = OR
& = AND
! = NOT
^ = XOR
They can be mixed and mingled to create all operations in mathematics, and physically* are. If you learn some engineering you'll see all mathematics, multiplication, division, etc etc are logical operations!
examples:
T | F = T
T & F = F
!T = F
T ^ F = T
(you can substitute T = 1, and F = 0)
http://en.wikipedia.org/wiki/AND
http://en.wikipedia.org/wiki/OR
http://en.wikipedia.org/wiki/XOR
http://en.wikipedia.org/wiki/NOT_gate
there's more, like NAND and such... which -all- can be mimic'd with c++ operators, and all can perform multiplication and all other mathematical operations.
while they themselves are -not- identical, they can perform identical functions. and do. there *really* is no such thing as '+' (plus) or '-' (minus), or any other of the 'higher level operations'.... go ahead and research it.
http://books.google.com/books?id=kGu...foqMCjepD-QgPM
happy now?
Yes!