[DFDL-WG] needed: signed bit fields
Steve Hanson
smh at uk.ibm.com
Tue Dec 11 03:46:40 EST 2012
Errata 2.90. Sections 12.3, 12.3.7.2. Additionally allow lengthUnits
'bits' to apply to binary signed integer types, to support the modeling of
signed integer bit fields in the C language. The physical bits are
interpreted as a two's complement integer.
Regards
Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
From: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: dfdl-wg at ogf.org,
Date: 10/12/2012 21:42
Subject: [DFDL-WG] needed: signed bit fields
Sent by: dfdl-wg-bounces at ogf.org
current DFDL v1.0 spec says bit fields are all unsigned integers up to
length 64.
I am modeling data that uses lots of twos-complement 24-bit long and other
length signed integers on various bit-boundaries.
Was there a reason to leave signed twos-complement out for bit fields
(other than perhaps just we thought we might get away with it?)
The only corner case I can think of is if you make a 1-bit wide signed bit
field. This should be a Schema Defintion Error I believe, because
twos-complement isn't defined unless you have at one sign bit, and at
least 1 mantissa bit.
...mikeb
--
Mike Beckerle | OGF DFDL WG Co-Chair | Tresys Technologies
Tel: 781-330-0412
--
dfdl-wg mailing list
dfdl-wg at ogf.org
https://www.ogf.org/mailman/listinfo/dfdl-wg
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/20121211/53b9bd18/attachment.html>
More information about the dfdl-wg
mailing list