page_title: Low-level programming language
section_title: Machine code
hierarchical_section_title: Low-level programming language / Machine code
caption_attribution_description: Deutsch: Digital PDP8/e
context_page_description: A low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture—commands or functions in the language map closely to processor instructions. Generally, this refers to either machine code or assembly language. Because of the low abstraction between the language and machine language, low-level languages are sometimes described as being "close to the hardware". Programs written in low-level languages tend to be relatively non-portable, due to being optimized for a certain type of system architecture.
  Low-level languages can convert to machine code without a compiler or interpreter – second-generation programming languages use a simpler processor called an assembler – and the resulting code runs directly on the processor. A program written in a low-level language can be made to run very quickly, with a small memory footprint. An equivalent program in a high-level language can be less efficient and use more memory. Low-level languages are simple, but considered difficult to use, due to numerous technical details that the programmer must remember.
context_section_description: Machine code is the only language a computer can process directly without a previous transformation. Currently, programmers almost never write programs directly in machine code, because it requires attention to numerous details that a high-level language handles automatically. Furthermore, it requires memorizing or looking up numerical codes for every instruction, and is extremely difficult to modify.
  True machine code is a stream of raw, usually binary, data.  A programmer coding in "machine code" normally codes instructions and data in a more readable form such as decimal, octal, or hexadecimal which is translated to internal format by a program called a loader or toggled into the computer's memory from a front panel.
  Although few programs are written in machine language, programmers often become adept at reading it through working with core dumps or debugging from the front panel.    
  Example: A function in hexadecimal representation of 32-bit x86 machine code to calculate the nth Fibonacci number:
  8B542408 83FA0077 06B80000 0000C383
  FA027706 B8010000 00C353BB 01000000
  B9010000 008D0419 83FA0376 078BD989
  C14AEBF1 5BC3
caption: Front panel of a PDP-8/E minicomputer. The row of switches at the bottom can be used to toggle in a machine language program.
exif: {"Image ImageWidth": "4636", "Image ImageLength": "2173", "Image XResolution": "72", "Image YResolution": "72", "Image ResolutionUnit": "Pixels/Inch", "Image Orientation": "Horizontal (normal)", "Image YCbCrSubSampling": "2", "Image DateTime": "2014:10:04 10:45:57", "Image Make": "Canon", "Image Model": "Canon EOS 5D Mark II", "Image Software": "PaintShop Pro 16,00", "Image Artist": "Photographer: Florian SCHAEFFER", "Image Copyright": "Copyright: Florian SCHAEFFER", "Image ExifOffset": "194", "GPS GPSVersionID": "[2, 2, 0, 0]", "Image GPSInfo": "548", "Thumbnail Compression": "JPEG (old-style)", "Thumbnail XResolution": "72", "Thumbnail YResolution": "72", "Thumbnail ResolutionUnit": "Pixels/Inch", "Thumbnail JPEGInterchangeFormat": "1192", "Thumbnail JPEGInterchangeFormatLength": "5963", "EXIF ExifVersion": "0221", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "sRGB", "EXIF ComponentsConfiguration": "YCbCr", "EXIF ExifImageWidth": "4636", "EXIF ExifImageLength": "2173", "EXIF DateTimeOriginal": "2014:10:04 10:45:57", "EXIF DateTimeDigitized": "2014:10:04 10:45:57", "EXIF SubSecTime": "70", "EXIF SubSecTimeOriginal": "70", "EXIF SubSecTimeDigitized": "70", "EXIF ExposureTime": "1/100", "EXIF FNumber": "9/2", "EXIF ExposureProgram": "Manual", "EXIF ISOSpeedRatings": "2000", "EXIF ShutterSpeedValue": "53/8", "EXIF ApertureValue": "35/8", "EXIF ExposureBiasValue": "0", "EXIF MeteringMode": "CenterWeightedAverage", "EXIF Flash": "Flash did not fire, compulsory flash mode", "EXIF FocalLength": "40", "EXIF FocalPlaneXResolution": "5616000/1459", "EXIF FocalPlaneYResolution": "1872000/479", "EXIF FocalPlaneResolutionUnit": "2", "EXIF CustomRendered": "Normal", "EXIF ExposureMode": "Manual Exposure", "EXIF WhiteBalance": "Auto", "EXIF SceneCaptureType": "Standard"}