Bitwise Operators in Python (Part 2)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 20

  • @blago7daren
    @blago7daren ปีที่แล้ว +8

    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

  • @KaleabTilahun-q2g
    @KaleabTilahun-q2g ปีที่แล้ว +3

    You are an intelligent person sir keep doing your best nicely done

  • @yusufboima1042
    @yusufboima1042 5 หลายเดือนก่อน +3

    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!

  • @poojabala9070
    @poojabala9070 ปีที่แล้ว +4

    Great presentation 👏

  • @Musanna-db4mf
    @Musanna-db4mf 3 หลายเดือนก่อน

    Great lecture. One of the best to understand Bitwise not operator

  • @MyComputer-g2o
    @MyComputer-g2o 10 หลายเดือนก่อน

    Thank you very much sir, your teaching style is very perfect

  • @BailarBayramov
    @BailarBayramov 2 ชั่วโมงที่ผ่านมา

    Thank you so much bro❤

  • @sarswatigoutam
    @sarswatigoutam 10 หลายเดือนก่อน

    Tqq so much sir teaching style supperb and easy understand

  • @ANURADHABUDHALKAR
    @ANURADHABUDHALKAR 8 หลายเดือนก่อน

    Very nice explanation sir

  • @b7sh_b7sh
    @b7sh_b7sh ปีที่แล้ว +2

    amazing teacher😍😍

    • @b7sh_b7sh
      @b7sh_b7sh ปีที่แล้ว +1

      and amazing presintation

  • @dividingbyzeroo
    @dividingbyzeroo หลายเดือนก่อน

    Thank you!

  • @guasimolo5198
    @guasimolo5198 ปีที่แล้ว +1

    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.

  • @Ranganadhamkrishnachaitanya27
    @Ranganadhamkrishnachaitanya27 ปีที่แล้ว

    Super 😊😊😊

  • @mklakshmi8455
    @mklakshmi8455 8 หลายเดือนก่อน

    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.

  • @AbdulDanmalan
    @AbdulDanmalan ปีที่แล้ว +1

    Why is the sign bit negative?

    • @big-jo89
      @big-jo89 11 หลายเดือนก่อน +1

      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

  • @pmalik1975
    @pmalik1975 ปีที่แล้ว

    Can I get a data analysis job after doing this course

  • @thushanth9873
    @thushanth9873 ปีที่แล้ว

    bro Next video Quick upload