From: Joseph Legris
X-Mailer: Mozilla 4.77 [en]C-SYMPA (Win95; U)
Subject: Re: bits question
Date: Sun, 15 Sep 2002 09:11:45 -0400
NNTP-Posting-Date: Sun, 15 Sep 2002 09:05:56 EDT
Organization: Bell Sympatico
> John Woodgate wrote:
> > I read in sci.electronics.design that Chuck Simmons
> > wrote (in <3D842B61.8256A228@webaccess.net>)
> > about 'bits question', on Sun, 15 Sep 2002:
> > >I did blow it though. Delete, which is 0x7f in 7 bit ASCII, is
> > >non-printing. I suppose that 0xff is also non-printing.
> > Would someone please explain in simple terms what the '0x' part of a hex
> > number means?
> > --
> > Regards, John Woodgate, OOO - Own Opinions Only. http://www.jmwa.demon.co.uk
> > Interested in professional sound reinforcement and distribution? Then go to
> > http://www.isce.org.uk
> > PLEASE do NOT copy news posts to me by E-MAIL!
> I believe this should come from the programming (e.g. the C language). 0x means
> that what follow is a hexadecimal number: in C, 0x10 means 16 decimal, 010
> means 8 decimal (octal base (radix) assumed).
From Kernighan & Ritchie, the latter of whom invented C (on a PDP-11!),
"The C Programming Language", 2nd ed. 1988 (the new edition) :-)
"A leading 0 (zero) on an integer constant means octal; a leading 0x or
0X means hexadecimal."
This book is a both a programming course and a C reference manual packed
into 272 pages. If you are interested in learning C but cannot bear the
thought of plodding through the bulk of more recent offerings, it's a
fast and pleasant read.