Tuesday, April 16, 2024 05:12

Posts Tagged ‘bitwise operators’

Bit masks and the Flags enumerations attribute

Sunday, July 16th, 2017

Most programmers use enums just so they can enforce a predefined set of options from which users can chose. However, enums have one major disadvantage: they can only hold one value at a time. Let’s say we have the following code:

In this case, specifying that we want to have a direction towards left seems OK.… Read more

Bitwise operators

Friday, January 6th, 2017

Any programmer knows that computers can only process information represented by a series of binary numbers (1 and 0). This means that when we store the number 55 in memory of the computer, it actually stores a series of bits represented as 00110111.… Read more

Follow the white rabbit