Saturday, May 21, 2022 19:17

Posts Tagged ‘hexadecimal’

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

Why do we use hexadecimal numbers?

Monday, December 26th, 2016

In some cases, you will see programmers that represent decimal or binary values using hexadecimal values. Why is that?

Well, since we now know from previous lessons how to count in both binary and hexadecimal, let’s see how a few of these numbers correspond:

If you look closely to the above relationship, you will quickly notice that the maximum value a hexadecimal digit can store is equal to exactly the maximum number 4 bits can store.… Read more

Hexadecimal numbers

Monday, December 26th, 2016

Just like the binary representation, of which I have discussed in the previous lesson, hexadecimal notation is just another form of representing numbers. So, hexadecimal numbers, at their core, are normal numbers, represented in base 16, instead of base 10, as for the decimal numbers.… Read more


Follow the white rabbit