Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am entering university next month and have some exemption exams today. One of which is Computer Organization: things like Boolean Algebra, Gates (AND, OR, NOT etc), Assembly Language are taught. I wonder why learn such low level stuff. Does it benefit me as a programmer, likely developing in much higher level languages like C#, Python, PHP etc?

share|improve this question
    
    
If you become an embedded software engineer, then knowledge of low-level principles, and assembler, are essential. Even if you don't go down this path, it's good to know in detail how computers work. Languages come and go, computers become more complex - but the underlying principles remain the same, so it's worth being familiar with them. –  Steve Melnikoff Jul 19 '11 at 12:11
add comment

9 Answers

up vote 8 down vote accepted

Software is an ever-changing field.

Some of what is hot today might and will be forgotten till the time you graduate.

Definitely concentrate on practical skills in popular languages like C# / Java / PHP.

Then study more 'hot' languages like Ruby, F#, Clojure.

Assembly Language while almost obsolete in 99% of the areas where software is used, will give you a unique perspective of the low level workings of your system.

Assembly is not that hard actually, and is a fun thing to brag about.

My colleagues are usually impressed when I tell them I have been doing machine code on 8bit computers (I didn't have an assembler).

share|improve this answer
4  
I wouldnt recommend learning a language because it's 'hot' or 'popular'. Learn it because you want to, its fun or its useful –  Raynos Jul 19 '11 at 6:39
    
It is assumed that learning a 'hot' language is usually fun. –  Boris Yankov Jul 19 '11 at 6:41
    
fun is too personal. I wouldn't go out of my way to learn Ruby, F# or Clojure because I don't consider that to be fun. Fun might imply hot but hot does not imply fun –  Raynos Jul 19 '11 at 6:44
add comment

Learning programming from the bottom up is invaluable. You will use boolean algebra practically every day as a programmer. Reducing truth-tables to minimal logical expressions and doing equivalent transformations of boolean expressions comes in very handy.

For example, when writing code, sometimes it's more natural to write something as:

    if ( not A  or  not B ) ...

If you know your equivalences, you would know that it might be clearer to write:

    if ( not ( A and B ) ) ...

When you're examining code, you'll be able to quickly and easily tell if all cases are handled through complex if/else-if/else conditions, especially those handling multiple variables in sometimes ugly combinations. We always strive to make our code as clear as possible, but sometimes you're handed something from the dark and ugly past that has to be upgraded or maintained.

As for assembly and (basic) circuit design, this may not be something that you ever use. However, think about what it is that we do. We take high level specifications and break them down into smaller and smaller bits and build up a program of specific steps which will, in the end, act according to the specification.

By learning assembly and simple circuits, you bring this decomposition down to its lowest level. It is an excellent mental exercise that will (1) force you to think about what it means to work through a problem step by step, clock cycle by clock cycle; (2) make you appreciate all that is going on under-the-hood while using higher level languages; and (3) give you the understanding necessary when you have to get the maximum amount of performance out of a piece of code.

You will not be sitting at your desk performing boolean algebra problems to hand in to your boss, nor will you be hand coding a web site in assembler. But the skills that each of these exercises teach you will come in handy every single day.

share|improve this answer
add comment
  1. Because you are young and haven't seen much of the world of software yet. One of the purposes of a university education is to expose you to areas you haven't seen before. How do you know that you don't like writing device drivers in assembly until you've seen a few examples?
  2. How long do you think you'll be a programmer? 15 year ago C#, Python, and PHP were research projects. 15 years from now they may be obsolete. The material you'll learn in Computer organization was useful 30 years ago, and is likely to be useful 30 years from now.
  3. All software has bugs so you need to have some understanding of the abstraction layer below the one you usually work at. If you are really going to be a whiz at C# you should be able to understand byte code and the virtual machine it runs on. Those topics are just special cases of the topics you'll cover in Computer Organization.
share|improve this answer
add comment

You will understand the machine you are working with. As a Martial Artist needs to know his muscles and which diet is good for him. You will have to make many decisions and in some cases this may be the question if it's a good idea to implement some feature in a high level language or if you need to write it in a low level language to avoid performance problems. Even if you won't be able to implement it in Assembly yourself, because you specialized in something else, yo should know the differences so you know when it makes sense to hire somebody to do this kind of work.

If you work in high level languages you will benefit from knowing what's going on behind the scenes, how for example a map, a vector or a linked list is implemented and where are the advantages or disadvantages.

And in general it is just another way to train your ability in abstract thinking. It doesn't matter that much if you train this i Assembly or in Python.

share|improve this answer
add comment

I concur with what several others have already said. You won't be sitting at your desk doing boolean algebra exercises, nor is it likely that you will start out at a job where you are tasked with coding something in assembler. But the big advantage to having some grasp on these very basic concepts is that you will have a much better understanding of how computers work, and how the code you write is actually transformed into machine code (by the compiler and/or JITter) and executed by the processor. This understanding will help you consider how the code you write is likely to perform.

And, as for assembler specifically, device driver development and such things all aside, every once in a while, even though I mostly work on C#/ASP.NET web applications at present, I have been thrown into the debugger with nothing more than a disassembly listing. Having some idea how to read it is a huge benefit in such situations. You don't have to understand all the nitty-gritty details, but recognizing the assembly (or IL, in the case of .NET) code corresponding to common high-level-language constructs can really help you deduce whether the problem is actually there, or farther up the call stack. This is particularly common when you are working with third-party libraries for which the source code is not available.

For example, taking x86 Intel syntax assembly, if you're looking at the disassembly of a stack frame and seeing an inc/cmp/jl sequence, you might recognize it as likely the correspondence to the end of a for(;;) loop construct in the vicinity. If you get an index out of bounds error and the debugger breaks in at a mov eax,[ebp+099999999h] or something similar, it helps to know that the [] causes a memory address dereference. In the absence of specific debugging information in the binary, little things like these can provide vital clues to where things are going wrong, and sometimes why. You don't have to be able to write anything serious in assembly language for this knowledge to be useful.

I have toyed with Intel assembly language programming on my own, as well as did some Motorola assembly development in school. The useful take-away from that hasn't been the knowledge of the language itself (I almost certainly could not write anything non-trivial in assembly language as it is), but the understanding of how the computer works, and the ability to read at least basic assembler language code and make heads and tails out of it.

share|improve this answer
add comment

I asked myself those same questions when I started to study Software engineering two years ago.

Learning boolean algebra, assembly language and others low level stuff is not necessary for every day work you will have to do at your job because you won't use theses knowledge often in high level language. But, programming is mainly about how to organise data and control the flow of execution of your programs, optimize your memory and the speed of your algorithm. You can't learn properly how to do those stuff in high level language because of the abstraction made over the data(everything is simplefied for you). Don't get me wrong, abstraction ain't a bad thing at all, because it help you to be much more productive in many ways. By contrast, programming in assembly language take an eternity...

In conclusion, learning low level stuff allow you to have a better understanding of what is going under the code you are writing in high level languages. This can make a huge difference between a good and a bad programmer.

share|improve this answer
add comment

I think it never hurts to answer questions starting with "should I learn" and a subject inside your domains (remember - there are always two domains: programmer's and user's) with yes. There is only a question of prioritizing what to learn first and what next.

share|improve this answer
add comment

High-level languages provide abstractions for the low-level stuff, and most of the time, you won't have to think about the low-level implementation when you write high-level code.

However, at some inevitable point, the abstraction will leak, and you will need your low-level knowledge to troubleshoot (and solve) the problem.

Here's nice reading on the matter: http://www.joelonsoftware.com/articles/LeakyAbstractions.html

share|improve this answer
add comment

Boolean algebra is a pretty good fundamental to have. Digital electronics (logic-gate-level circuit design for small circuits) is a good way of training the application of boolean algebra.

If it's more of an "introduction to assembly language", it certainly will not harm you, knowing how the actual hardware deals with stuff.

If you think it's trivial nonsense, why are you going for a degree in the first place?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.