Thread: general queries regarding machine level language

  1. #1
    Registered User
    Join Date
    Aug 2016
    Posts
    6

    general queries regarding machine level language

    what makes the machine level language hardware specific though it uses the same 0s and 1s for writing instructions?thnku...

  2. #2
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,687
    Short and sweet answer -

    Computers of any type that are analytical (i.e can be programmed) run on their independent native machine language.

    What makes the difference is what programming language is used. Machine independent languages, such as C, C++ are portable languages that can be executed on different platforms.

    Machine dependent languages, which is usually a base language created for that computer, can only be executed on that single platform. It cannot be ported - ans in most cases is faster and easier to maintain than independent languages.

    The binary (1s and 0s) are contained in the output file, which is just the translation by the compiler from the source language (C, C++) to the native language.
    Last edited by swgh; 09-01-2016 at 01:44 AM. Reason: formatting
    Double Helix STL

  3. #3
    Registered User
    Join Date
    Aug 2016
    Posts
    6
    apart from being executed directly and faster is there any other advantage of low level language over high level language.Imean in context of being able to manipulate the hardware.hope I'm clear.

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    most interesting machine learning methods require varying degrees of sophistication: from linear algebra matrix inversion, as many matrix/tensor decomposition techniques as you can think of are the bread and butter. you will need to consider a huge range of probability distributions and the ability to manipulate/sample form those is crucial. when you have lots of data, you will need to consider threaded computation and other big data methods that run over distributed servers. and very importantly -- though people forget this -- you will also need to visualise everything if you want to make sense of the data and algorithm (machine learning isn't magic after all and poor execution of ML algorithms on simple data will elicit unusable results).

    i'm afraid i see very few advantages to low level languages unless you intend to build a bespoke and narrow implementation of one particular model. this is generally only required in deployment contexts, but for design and development... you'll struggle to do much machine learning of worth with low-level languages.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Angola
    Posts
    8,445
    Quote Originally Posted by sonika jha View Post
    what makes the machine level language hardware specific though it uses the same 0s and 1s for writing instructions?thnku...
    They actually use a different set of 0s and 1s to execute the same instructions, not the same. Processors come with a set of basic instructions that is hardwired into their circuitry. We call the whole set of instructions, ISA (Instruction Set Architecture). This is the low level language specification for that particular CPU. So when you write in an assembly language, you are calling those instructions.

    Different CPUs may share most or all of their ISA, for which reason you can generally write code for them with the same low level instructions. This is true for instance of same-architecture CPUs, like all x86 processors. Some CPUs may introduce extensions into their hardware that extend the current ISA with new instructions. These extensions will only work on those CPUs. That is the case of the amd64 extension, for instance, that extends the x86 ISA with instructions for 64 bit processing, or the AMD-V or Intel VT-x that include support for hardware virtualization.

    Finally, other CPUs have radical different architectures and, may only share a small portion, or none of their ISAs. It is the case of architectures like SPARC processors or the MISP processors.

    This is so, because while the idea of a 0 and 1 is transversal to all processors architectures (hopefully not for long), their design and their capabilities can be vastly different and it becomes impossible for all of them to share the same instruction set.
    Last edited by Mario F.; 09-01-2016 at 04:17 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    High level languages like C are translated by the compiler into machine language which is instruction set specific. In the case of modern processors the machine code is then translated on chip into basically a lower level of machine language that is processor version specific. Many processors can run the same instruction set, but true machine language is usually specific to a particular version of a particular processor. This extra translation layer is usually 1:1 and was not present back in the olden days, so is usually ignored for the purposes of discussion.

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by abachler View Post
    High level languages like C are translated by the compiler into machine language which is instruction set specific. In the case of modern processors the machine code is then translated on chip into basically a lower level of machine language that is processor version specific. Many processors can run the same instruction set, but true machine language is usually specific to a particular version of a particular processor. This extra translation layer is usually 1:1 and was not present back in the olden days, so is usually ignored for the purposes of discussion.
    Hey, that's really cool to know! Thanks for posting that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Is C++ or C language is a high Level language?
    By uthmankhale in forum C++ Programming
    Replies: 5
    Last Post: 08-25-2011, 06:00 PM
  2. C++ for a low-level language
    By lruc in forum C++ Programming
    Replies: 28
    Last Post: 09-01-2008, 01:51 AM
  3. Replies: 10
    Last Post: 12-03-2005, 10:53 PM
  4. machine language
    By SAMSAM in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-12-2003, 05:50 AM
  5. Is C/C++ next to machine language
    By New Programmer in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2001, 08:40 AM

Tags for this Thread