我有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 myschoolwork, I used C and C++ and thought that I had a pretty goodunderstanding of the language(s). But now, as I really am trying to findwork as a C/C++ programmer, I am having trouble on programming interviewtests when they start asking about low-level C stuff dealing with memory andbinary numbers. Recently, I took a test for a SE position at Intel, which Iof course was very excited about, but I am pretty sure I bombed the test asI didn''t really know a lot of what they were asking and staying up all nightscouring the internet did not produce satisfying results (i.e. I didn''t getthe job). I was able to come up with answers, but I don''t think they werecorrect 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 Isee you propose to questions dealing with C on a binary number level, oractually 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 typeof 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 isappreciated.Thanks,ramzy 解决方案 "Ramzy Darwish" <ra***********@gmail.com> wrote in messagenews: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 instutitionissued you those degrees?This isn''t a question or issue about C anyway,so it''s not topical here. BTW google will findyou plenty of tutorials on number-bases, e.g.binary. You might also want to peruse www.drmath.com-MikeMaybe I didn''t explain myself very well. I understand binary numbers and howto work with them, and I know how to work with memory in terms of allocatingand deallocating and taking care of memory leaks and all of that. What I wasreferring to were the tricks I see people play with using bit patterns todetermine mathematical properties of numbers (i.e. 1 then all 0''s equalpower of two, etc.).I know all about bases and took my architecture courses. I was just lookingfor a book that maybe helped one to try to look at a lower level than sayobjects or structs or something similar."Mike Wahler" <mk******@mkwahler.net> wrote in messagenews: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 notknow that? The most ''obscure'' one I''ve come across is thata & (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 "knowall 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 bitsThe rest is mathematics. Mostly arithmetic...Chris C 这篇关于学习低级C的好书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 15:22