11 09, 2018

The negative numbers representation in hex

2023-02-14T15:32:32+00:00

The hexadecimal value of a negative decimal number can be obtained starting from the binary value of that decimal number positive value. The binary value needs to be negated and then, to add 1. The result (converted to hex) represents the hex value of the respective negative decimal number. The example below shows how to [...]

The negative numbers representation in hex2023-02-14T15:32:32+00:00
11 09, 2018

Fractional numbers reperentation using the 16.16 format

2018-09-11T14:20:53+00:00

In TML, the fractional numbers (usually stored in 32 bits fixed variables) are represented (in hex) using the "16.16" format. According to this format, to get the hex value of a fractional number, the first step is to multiply the fractional number with 65536. The result will be rounded or truncated and cast to a [...]

Fractional numbers reperentation using the 16.16 format2018-09-11T14:20:53+00:00