C++

C++ - Bit Operations

A Mumbo Jumbo List About Bit and Byte Operations

Posted by Rico's Nerd Cluster on January 7, 2023

Basic Bitwise operations

  • Setting a specific bit to 1.
1
2
uchar desc_byte = 0;
desc_byte |= (1 << NUM);