[DFDL-WG] 13.7.1.1 Converting Base-2 Binary Numbers (updated)

Steve Hanson smh at uk.ibm.com
Tue Dec 9 12:48:35 EST 2014


DFDL WG agreed with all proposed changes. 
http://redmine.ogf.org/issues/248

Regards
 
Steve Hanson
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848



From:   Steve Hanson/UK/IBM
To:     DFDL-WG <dfdl-wg at ogf.org>
Date:   04/12/2014 12:02
Subject:        13.7.1.1 Converting Base-2 Binary Numbers (updated)


Converting Base-2 Binary Numbers
For both parsing and unparsing, the bit string that represents the content 
region for a base-2 binary number is converted to/from an Infoset value by 
a calculation that involves the length and the dfdl:byteOrder property.
For unparsing, the dfdl:fillByte property can also be involved. 
When parsing, DFDL specifies how an unsigned integer of unbounded 
magnitude is computed from a bit string based on its length, and the 
dfdl:byteOrder property. For signed types, this  unbounded integer is 
converted into a signed value by way of the well-known twos-complement 
scheme, and for the xs:decimal type, the dfdl:binaryDecimalVirtualPoint 
property can be used to convert this integer into a decimal value with an 
integer and a fractional component, and for both xs:decimal and the 
integer types the dfdl:binaryVirtualDecimalPoint or to scale up the 
integer by some scale factor.
1) Why is the fill byte involved here?  We are creating a two's complement 
value of a particular length. There is no filling going on.
2) Should this now also mention dfdl:bitOrder?
3) BDVP is only used for xs:decimal so the final clause of the last 
paragraph should not include integer types.


Regards
 
Steve Hanson
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20141209/9dece04c/attachment.html>


More information about the dfdl-wg mailing list