Looking for a book about C with special criteria

F

Francois

Hello everybody,

(sorry for my English, I'm French, I'll do my best)

I'm beginning C and personally I'm learning above all with books. I
started and finished a book for novice (a French book "Livre du C
premier langage" by Delannoy). I'm reading the K&R book (Kernighan and
Ritchie second edition) which is far more difficult of course but very
precise. However, I'm not fully satisfied with some things.

I find that this book has a too far away approach on the computer (or
achitecture, i don't the right word): how is a data coded in binary, how
does the problem of "signed" or "unsigned" happen from the point of view
of the computer...

Obviously, the C language is a "high level" one, which mustn't refer to
the computer (by principle). So that's logical that a book upon C
doesn't talk too much of the problems depending on the computer. And
yet, I'd like to know if such a book does exist. I mean a book which
exhibits C language and which doesn't hesitate in talking about what
happens in the computer from time to time: for example the book could
explain things from the point of view of "a classical" computer. For
sure, I'd like to avoid electronical considerations. For example, the
2's complement will be dealt explaining how things are easier from the
point of view of the computer, avoiding purely electronical
considerations if possible.

I hope I've been clear enough about the compromise I'm looking for (but
does it really exist?). For people who understand French, you can go and
see this discussion (in which my login is sisco) which gives more
precisions about my wishes:

http://www.siteduzero.com/forum-83-...codage-binaire-du-contenu-d-une-variable.html

Thanks a lot in advance for helping me.

Sincerely


François
 
J

jacob navia

Salut François

The best book about low level representations in C
and C++ is:

Memory as a Programming Concept in C and C++.
--------------------------------------------
Frantisek Franek
Cambridge University Press.


VERY detailed.
 
M

Mark McIntyre

Francois said:
Hello everybody,

Obviously, the C language is a "high level" one, which mustn't refer to
the computer (by principle). So that's logical that a book upon C
doesn't talk too much of the problems depending on the computer. And
yet, I'd like to know if such a book does exist.

Yes, some probably exist.

However there will have to be a different book for each computer
architecture and then for each compiler written for the hardware.
Consider that gcc and msvc do things differently, even on Windows, while
gcc for Linux will do things differently again - all on the same
architecture. And then on Motorola chips, it will be different again....

And also, it won't really relate to C. Other languages might also do it
the same way on the same platform.
 
B

bab

That is a course for teaching computers to students, not
a book. The text is nowhere to be found there...
(At least no obvious link)

Are you serious?

The picture at the top left... that's a picture of the book. You can
read the title from there. Or you can look to the right and find:
Computer Systems: A Programmer's Perspective (CS:APP)
Randal E. Bryant and David R. O'Hallaron
Prentice Hall, 2003, ISBN 0-13-034074-X.
 
F

Francois

Thank a lot.

I have to possibility :

[1] Computer Systems: A Programmer's Perspective

or

[2] Memory As a Programming Concept in C and C++


If I have understood, [1] doesn't talk about C. Is it true ?


I'll wished make the good choice, because the prices are a little expensive.


François
 
C

CBFalconer

Francois said:
(sorry for my English, I'm French, I'll do my best)

I'm beginning C and personally I'm learning above all with books.
I started and finished a book for novice (a French book "Livre du
C premier langage" by Delannoy). I'm reading the K&R book
(Kernighan and Ritchie second edition) which is far more difficult
of course but very precise. However, I'm not fully satisfied with
some things.

I find that this book has a too far away approach on the computer
(or achitecture, i don't the right word): how is a data coded in
binary, how does the problem of "signed" or "unsigned" happen
from the point of view of the computer...

Take a look at the following links. In particular I recommend the
C standard listings, marked with "C99". The bzip2 compressed
version is text, easily searched with grep and all other text
tools. The point is that the C standard is the ultimate reference.

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://c-faq.com/> (C-faq)
<http://benpfaff.org/writings/clc/off-topic.html>
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf> (C99)
<http://cbfalconer.home.att.net/download/n869_txt.bz2> (C99, txt)
<http://www.dinkumware.com/c99.aspx> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
<http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
 
C

candide

The best book about low level representations in C
and C++ is:

Memory as a Programming Concept in C and C++.
--------------------------------------------
Frantisek Franek
Cambridge University Press.

VERY detailed.

Apart from the first chapter, this book is about plain C/C++ not about
"low level representations in C and C++" : pointers, dynamic
allocation, arrays, linked lists, memory leaks, threads. A very trite
reference that doesn't answer the PO's question.
 
C

candide

have a look at "pointers on c" by Kenneth Reek

Again this book about plain C and is an inappropriate reference for
not answering the OP's question. Furthermore, i found this book very
unclear and very verbose.
 
S

santosh

Francois said:
Thank a lot.

I have to possibility :

[1] Computer Systems: A Programmer's Perspective

or

[2] Memory As a Programming Concept in C and C++


If I have understood, [1] doesn't talk about C. Is it true ?


I'll wished make the good choice, because the prices are a little
expensive.

Maybe you should try a x86 assembly language text like, say:

<http://drpaulcarter.com/pcasm/>

The above is available as a free ebook and actually considers C and C++
a bit too. There is also:

<http://webster.cs.ucr.edu/>

For even more references ask in an assembly group like
<or <
The point is assembly language books tend to go in depth into precisely
the areas that you mentioned above: binary representation, layout of
common data structures, twos complement, floating point formats, etc.
While it is not *exactly* what a C compiler for that platform might
use, you'll get a very good idea of how HLLs actually operate under the
hood.

In particular consider Randall Hyde's Write Great Code, which as the
author himself used to say, is written for HLL programmers wanting a
low level perspective.

You can skip the assembly language portions and merely concentrate on
the machine architecture and data representation portions.

Just a suggestion.
 
S

Scott S. McCoy

I find that this book has a too far away approach on the computer (or
achitecture, i don't the right word): how is a data coded in binary, how
does the problem of "signed" or "unsigned" happen from the point of view
of the computer...

I find wikipedia is a good reference when it comes to details such as
this. There are similar references on line. The details of how
computers work, from the behavior and optimizations of your CPU to IEEE
floating point arithmetic, to binary math and the structure of data as it
pertains to ram is such an enormous topic that no one book covers any of
this completely (although Knuth's the Art of Computer Programming is a
start -- but it's not a C book, by any means).

Take it one step at a time, write some code, when you don't understand
what some specific feature of C is doing look it up.
 
J

josephhallett

If you can cope with it I'd try Knuth's Art of Programming (volume
one). It takes you through a lot of detail about how computers
represent things like lists and arrays internally, and all that and
all in terms of classical computing.

Its very mathematical but it is eminently readable, and your
encouraged to skip bits you find boring. The only downside is it
isn't tailored to C, rather this assembly language called MIX. Knuth
does still give you the pseudocode, and I have had no trouble
converting it to C.

Not sure quite what level of difficulty your after... I'm an
undergraduate and I can cope with most of the material in here.

Definitely worth a go, if you want my two cents.
 
S

Spiro Trikaliotis

Hello Francois,
I have to possibility :

[1] Computer Systems: A Programmer's Perspective [...]
If I have understood, [1] doesn't talk about C. Is it true ?

CSAPP talks more about the organization of computer systems. In this
sense, it is more comparable to Structured Computer Organization by A.S.
Tanenbaum
(http://www.amazon.de/Structured-Computer-Organization-Andrew-Tanenbaum/dp/0130959901),
although it does not go that much into the details as Tanenbaum's book.

CSAPP uses C samples, but it isn't a text about C.

Thus, from my understanding of your initial question, I do not think
that it is the anser to it.

HTH,
Spiro.
 
A

Antoninus Twink

Take a look at the following links. In particular I recommend the
C standard listings, marked with "C99". The bzip2 compressed
version is text, easily searched with grep and all other text
tools. The point is that the C standard is the ultimate reference.

Recommending the C standard as a beginner's textbook... CBF is truly
beyond caricature.
 
F

Francois

Thanks a lot for all your answers. Indeed, my personal interests are
located in different fields. Going step by step would be the
(unfortunately) only means to learn these.

Thanks a lot again for all your suggestions that I will look at carefully.

I'm going to have a look at this discussion in case of new suggestions.


See you soon.


François
 
K

Kenny McCormack

Recommending the C standard as a beginner's textbook... CBF is truly
beyond caricature.

True. There is no need.

But in a way, he's right. Given that CLC is about a lot of things, but
helping beginners learn to program in C isn't one of them (*), it _is_
true that having a copy of the standard at your fingertips is necessary
in order to be able to participate in the group's #1 function - namely,
language lawyering. As with lawyering in general, actual substantive
knowledge of the area in question is, at best, peripheral and fleeting;
what matters is what's in the law books.
 
R

Richard

Antoninus Twink said:
Recommending the C standard as a beginner's textbook... CBF is truly
beyond caricature.

Did he? Amazing. How dumb can one man be?

He must have put all his ridiculous links in his signature block
again. I didn't see them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top