Abstract
Set the Memory value to the most common control during firmware. This article describes the programming skills that are common when C statements are used for firmware, and correspond to each other with the image watermark.
Introduction
This article will discuss the following topics:
1. Set a bit counter to 1
2. Set a bit counter to 0
3. Toggle a bit (0 changes to and 0)
4. Determine whether a bit of a shard is 1
5. Determine whether a bit of a shard is 0
1. Set a bit counter to 1
C. Yan
Flag | = mask;
Or
Flag | = (1<N );
OpenGL
Flag [N] =1'B1;
2. Set a bit counter to 0
C. Yan
Flag & = ~ Mask;
Or
Flag & = ~ (1<N );
OpenGL
Flag [N] =1'B0;
3. Toggle a bit (0 changes to and 0)
C. Yan
Flag ^ = mask;
Or
Flag ^ = (1<N );
OpenGL
Flag [N] = ~ Flag [N];
4. Determine whether a bit of a shard is 1
C. Yan
If(Flag & Mask)
OpenGL
If(Flag [N])
5. Determine whether a bit of a shard is 0
C. Yan
If(! (Flag & Mask ))
OpenGL
If(~ Flag [N])
See also
(Reporter) How to specify a bit value for a change? (SOC) (C/C ++) (OpenGL)
The full text is complete.