DictionaryForumContacts

   English Russian
Google | Forvo | +
biased representationstresses
IT представление данных со смещением (For example, a 4 bit field that stores powers of 2 ranging from 2^1 to 2^4 can be expressed this way in Ada 2012: type Field is range 1 .. 16 with Size => 4; In this example, having 16 as a value is allowed, even though its ‘natural' representation would exceed the 4 bits range. This is possible because the range starts at 1, so all values can be represented by shifting their representation by 1. So 1 will be represented as ‘0' by the compiler, 2 as ‘1', etc. Ada 2012 supports these sorts of biased representations. Alex_Odeychuk)