Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1889

binaryNumberRep='offsetBinary'

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Back End, Front End
    • None

    Description

      Implement the binaryNumberRep 'offsetBinary'.

      This is a good first project for someone new to the Daffodil code base.

      This is a proposal for inclusion in the DFDL language, needed for some formats such as STANAG 5516.

      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.

      The DFDL spec would change so table 13.7 allows 'offsetBinary' for the signed integer types.

      The lengthKind would have to be implicit or explicit. (SDE otherwise).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle

            Dates

              Created:
              Updated:

              Slack

                Issue deployment