The simFlight Network Forums

# offset setting

## Recommended Posts

Hi Pete

I want to set offset 564A Bit 7 when pressing a key.

Therefore I use the Offset Byte Setbit function from the key press menu.

my question is:

1)Does 0x564A mean offset 564A?

2)Under parameter do I simply write 7 for Bit 7. When rechecking

it appears under the form x07. Does x07 also mean Bit7?

Gilles

##### Share on other sites

Does 0x564A mean offset 564A?

Yes, of course. They are both numbers in hexadecimal. Decimal numbers don't contain digits like 'A'. All FSUIPC offsets are known by their hexadecimal value.

Under parameter do I simply write 7 for Bit 7. When rechecking

it appears under the form x07. Does x07 also mean Bit7?

No, x07 means bits 0, 1 and 2. It is a number. Usefully, 7 in hexadecimal happens to be the same as 7 in decimal, but expressed in binary as an 8-bit byte it is

0 0 0 0 0 1 1 1

Bits are numbered from the right-most (the least significant) 0 up to 7 for the top bit. Thus your bit 7, in binary, looks like this:

1 0 0 0 0 0 0 0

In terms of decimal, bit 0 is worth 2^0 = 1, bit 1 is worth 2^1 = 2, bit 2 is worth 2^2 = 4, and so on, up to bit 7 which is 2^7 = 128. See? The value multiplies by 2 for each higher bit. This is called BINARY. In decimal, each higher digit is worth TEN times the previous one.

This is how 0 0 0 0 0 1 1 1 gets to be worth 1 + 2 + 4 = 7.

So, the parameter you want has to be 128 (for just bit 7). This will look like x80 in hexadecimal. In Hex, bits are in groups of 4 (because 2^4 = 16):

1000 0000

The left "nybble" (as it is often called -- "byte" --> "nybble", see?) is 8 in decimal, the right is 0 in decimal, hence x80.

Really this sort of documentation should appear in the Project Magenta documentation website. Have you looked? If not, maybe filing a suggestion with their support might help others.

Regards

Pete

## Create an account

Register a new account