is it necessary to learn assembly language ?

is it necessary to learn assembly language , If I want to have better understanding of c++??

I have read somewhere that I I should learn assembly language to understand how memory works...



> is it necessary to learn assembly language , If I want to have better understanding of c++??

Necessary? No. Useful? On occasion.


> I should learn assembly language to understand how memory works.

C++ does not have much to say about how memory 'works'.
For professional programming, it's useful to understand computer architecture and compiler design. These will help you understand how seemingly innocuous design decisions could actually have big performance impacts, or why code is running slowly.

For me, the only use of assembly language these days is for occasional debugging in code that wasn't built with debugging enabled. In cases like that, you have to debug through the assembly.
It is not necessary at all. Its a good idea to know what it can DO, though. Ive used it maybe 1 time in 5 years and most of that more than 10 years back. And always, the uses were 1-2 lines of assembly. For a long time, we hit the intel timestamp register to get a cpu hz speed real time clock, for high a resolution timer to profile code or precisely time events. If I had to do it again, I would still use the intel command to reverse endian integers in bulk. Things like that, that c++ can do, but not as efficiently nor as easily.

You will learn a LOT about how the machine works if you learn assembly language. Memory is a small piece of that, there is a ton more. Most college 4 year programs had assembly language as a course until rather recently, and its still offered but no longer required. If you are still in school, take it.

Topic archived. No new replies allowed.