Abstract
As described in Chapter 1, you can use an enumeration to define bit flags. Bit flags allow a series of items to be selected or deselected by switching individual bits in a sequence on and off. To ensure that each value in an enumeration relates to a single bit, the numbering must follow the binary sequence whereby each value is a power of two, for example
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Steve Fenton
About this chapter
Cite this chapter
Fenton, S. (2014). Bitwise Flags. In: Pro TypeScript. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6790-4_12
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6790-4_12
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6791-1
Online ISBN: 978-1-4302-6790-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)