Skip to content
QnA Plus

Code, Create, Conquer: Insights, Algorithms, and Innovation

  • Home
  • Privacy Policy
  • Terms and Conditions
  • Contact
  • Contribute
  • About

Bitwise Operation

  • Home
  • Bitwise Operation

Count Set Bits of a Number in C

Posted by By Srikanta April 3, 2020Posted inProgramming, CNo Comments
A number consists of multiple bits in its binary representation. For example, an integer would have 32 bits and a long would have 64 bits on 64-bit system. Bit values…
Read More

Brian Kernighan’s Algorithm to Count the Set Bits of a Number

Posted by By Srikanta April 2, 2020Posted inProgramming, CNo Comments
To count all set bits of a number, we can loop through all the bits and check whether any bit is set. For example, an integer has 32 bits. We…
Read More

Left and Right Rotate Bits of a Number in C

Posted by By Srikanta April 1, 2020Posted inC, ProgrammingNo Comments
Here we'll see how to write C program to left or right rotate bits of a number. For example, an unsigned integer consists of 32-bit. Number 2591458749 is represented as…
Read More

C Program to Toggle Bits

Posted by By Srikanta March 31, 2020Posted inProgramming, CNo Comments
Here we'll see how to write C program to toggle all bits or a particular bit or all but a particular bit of a number. Toggle All Bits of a…
Read More

C Program to Set, Clear and Toggle a Bit

Posted by By Srikanta March 31, 2020Posted inProgramming, CNo Comments
In this article we saw how to check a particular bit of a number. Here we'll see how to set, clear or toggle a bit of a number. Setting a…
Read More

Posts pagination

1 2 Next page
Categories
  • Programming 186
    • C 105
    • C++ 70
    • Python 7
  • Technology 30
  • Networking 6
  • Database 4
  • Others 8

    Popular Posts:

    • Implement Bubble Sort in C 118 views
    • How to install Ping or Ping6 using YUM 97 views
    • C Program to Sleep in Milliseconds 87 views
    • How to Implement Periodic and Single Shot Timers in Linux? 85 views
    • Change a Variable from inside a C Function 53 views
    • C Program to Check Whether Two String are Equal 47 views
    • How to Install and Configure MySQL on CentOS: A Complete Guide 43 views
    • C++ | Binding a Member Function 40 views
    • How to Store SVN Password in Encrypted Form in Linux 39 views
    • How to do Asynchronous Operations using boost::asio? 39 views

    💬
    Chat with Us!

    Copyright © 2015 - 2025 QnA Plus. All rights reserved.
    Scroll to Top
    0
    2
    0
    6
    8
    4