To the question about numbers

To the question about numbers

As always, the topic of this post arose during a conversation with MMK (my young colleague) about a simple task. The idea was to determine whether the current value of the beat counter was within an interval of some given value. Difficulties were caused by the moment of transition of the counter through the maximum value to zero (“reroll” or overflow). Having reformulated the task a little, we come to the classic problem of the time interval task with the help of a hardware counter, the solution of which is known for a long time (see Linux sources). However, it suddenly became clear that this decision is not obvious to the MMK and certain clarifications were needed. This post was created to draw the attention of other (not mine) MKs to this aspect of working with numbers. And it is dedicated to the description of various ways of representing a set of integers on a specific bit basis, their advantages and disadvantages.

If you are interested in this topic, you can click

button below.

Related posts