C bitwise operators & | ^ tutorial example explained #C #bitwise #operators
Пікірлер: 66
@BroCodez2 жыл бұрын
#include int main() { // BITWISE OPERATORS = special operators used in bit level programming // (knowing binary is important for this topic) // & = AND // | = OR // ^ = XOR // > right shift int x = 6; // 6 = 00000110 int y = 12; // 12 = 00001100 int z = 0; // 0 = 00000000 z = x & y; printf("AND = %d ", z); z = x | y; printf("OR = %d ", z); z = x ^ y; printf("XOR = %d ", z); z = x > 2; printf("SHIFT RIGHT = %d ", z); return 0; }
@namansalgotra6293 Жыл бұрын
What software do you use?
@Abon963 Жыл бұрын
@@namansalgotra6293If you are talking about where he writes the code it’s "Vs code"
@md.lutfullahillabibАй бұрын
where is you "Bitwise Complement Operator (~ tilde) in c" tutorial? @BroCodez
@sevanthishekar43794 ай бұрын
Quick Note: For Shift Left, like Bro mentioned there's a pattern.....every time you shift it, it doubles. Ex: int x = 6; for x
@spacewizerd2 ай бұрын
thats cool thx man
@tomsterbg8130 Жыл бұрын
This was very easy to understand and while being really descriptive, thank you so much for making that video!
@xbaleks4609 Жыл бұрын
better than a course that i bought (74.99$) on udemy... Thank you, very clear and understandable.
@MerrowGula2 ай бұрын
you know that the udemy courses have discounts right ?
@guilhermecampos8313Ай бұрын
Warning: just buy udemy courses when they are on sale. It happens very often (something like every other week).
@guillaumelacroix8730 Жыл бұрын
you are a legend mate! Thank you for this clear explanation!
@RaphamerloКүн бұрын
Thank you. I perfectly understood.
@pemudahijrah24548 ай бұрын
So bassically 12&6 is equal to 6&12 is it?
@Vishnu-wz5ng7 ай бұрын
Yes
@Garrison862 жыл бұрын
Awesome thanks for the demo on bit wise operators, super easy to understand 👍👍👍👍
@arnavtripathiyo5 ай бұрын
Thank you so much very easy to understand because of your video
@CoffeeDump2 ай бұрын
i finally know what this operators means, thanks.
@SuperIL123 ай бұрын
Excellent! Perfect explanation!
@ronalbocher41597 ай бұрын
Thank you so much! Extremely clear, amazing explanations!
@Mathieuny2 ай бұрын
Thanks for the video. Very understandable, good to get me started :)
@ironmonkey1990Ай бұрын
Thank you!
@abdoumourouj65512 күн бұрын
huge respect
@nataaalia7 ай бұрын
Such a good explanation
@antoinebguitar28695 ай бұрын
Oh so those scary looking math equations are actually just logic gates and boolean algebra lol
@Abon963 Жыл бұрын
Thanks!You made it very much easier
@sais6408 ай бұрын
thanks bro code for the helpful tips :) and to everyone have fun programming
@thatonemailbox Жыл бұрын
What kinds of uses do these commands have?
@Abon963 Жыл бұрын
One use is : It can be really fast for calculations
@SoDamnMetal8 ай бұрын
@@Abon963 so, something the compiler would automatically optimize for you?
@Exploshi6 ай бұрын
to quickly find if a number is a power of two you can do "return n>0 and n&(n-1)"
@usurpvision6 ай бұрын
Ok cool thanks my reference book did not explain shifts very well.
@jacksoncobb2860 Жыл бұрын
Super helpful video! Thank you!
@ansoncheng64182 ай бұрын
Thank you for this
@mastersrv4702 жыл бұрын
Thanks bro
@MiyamotoMusashi2383917 күн бұрын
thx buddy
@cd-stephen2 жыл бұрын
Bro!!!!! You are awesome and thank you
@mortenlund141811 ай бұрын
thx and great style
@MonirsOfficial7 ай бұрын
Masterpiece❤
@mahmoudalfawair29672 жыл бұрын
giga big coc chad thx
@MultiDringus Жыл бұрын
bruh
@user-lr9uo7fv8r Жыл бұрын
BIG LIKE!
@Darkin-w7 ай бұрын
Ty :)
@prumchhangsreng9792 жыл бұрын
I'm grateful that I didn't skip binary in high school math class.
@Dexterdevloper5 ай бұрын
Thanks.
@indigo_diary10 ай бұрын
Thank you so much :)
@itsrmbaby6 ай бұрын
شكرا
@Thundergreen-lj2ot2 ай бұрын
Is it just me who noticed the text size change as the first change?
@BARATHBSIT2 жыл бұрын
Your a real programmer 😎
@aymanmouhcine5749 Жыл бұрын
Thank you
@bowa7 ай бұрын
King!
@_4p_ Жыл бұрын
where is ~ (complement operator)
@hemozone9726 Жыл бұрын
thanks man
@Lucky_Wings2 ай бұрын
yeah i completely forgot it
@113_bachtiardanuarta_b2 Жыл бұрын
Simple yet easy to understand
@kevingerges95396 ай бұрын
for xor , 1 OR 1 = 1: If both bits are 1, the result is , how come 1 and 1 is zero
@zakd67682 ай бұрын
X is for exclusive. Think of OR as being ok with AND. 1 OR 1 = 1 1 OR 0 = 1 Because AT LEAST 1 is 1. So OR doesn't mind both being 1. 1 XOR 1 = 0 Because AT MOST should be 1. Break it into human speech and it becomes easier. True is 1 and false is 0 a XOR b = if exclusively one operand is true, return true. Else return false. AND =BOTH OR =AT LEAST 1 XOR =AT MOST 1
@jumbo99961410 ай бұрын
How to shift zero? Let's say x = 11110111 I want 11101111 (shift left) or 11111011 (shift right).
@HARSATHABINAVAG9 ай бұрын
Left mate
@fedorvasilev5883 Жыл бұрын
Why do you use %d ?
@atheist96727 ай бұрын
It is an format specifier it this time you know what is that....I hope you know😅😅😅😅