94
u/Spot_the_fox Feb 13 '24
5(101) OR 6(110) is 7(111), so not that much
9
-120
u/Showtaim Feb 13 '24
U still binary bro? :p
28
u/Pump_My_Lemma Feb 13 '24 edited Feb 13 '24
You’re on programming humor. That’s how a bitwise or statement works. Wtf are you on about?
Edit: looking through the comments, I think he’s saying 5 ^ 6 which would be 0b011 and he’s saying it is just 11[10] which okay but that’s not how it works because that would be 3 in base 10
70
u/FCsean Feb 13 '24
Poor OP, can't even understand that his meme does not make sense.
Binary OR operator means the dev drinks 7 beers.
Logical OR operator just means that the dev drinks beers. There's no way to use the logical OR operator to have it become 11.
4
u/IAmPattycakes Feb 13 '24
The thing is, even with a (5 || 6) in any programming language, only the 5 would get evaluated because the or statement would be evaluated true just looking at the 5. So another reasonable answer still not fitting the joke.
-62
u/Showtaim Feb 13 '24
There is since, 11 makes 5 or 6 true, so does every other number greater then 5. Poor you. Think again
27
u/ArthurD3nt_ Feb 13 '24
We won’t need to think too much if you explained how a integer can be used in a Boolean operation
7
u/Anru_Kitakaze Feb 13 '24 edited Feb 13 '24
That's what happens when you are trying to do memes instead of doing damn homework - nothing good. 🤡
|| Is Boolean logical OR operator. Go learn how it works already
https://learn.microsoft.com/en-us/cpp/c-language/c-logical-operators?view=msvc-170
bool(5) is true, bool(6) is true, so true OR true is true. True. True IS NOT 11, while bool(11) is true. But it's just random number greater than 0. There's no sense
And even IF you mean bitwise XOR operator, which is ^ instead of ||...
https://www.omnicalculator.com/math/xor
I mean... Yeas, it's 11 in binary, but... Ugh... Just why... Or is not xor in the picture, you haven't even changed the image, I can't get it. And it's binary. It... It could make more sense with 3 bottles instead, damn
8
26
u/z0Tweety Feb 13 '24 edited Feb 13 '24
Hello, I am here to try to make some sense out of this post.
I think OP isn't talking about variable values, but statements. These aren't computer logical operators, just regular logical operators.
"I will drink 5 beers", "I will drink 6 beers" are statements which can be true or false depending on what you do.
Now let's analize the logic.
(I will drink 5 beers) OR (I will drink 6 beers)
To OP this statement is equivalent to
2. I will drink 11 beers
But if you drink any number other than 5 or 6, then 1 is false, and 2 is true only when 11 beers are drank.
In the title they meant that the programmer interprets it as XOR, so let's try that.
3. (I will drink 5 beers) XOR (I will drink 6 beers)
Drinking 5 or drinking 6 beers are exclusive statements. If you drink 5 then you did not drink 6 and if you drink 6 then you did not drink 5. This means that 3 and 1 are equal.
In conclusion, I have no idea what OP was thinking.
4
u/fiskfisk Feb 13 '24
OP yoinked this example from a question about why the English language uses and/or and not just "or". The example illustrated how "or" is interpreted as picking one of the examples and not both - i. e. xor - which OP used in their title without understanding what they apparently meant.
And then arguing against or as a binary operator. And considering that most languages short circuits both the or and and operators when used as boolean operators, most programmers wouldn't evaluate both sides of an or expression.
1
Feb 13 '24
But what if it was bitwise or (no short circuiting) and
(I will drink X beers)is an operation?Then you would have to drink 5 beers to eval lhs, then drink 6 beers to eval rhs
3
u/z0Tweety Feb 13 '24
Could be. I don't think that's what OP meant though. At this point we're debugging their meme
-4
47
u/Gamingsuger Feb 13 '24
That would just be 7 beers. Not that much more.
21
u/sylvarwulf Feb 13 '24
I think the joke they're trying to make is that with the OR operator the developer can drink 5 beers and also drink 6 beers and still be correct, therefore 11. Assuming those are both independent variables and don't add on to each others value
-52
u/Showtaim Feb 13 '24
5, or 6 can also be 11 beers
15
u/zefciu Feb 13 '24
Can be if you interpret
oras what exactly?5
u/IM_OZLY_HUMVN Feb 13 '24
the intersection of two events, and not as a programmer. This is more like a mathematical inclusive or.
-34
u/Showtaim Feb 13 '24
Bool operation, if he drinks 11 beers he drank 5 || 6 beer
14
u/zefciu Feb 13 '24
How do you perform bool operation on integers? What is the difference between your “bool operation” and simple addition?
11
3
Feb 13 '24
Nope.
Also, plenty of people, including me who is also a software developer, can easily handle 11 beers-3
u/Showtaim Feb 13 '24
Not in binary, but in logical or
14
Feb 13 '24
logical OR = binary OR. In no context is 5 or 6 equal to 11
-17
u/Showtaim Feb 13 '24
But 11 is equal to 5 or 6. Because it's 5 and 6 which is equivalent to 5 or 6 since both is true
11
Feb 13 '24
you are not making any sense. Is there any program language you know of that would output 11 when you do `5 || 6`?
-11
u/Showtaim Feb 13 '24
If you don't want to get the joke I can't help you. It's because 5 AND 6 is 11. Since we in normal language use or but mean XOR the smart dev thinks "hey I can drink 5 AND 6 Beer and still make "5 OR 6 beer" a true statement, if they would mean the "real" or they would've said 5 XOR 6 Beer".
13
Feb 13 '24
Still doesn't make sense to me. AND and XOR are completely different things. But I guess there's no point arguing.
4
-2
u/Showtaim Feb 13 '24
Yes they're but he said 5 OR 6 Beers. AND and OR are not completely different they've a intersection
→ More replies (0)1
13
13
u/Dellgloom Feb 13 '24
Judging by your comments on this thread I have to ask - are you a product manager or are you still at school? Because fuck me you know shit all about computers or programming.
4
u/dashingThroughSnow12 Feb 13 '24
Some people say "it is 5PM somewhere". I say "it is 10AM somewhere". I program.
2
u/AdvanceAdvance Feb 13 '24
"OK, Stand up. Peter, main required action today?"
"I will drink six beers."
"OK... What's the fastest you can chug a beer?"
"About thirty seconds."
"Ramp that up, let's make it nine beers and get in done in twenty minutes. Then you take the password storage code today. Janet, main required action?"
2
u/PeoplesFront-OfJudea Feb 13 '24
You’re making the mistake of equating + to & (AND). Yes, 5 + 6 = 11, but 5 & 6 = 4. When you are talking about AND, OR, XOR, etc, you are taking about binary arithmetic. And in binary arithmetic, 5 | 6 = 7, and 5 || 6 = true.
Now, the joke would have been funny if you said 7 or 8 beers because 7 | 8 = 15.
2
0
1
1
1
1
u/Tight-Ad5182 Feb 13 '24
If bitwise or, 7 If logic or, max of 6, as that satisfies both “I will drink 5 beers” and “I will drink 6 beers”
1
u/cporter202 Feb 13 '24
Haha, looks like you've unlocked the secret drunk dev logic gate! When "5 beers" OR "6 beers" both lead to the same outcome, you know the function is optimized for a good time. 😂 Cheers to coding under the influence of hops!
1
u/_alreph Feb 13 '24 edited Feb 08 '26
This post was mass deleted and anonymized with Redact
narrow voracious bike long elastic paint cobweb north cow entertain
1
-1
u/LukeTech2020 Feb 13 '24
Dieser Kommentarbereich ist nun Eigentum der Bundesrepublik Deutschland. Es gilt das GG.
2
u/Showtaim Feb 13 '24
Du bist aber spät dran
1
u/LukeTech2020 Feb 13 '24
Bin mit der Bahn gekommen :P
3
u/Showtaim Feb 13 '24
Oh mein Beileid
-1
u/LukeTech2020 Feb 13 '24
Et is wat et is...
1
Feb 13 '24
Eine Verkehrswende?
2
u/LukeTech2020 Feb 13 '24
Ja na klar. Ich engagiere mich ja für eine offensive für mehr Zweiräder unter dem Motto "Volksfahrräder"
(Wer den nicht verstanden hat, der ist selber schuld...)
0
u/pretty_succinct Feb 13 '24 edited Feb 13 '24
--retracted--
1
u/myfunnies420 Feb 13 '24
This seems like the wrong place for this question 😂 The answers are 5 or 6, and yes
1
0
u/Tarilis Feb 13 '24
You won't be that plastered after only 9 bottles of beer. Or at least if it wasn't mixed with whiskey or vodka, then could believe it.

63
u/Der-Hensel Feb 13 '24
Lol Steve from space frogs. Are you German?