When to use Bitwise Operators during webdevelopment?

后端 未结 10 1319
Happy的楠姐
Happy的楠姐 2020-12-12 12:01

Although I grasp the concept of Bitwise Operators, I can\'t say that I have come across many use cases during the webdevelopment process at which I had to resort to using Bi

10条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 12:12

    I think bitwise operators are very strong if used intelligently.

    Suppose you have a "Online Store". And some of your items fall in more that one Categories.

    Either you have to Create a Many-to-Many relation. Or you can give your Categories an extra Binary-ID and in your product just store the Bitwise combinition of Categories-IDs

    I think in few line I can't explain in detail. SORRY

提交回复
热议问题