Bit Flags & Masks: Reading, Setting and Clearing Status Bits
This lesson is part of the course
In this lesson
You split six status bytes into eight yes/no flags, count the devices with a low battery, set the alarm bit on one device and clear the update bit on another – without double-counting a bit that is already set.
Buy the course once for $9.99 to unlock every lesson and lab, the final exam and the certificate – lifetime access, no subscription.
Lessons in this course
- Positional Notation: Decimal to Binary by Repeated Division and Back Locked
- Hexadecimal & Octal: Nibbles, Hex Digits and Colour Codes Locked
- Bit Flags & Masks: Reading, Setting and Clearing Status Bits Locked
- Two's Complement: Signed Ranges, Negative Numbers and Decoding Bytes Locked
- Integer Limits & Overflow: Max Values, Bits Needed and Counters that Roll Over Locked
- Fixed Point: Scaling Factors, Resolution and Rounding Error Locked
- Floating Point with a Toy 8-Bit Format: Sign, Exponent, Mantissa and Why 0.1 Is Not Exact Locked
- Storage Units & Characters: GB vs GiB, File Sizes and Text in Bytes Locked