Saturday, May 21, 2022 18:20

Posts Tagged ‘binary’

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

Bit. Byte. Binary counting.

Monday, December 26th, 2016

I was explaining in a previous lesson that at the deepest level, computers store and process information only as two values, 0 and 1. These values are the smallest individual pieces of information inside a computer, and they are called bits.… Read more


Follow the white rabbit