This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /issues/329 at Thu, 03 Nov 2022 01:53:43 GMT document #329: dfdl:binaryNumberRep="offsetBinary" new behavior - DFDL WG - Open Grid Forum

document #329

dfdl:binaryNumberRep="offsetBinary" new behavior

Added by Michael Beckerle about 5 years ago. Updated almost 2 years ago.

Status:closed Start date:10/03/2017
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:DFDL v2.0
Document Type:Proposed Recommendation

Description

We have found a number of places that use offset-binary numeric representation. This is also called excess-K, or biased, but I think offset binary is a better description of it.

In this representation you take an unsigned binary, and just subtract an offset. E.g., for a 3-bit number, mostSignificantBitFirst:

bits unsigned twos-comp offsetBinary

000 0 0 -4
001 1 1 -3
010 2 2 -2
011 3 3 -1
100 4 -4 0
101 5 -3 1
110 6 -2 2
111 7 -1 3

At the moment, users have to work around this in Daffodil using inputValueCalc and outputValueCalc. This is feasible, but really awkward for such a simple concept.

So we suggest that the next revision of DFDL include dfdl:binaryNumberRep="offsetBinary" as a required feature.

History

Updated by Michael Beckerle almost 2 years ago

  • Status changed from submitted to closed

(Other formats not available in this archive.

This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /issues/329 at Thu, 03 Nov 2022 01:53:43 GMT