学习低级C的好书 [英] Good Books to learn low-level C

查看:53
本文介绍了学习低级C的好书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有CS学士学位和Comp中的硕士学位。图形。在我所有的b $ b学校作业中,我使用了C和C ++,并认为我对语言的理解非常好。

。但是现在,因为我真的想找到作为C / C ++程序员工作的
,我在编程面试时遇到了麻烦

测试当他们开始询问低级别时C处理内存和

二进制数。最近,我参加了在英特尔举办的SE职位考试,我当然非常兴奋,但是我很确定我对这个考试进行了轰炸。

我没有我真的知道他们要求的很多东西并且整夜熬夜

在互联网上搜索并没有产生令人满意的结果(即我没有得到

工作)。我能够得出答案,但我不认为他们是正确的,因为他们不会回复我(甚至没有说我失败了)。

我想知道的是你们所有人是如何学习我的b / b
看到你提出的关于二进制数级别的C的问题,或者

实际上使用了存储在内存中的一些数据的内存地址的事实。


我刚订购的计算机系统:程序员的视角并且

插图C。

当然我有K& R和Stroustrup,但他们并没有真正进入这种类型

详细的东西(我没想到他们)。


你是否只需要像许多PERL技巧一样学习它?

有没有书可以教你这些东西?网站?任何帮助都是

赞赏。


谢谢,

ramzy

解决方案

" Ramzy Darwish" < RA *********** @ gmail.com>在留言中写道

新闻:Y3 ****************** @ fe30.usenetserver.com ...

你好,
我有CS的学士学位和Comp的硕士学位。图形。
[...]我遇到麻烦
[...]内存和二进制数。




我发现这令人难以置信。什么调整

给你这些学位?

这不是关于C的问题或问题,

因此它不是专题这里。 BTW谷歌会在数字基础上找到大量的教程,例如

二进制文件。您可能还想仔细阅读 www.drmath.com


-Mike


也许我没有很好地解释自己。我理解二进制数和

如何使用它们,我知道如何在分配

和解除分配以及处理内存泄漏和所有内存方面使用内存那。我所说的是
指的是我看到人们使用位模式玩弄的技巧

确定数字的数学属性(即1然后全部0'相等

2的力量等等。)

我知道所有关于基础并参加我的建筑课程。我只是在寻找一本可以帮助人们试图看下一层低于那个物品或结构或者类似物品的书。

" Mike Wahler" < MK ****** @ mkwahler.net>在消息中写道

新闻:2m **************** @ newsread2.news.pas.earthli nk.net ...

Ramzy Darwish < RA *********** @ gmail.com>在消息中写道
新闻:Y3 ****************** @ fe30.usenetserver.com ...

你好,我有CS的学士学位和Comp的硕士学位。图形。


[...]

我遇到了麻烦


[blockquote class =post_quotes>带记忆和二进制数。



我发现这令人难以置信。什么时候给你颁发这些学位?

这不是一个关于C的问题或问题,
所以这里不是热门话题。 BTW谷歌会在数字基础上找到大量的教程,例如
二进制文件。您可能还想仔细阅读 www.drmath.com

- Mike




2005年4月7日星期四02:36:30 -0500,Ramzy Darwish

< ra *********** @ gmail.com>写道:

也许我没有很好地解释自己。我理解二进制数以及如何与它们一起工作,我知道如何在分配和解除内存泄漏以及所有这些内容方面使用内存。我所指的是我看到人们使用比特模式来确定数字的数学属性(即1然后全部0'等于2的幂等等)的技巧。 )。


嗯,00010000 ......是任何基地的基础力量,你怎么不知道?b $ b知道这个?我遇到的最模糊的是


a& (a-1)


删除了最底层的设置位,这需要一些思考。

我知道所有关于基础并参加我的架构课程。我只是在寻找一本可能帮助人们尝试查看比对象或结构或类似内容更低级别的书。




操作很简单,如果你已经理解二元和知道

所有关于基数的话。 (假设数学意义上的''基数')。


<<左移(乘以2模2 ^ n的幂)

右移(除以2模2 ^ n的幂)



&和数字(交叉点)

|或数字(联盟)

^独家或数字(差异)

~反转位


剩下的就是数学。大多数算术......


Chris C


Hello,
I have a Bachelors in CS and a Masters in Comp. Graphics. In all of my
schoolwork, I used C and C++ and thought that I had a pretty good
understanding of the language(s). But now, as I really am trying to find
work as a C/C++ programmer, I am having trouble on programming interview
tests when they start asking about low-level C stuff dealing with memory and
binary numbers. Recently, I took a test for a SE position at Intel, which I
of course was very excited about, but I am pretty sure I bombed the test as
I didn''t really know a lot of what they were asking and staying up all night
scouring the internet did not produce satisfying results (i.e. I didn''t get
the job). I was able to come up with answers, but I don''t think they were
correct as they will not respond to me (not even to say I failed).

What I want to know is how all of you out there learned the tricks that I
see you propose to questions dealing with C on a binary number level, or
actually using facts about the memory address of some data stored in memory.

I just ordered "Computer Systems: A Programmer''s Perspective" and
"Illustrating C".
Of course I have K&R and Stroustrup, but they don''t really go into this type
of stuff in detail (and I didn''t expect them to).

Do you just have to learn it along the way like a lot of the PERL tricks?
Are there any books that teach you this stuff? Websites? Any help is
appreciated.

Thanks,
ramzy

解决方案

"Ramzy Darwish" <ra***********@gmail.com> wrote in message
news:Y3******************@fe30.usenetserver.com...

Hello,
I have a Bachelors in CS and a Masters in Comp. Graphics. [...] I am having trouble [...] with memory and binary numbers.



This I find beyond incredible. What instutition
issued you those degrees?
This isn''t a question or issue about C anyway,
so it''s not topical here. BTW google will find
you plenty of tutorials on number-bases, e.g.
binary. You might also want to peruse www.drmath.com

-Mike


Maybe I didn''t explain myself very well. I understand binary numbers and how
to work with them, and I know how to work with memory in terms of allocating
and deallocating and taking care of memory leaks and all of that. What I was
referring to were the tricks I see people play with using bit patterns to
determine mathematical properties of numbers (i.e. 1 then all 0''s equal
power of two, etc.).

I know all about bases and took my architecture courses. I was just looking
for a book that maybe helped one to try to look at a lower level than say
objects or structs or something similar.
"Mike Wahler" <mk******@mkwahler.net> wrote in message
news:2m****************@newsread2.news.pas.earthli nk.net...

"Ramzy Darwish" <ra***********@gmail.com> wrote in message
news:Y3******************@fe30.usenetserver.com...

Hello,
I have a Bachelors in CS and a Masters in Comp. Graphics.


[...]

I am having trouble


[...]

with memory and binary numbers.



This I find beyond incredible. What instutition
issued you those degrees?
This isn''t a question or issue about C anyway,
so it''s not topical here. BTW google will find
you plenty of tutorials on number-bases, e.g.
binary. You might also want to peruse www.drmath.com

-Mike




On Thu, 7 Apr 2005 02:36:30 -0500, Ramzy Darwish
<ra***********@gmail.com> wrote:

Maybe I didn''t explain myself very well. I understand binary numbers and how
to work with them, and I know how to work with memory in terms of allocating
and deallocating and taking care of memory leaks and all of that. What I was
referring to were the tricks I see people play with using bit patterns to
determine mathematical properties of numbers (i.e. 1 then all 0''s equal
power of two, etc.).
Well, 00010000... is a power of the base in any base, how did you not
know that? The most ''obscure'' one I''ve come across is that

a & (a-1)

removes the bottommost set bit, and that does need some thought.
I know all about bases and took my architecture courses. I was just looking
for a book that maybe helped one to try to look at a lower level than say
objects or structs or something similar.



The operations are simple, if you already understand binary and "know
all about bases" (assuming ''bases'' in the mathematical sense).

<< shift left (multiply by a power of 2 modulo 2^n)

shift right (divide by a power of 2 modulo 2^n)


& and the numbers (intersection)
| or the numbers (union)
^ exclusive or the numbers (difference)
~ invert the bits

The rest is mathematics. Mostly arithmetic...

Chris C


这篇关于学习低级C的好书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆