How to perform multiplication, using bitwise operators?

前端 未结 7 1827
一个人的身影
一个人的身影 2020-12-04 13:28

I am working through a problem which i was able to solve, all but for the last piece - i am not sure how can one do multiplication using bitwise operators:

0         


        
相关标签:
7条回答
  • 2020-12-04 14:22

    I believe this should be a left shift. 8 is 2^3, so left shift 3 bits:

    2 << 3 = 8

    0 讨论(0)
提交回复
热议问题