Jan 17, 2012

Levels of Abstraction in Program Design

,
The complexity of large computer programming projects relies heavily on the implementation of coding abstractions. Most programs rely on the "abstracting" or hiding of the implementation of a computer's system in order to facilitate higher-level programming. So a developer building applications for the Web will not have to know how the server works internally, how internet connections operate or how computer hardware functions. This allows programmers to concentrate on larger programming tasks without worrying about the minutiae of a system.

  1. Hardware and Binary

    • The lowest level of computer operation occurs at the binary level. At this level, hardware runs programming code in 1s and 0s. These values are used to represent larger decimal numbers, as well as binary decision values like true and false or on and off. The computer hardware works directly with binary. It understands nothing else and every piece of code written eventually finds itself translated to binary.

    Assembly Language

    • The next level of abstraction is assembly language. Assembly language defines a series of simple instructions such as "ADD" or "MOV" that the programmer can call up to perform basic mathematical or data storage operations. Assembly hides the implementation of binary commands by presenting the programmer with more human-readable code that is simpler to write and read. To some extent, assembler programmers must understand some binary, but the abstraction allows them to write assembly programs without directly handling difficult binary code.

    Compiled Languages

    • Above assembly language are the compiled languages, represented by C, C++, Java, and Basic among others. Compiled languages make writing code even easier by presenting human-readable code and complex functions to aid in design and implementation. What would take hundreds of lines of assembly will only take a small file of a few lines in a compiled language. This allows programmers to create larger programs with less effort containing code that is easier to read and debug. Compiled languages must link to an "assembler" before running. The assembler converts them to assembly code, which is then compiled into binary.

    Interpreted Languages

    • Interpreted languages are a step above compiled languages. Interpreted languages run on "interpreters," which execute the source code one line at a time. Unlike compiled languages, which must be compiled before run. Interpreters, however, are often programmed in compiled languages. The Python interpreter, for example, is programmed in C. Interpreted languages often do not need to cope with some of the concerns that compiled languages have, such as memory management. Interpreted languages are often easier to read and code in, using less code to accomplish more work.

0 commentaires to “Levels of Abstraction in Program Design”

Post a Comment

 

HowToYo Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates