-2
\$\begingroup\$

I have found resources referring to MIPS as both machine language and assembly language. They are 2 different types, machine language consists of only 0s and 1s, while assembly one deploys instructions such as add, sub, etc.

Why do people keep confusing those 2 concepts?

\$\endgroup\$
  • 2
    \$\begingroup\$ According to Wikipedia, it's neither of those. \$\endgroup\$ – brhans Sep 23 '18 at 12:38
  • \$\begingroup\$ The ones and zeros represent instructions that cause add, sub, and, etc...Assembly language is just a way for humans to deal with the ones and zeros. The assembler takes the assembly language and makes machine code and data from it. \$\endgroup\$ – old_timer Sep 24 '18 at 2:50
10
\$\begingroup\$

is MIPS an assembly language or machine language

That's the wrong question - it isn't an "or". It's a little bit like asking "Is Ford a car or a truck?".

MIPS is a processor architecture and so:

  • there is MIPS assembly language
  • and there is MIPS machine code
  • and there are MIPS architecture CPUs

[Credit to brhans for the Wikipedia link for the MIPS architecture.]

\$\endgroup\$
  • 3
    \$\begingroup\$ And in addition to those three meanings there is also Millions of Instruction Per Second. \$\endgroup\$ – Wouter van Ooijen Sep 23 '18 at 18:10
  • \$\begingroup\$ @WoutervanOoijen - Hi, yes. I thought other meanings were out-of-scope, given the focus of the question (i.e. assembly vs. machine code) so I stuck specifically to the meaning of MIPS in the question. However for future readers, they should note that "MIPS" has multiple interpretations, including the one you mentioned. Thanks :-) \$\endgroup\$ – SamGibson Sep 23 '18 at 18:31
6
\$\begingroup\$

There's no confusion. Assembly language is simply a human-readable representation of machine language. There is a one-to-one correspondence between instructions in assembly language and instructions in machine language.

\$\endgroup\$
  • 1
    \$\begingroup\$ Usually. The MIPS assembler can generate machine code that isn't present in the source code. For example, the R2000 branch delay slots can be automatically filled. \$\endgroup\$ – jonk Sep 23 '18 at 13:08
  • \$\begingroup\$ Consequently, is MIPS an assembly language or a machine language? \$\endgroup\$ – Tjh Thon Sep 23 '18 at 13:11
  • 1
    \$\begingroup\$ @jonk: The MIPS assembler is either inserting NOPs or reordering instructions that did appear in the source code, right? But in any case, that's not what we're referring to when we talk about the characteristics of "assembly language" in general. \$\endgroup\$ – Dave Tweed Sep 23 '18 at 13:36
  • 2
    \$\begingroup\$ @TjhThon: The input to the assembler is "assembly language", and the output is "machine language". The concept of what "MIPS" is covers both. \$\endgroup\$ – Dave Tweed Sep 23 '18 at 13:37
  • \$\begingroup\$ I wasn't criticizing. Just noting a nuance. (I met and worked with Dr. Hennessey back in 1985-1986. So I have a small bit of memory of those experiences.) \$\endgroup\$ – jonk Sep 23 '18 at 19:06
-3
\$\begingroup\$

MIPS is a way of thinking about implementing algorithms in state machines, promulgated by Hennessey.

And from the John Hennessy Wikipedia page

Hennessy became a Stanford faculty member in 1977. In 1981, he began the MIPS project to investigate RISC processors, and in 1984, he used his sabbatical year to found MIPS Computer Systems Inc. to commercialize the technology developed by his research. In 1987, he became the Willard and Inez Kerr Bell Endowed Professor of Electrical Engineering and Computer Science

\$\endgroup\$
  • 1
    \$\begingroup\$ This is a bit thin for an answer. Could elaborate, please. \$\endgroup\$ – Nick Alexeev Sep 23 '18 at 18:07
  • \$\begingroup\$ How many people on this planet know what "MIPS" is? Many of us in the SE network know, but for the general public and many new members they are lost. Please define such acronyms at least once per answer so we are all on the same page. \$\endgroup\$ – Sparky256 Sep 23 '18 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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