Bro thank you so much! I passed computer networking exam recently and got the highest mark among all classmates. Your "computer networks" course is the best
A positive equivalent number of complement output can also be arrived at using two's compliment. 2~ = 1~ + 1 11 = 1011 therefor: 1~ of 11 = 0100 2~ = 0100 + 1 2~ = 0101 Therefor: bin(0101) = 5 computer by default don't store negative number so it will convert negative number into positive number using two compliment. Hope this helped too!
Sir, please upload ppts of Computer Organization and Architecture course. For the past year, students have been asking to upload but to no avail. Please do it as early as possible, sir. Thank you.
When I try to print ~10 in binary format, it's results -0b1011. This gives 5 in decimal. But instead of printing binary format but using print function it results -11. Please clear this.
I'm assuming that you are referring to the value in minute 6:00 now assuming a 4-bit signed integer (because signed integers can represent both positive and negative values), let's say 10, in binary 10 = 1010 but technically it's not just 1010 its actually 01010 where the leading zero represents the number's sign. and to get the binary value for 10 we should multiply each digit * 2 raised to the power of its position from right to left so: 1 0 1 0 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 8 + 0 + 2 + 0 = 10 in decimal now knowing that 10 actually equals to 01010 then 0 1 0 1 0 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 this still equals to 10 because 0*2^4 = 0 now the ~ operation flips all the 1s to 0s and all 0s to 1s so technically we need to negate the value that represent the number's sign (the bit on the left most position) so instead of 2^4 we negate that to be -(2^4) which equals -16 now bitwise with ~ 01010 ~ 10101 now to represent this in decimal 1 0 1 0 1 1*-(2^4) + 0*2^3 + 1*2^2 + 0*2^1 + 1*2^0 -16 + 0 + 4 + 0 + 1 = -11
Bro thank you so much! I passed computer networking exam recently and got the highest mark among all classmates. Your "computer networks" course is the best
You are an intelligent person sir keep doing your best nicely done
A positive equivalent number of complement output can also be arrived at using two's compliment.
2~ = 1~ + 1
11 = 1011
therefor:
1~ of 11 = 0100
2~ = 0100 + 1
2~ = 0101
Therefor:
bin(0101) = 5
computer by default don't store negative number so it will convert negative number into positive number using two compliment. Hope this helped too!
Great presentation 👏
Great lecture. One of the best to understand Bitwise not operator
Thank you very much sir, your teaching style is very perfect
Thank you so much bro❤
Tqq so much sir teaching style supperb and easy understand
Very nice explanation sir
amazing teacher😍😍
and amazing presintation
Thank you!
Sir, please upload ppts of Computer Organization and Architecture course. For the past year, students have been asking to upload but to no avail. Please do it as early as possible, sir. Thank you.
Super 😊😊😊
When I try to print ~10 in binary format, it's results -0b1011. This gives 5 in decimal. But instead of printing binary format but using print function it results -11. Please clear this.
Why is the sign bit negative?
I'm assuming that you are referring to the value in minute 6:00
now assuming a 4-bit signed integer (because signed integers can represent both positive and negative values), let's say 10, in binary 10 = 1010 but technically it's not just 1010 its actually 01010 where the leading zero represents the number's sign.
and to get the binary value for 10 we should multiply each digit * 2 raised to the power of its position from right to left so:
1 0 1 0
1*2^3 + 0*2^2 + 1*2^1 + 0*2^0
8 + 0 + 2 + 0 = 10 in decimal
now knowing that 10 actually equals to 01010 then
0 1 0 1 0
0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0
this still equals to 10 because 0*2^4 = 0
now the ~ operation flips all the 1s to 0s and all 0s to 1s so technically we need to negate the value that represent the number's sign (the bit on the left most position)
so instead of 2^4 we negate that to be -(2^4) which equals -16
now bitwise with ~
01010
~
10101
now to represent this in decimal
1 0 1 0 1
1*-(2^4) + 0*2^3 + 1*2^2 + 0*2^1 + 1*2^0
-16 + 0 + 4 + 0 + 1 = -11
Can I get a data analysis job after doing this course
bro Next video Quick upload