PreviousNext
Conversion to Bytes
Help > IQRF Code Encoding > Conversion to Bytes

In this step, IQRF values are converted into an array of bytes. Because the smallest piece stored in the array of bytes is one nibble it is actually a nibble stream. Every IQRF value is first introduced by its ID stored in a nibble. Then actual bytes (from LSB to MSB) follow. Because a previous nibble can divide byte into halves the lower nibble of the following byte is stored in the higher nibble of the divided byte and the higher nibble is stored in the lower nibble of the following byte. When all IQRF values are stored one after another a final zero nibble (End IQRF value) is stored to label the end of the stream.

 

Example: HWPID=0xABCD

 

byte index

0

1

2

description

low nibble 0xAB

HWPID
ID=3

low nibble 0xCD

high nibble 0xAB

End
ID=0

high nibble 0xCD

nibbles

B

3

D

A

0

C

 

Result = B3 DA 0C