Re: byte data type
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 14 Aug 2005 21:10:36 GMT
On Sun, 14 Aug 2005 20:29:05 +0100, Thomas Hawtin
<usenet@xxxxxxxxxxxxxxxxx> wrote or quoted :
>C does not specify the number of bits to a char. Nor if it is signed or
>unsigned (usually they are unsigned). It doesn't even specify if signed
>chars use two-complement notation.
Yes they had chaos. When people used only 7-bit ASCII it did not
matter, and the signed was a nice feature to use for short offsets.
Back then you had compiler options to consider byte as signed or
unsigned, but tradition left it signed.
Java went with the signed tradition even though nowadays 99% of the
time you want unsigned. Perhaps sun hardware is signed byte only.
I know Intel circa 386 used be unusually slow at handling signed
bytes.
.
- Follow-Ups:
- Re: byte data type
- From: googmeister
- Re: byte data type
- From: Thomas Hawtin
- Re: byte data type
- References:
- byte data type
- From: rahul8143
- Re: byte data type
- From: Roedy Green
- Re: byte data type
- From: Thomas Hawtin
- byte data type
- Prev by Date: Re: Objects
- Next by Date: Re: Turning tables on interviewer
- Previous by thread: Re: byte data type
- Next by thread: Re: byte data type
- Index(es):
Relevant Pages
|
|